/* Typing Racer 2.0: the loading screen (js/racer/loading.js, #trgLoad in games/typing-racer.php). In the head, so it
   is drawn in the page's first paint. Over the whole page but under the site menu (#main-header), the 2.0 look:
   dark racer strip, gold sign, orange glow, hazard stripe. */
#trgLoad{position:fixed; inset:0; z-index:2147483000; display:flex; align-items:center; justify-content:center; padding:16px; box-sizing:border-box;
	color:#dfe8f2; font-family:'Open Sans', sans-serif; text-align:center;
	background:radial-gradient(ellipse 60% 70% at 50% 45%, rgba(255,138,0,.16), transparent 70%), linear-gradient(180deg, #10141d, #141a26 55%, #0c1017);
	transition:opacity .35s ease, visibility 0s linear .35s;}
#trgLoad.tlOut{opacity:0; visibility:hidden; pointer-events:none;}
#trgLoad::after{content:""; position:absolute; left:0; right:0; bottom:0; height:6px; opacity:.8; background:repeating-linear-gradient(-45deg, #ffc83d 0 12px, #15171c 12px 24px);}
:where(#trgLoad, #trgLoad *){margin:0; box-sizing:border-box;}
#trgLoad .tlBox{width:min(560px, 100%);}
#trgLoad .tlSign{display:block; font:italic 400 64px/1 "Russo One", "Open Sans", sans-serif; color:#ffd866; letter-spacing:.02em;
	text-shadow:0 0 14px rgba(255,160,30,.75), 0 0 34px rgba(255,138,0,.45);}
#trgLoad .tlTitle{margin-top:14px; font:400 26px/1.2 "Russo One", "Open Sans", sans-serif; color:#fff; letter-spacing:.02em;}
#trgLoad .tlTitle span{display:inline-block; width:1.2em; text-align:left; animation:tlDots 1.2s steps(4, end) infinite; overflow:hidden; vertical-align:bottom;}

/* the progress bar is a lane: asphalt, a dashed centre line, the filled part glowing gold, your car at its front, a flag at the end */
#trgLoad .tlRoad{position:relative; height:34px; margin:30px 42px 0 0; border-radius:8px; overflow:visible;
	background:linear-gradient(180deg, #2c313a, #22262d); box-shadow:inset 0 0 0 1px rgba(255,255,255,.08), 0 2px 10px rgba(0,0,0,.45);}
#trgLoad .tlRoad::before{content:""; position:absolute; left:8px; right:8px; top:50%; height:2px; margin-top:-1px; opacity:.55;
	background:repeating-linear-gradient(90deg, #e9eef3 0 16px, transparent 16px 30px);}
#trgLoad .tlFill{position:absolute; left:0; top:0; bottom:0; width:0; border-radius:8px; transition:width .35s ease;
	background:linear-gradient(90deg, rgba(255,157,30,.15), rgba(255,200,61,.55)); box-shadow:0 0 16px rgba(255,170,40,.45);}
#trgLoad .tlFlag{position:absolute; right:-42px; top:-3px; width:34px; height:40px; border-radius:3px;
	background:repeating-conic-gradient(#f2f4f7 0 25%, #15171c 0 50%) 0 0 / 12px 12px; box-shadow:0 0 0 2px rgba(255,255,255,.12);}
#trgLoad .tlCar{position:absolute; left:0; top:50%; width:74px; height:40px; margin:-20px 0 0 -37px; transition:left .35s ease;
	background:center / contain no-repeat; filter:drop-shadow(0 2px 3px rgba(0,0,0,.6));}
#trgLoad .tlCar:not(.tlHasCar)::before{content:""; position:absolute; left:22px; top:12px; width:32px; height:16px; border-radius:7px 10px 10px 7px;
	background:linear-gradient(180deg, #ffd866, #ff9d1e); box-shadow:0 0 10px rgba(255,170,40,.8);}
#trgLoad .tlPct{display:block; margin-top:10px; font:400 15px/1 "Russo One", "Open Sans", sans-serif; color:#ffd866;}

/* the three parts, ticked off as they arrive */
#trgLoad .tlSteps{display:flex; justify-content:center; flex-wrap:wrap; gap:8px 18px; margin-top:18px; padding:0; list-style:none; font-size:14px; color:#9fb0c0;}
#trgLoad .tlStep{display:flex; align-items:center; gap:7px;}
#trgLoad .tlStep::before{content:""; width:12px; height:12px; border-radius:50%; border:2px solid #4a5868; transition:background .2s, border-color .2s;}
#trgLoad .tlStep.tlDone{color:#e8f5ec;}
#trgLoad .tlStep.tlDone::before{border-color:#3fd07a; background:#3fd07a; box-shadow:0 0 8px rgba(63,208,122,.7);}

@keyframes tlDots{from{width:0} to{width:1.2em}}
html.trgCalm #trgLoad .tlTitle span{animation:none; width:auto;}
html.trgCalm #trgLoad .tlFill, html.trgCalm #trgLoad .tlCar{transition:none;}
@media (max-width:600px){
	#trgLoad .tlSign{font-size:46px;}
	#trgLoad .tlTitle{font-size:21px;}
	#trgLoad .tlRoad{height:28px;}
}

/* In the race: a car whose picture hasn't loaded yet shows nothing but its name, never its underglow or trail on their
   own (owner, 2026-11-19: "the car wasn't there, it was just the glow"). games/typing-racer.php CarWait. */
.raceCar.trgCarWait .enlivenBox > :not(.racerName){visibility:hidden !important;}
