/* v0.9.38 (r20): events use the whole page, rewards as icons, pit tyre picker, gift to the shop */

/* ==== rewards as icons ==== */
.rw20 { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.rw20-r { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.045); }
.rw20-rk { font-style: normal; font: 800 13px var(--f-display); letter-spacing: .04em; text-align: center; padding: 3px 0; border-radius: 7px; background: rgba(255, 255, 255, 0.08); color: var(--txt); white-space: nowrap; }
.rw20-r.g .rw20-rk { background: linear-gradient(180deg, #ffe680, #d9a200); color: #2b1d00; }
.rw20-r.s .rw20-rk { background: linear-gradient(180deg, #f1f5f9, #9aa5b4); color: #111827; }
.rw20-r.b .rw20-rk { background: linear-gradient(180deg, #f0b27a, #a8602c); color: #261204; }
.rw20-its { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.rw20-i { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--txt); white-space: nowrap; }
.rw20-i b { font-weight: 800; }
.rw20-ic { width: 20px; height: 20px; flex: none; }
.rw20-i.cr b { color: #ffd84d; }
.rw20-i.cp b { color: #4ade80; }
.rw20-i.bd .bd19 { width: 22px; height: 22px; }
.rw20-i.ns .nm19 { font-size: 14px; }
.rw20-i.fr i { display: block; width: 26px; height: 18px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.25); }
.rw20-i.md svg { width: 20px; height: 20px; }
.rw20-i.ti b, .rw20-i.pl b, .rw20-i.au b { font-weight: 700; font-size: 12px; color: var(--txt-2); }
.rw20-d { font-size: 10.5px; font-weight: 800; color: var(--txt-2); padding: 1px 5px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); }
.rw20-sub { margin: -4px 0 2px !important; font-size: 12px !important; color: var(--txt-2); }
.lb19-side { position: static; align-self: start; max-height: 100%; overflow: auto; }
.lb19-side .rw20-r { grid-template-columns: 62px minmax(0, 1fr); }

/* ==== Events doors + the season beside them ==== */
.ev18-land.ev20-land { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: clamp(14px, 2vw, 26px); max-width: 1320px; align-items: stretch; margin: 0 auto; }
.ev20-doors { display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); min-width: 0; justify-content: center; }
.ev20-doors .ev18-lede { margin: 0; }
.ev20-doors .ev18-practice { align-self: center; }
.ev20-side { --c: #f472b6; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, transparent), rgba(10, 13, 19, 0.88) 45%); }
.ev20-side header { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.ev20-side header b { display: block; font: 800 20px var(--f-display); letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.ev20-side header .kick { color: var(--c); }
.ev20-side header .hb-cd { font-size: 12px; }
.ev20-tg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.ev20-tg button { padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--txt-2); font: 800 12px var(--f-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.ev20-tg button.on { background: var(--c); color: #160612; }
.ev20-pane { display: none; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.ev20-pane.on { display: flex; }
.ev20-lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.ev20-lb li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); font-size: 13px; }
.ev20-lb li em { font-style: normal; font-weight: 800; color: var(--txt-2); text-align: center; }
.ev20-lb li.t1 em { color: #f5c518; } .ev20-lb li.t2 em { color: #cbd5e1; } .ev20-lb li.t3 em { color: #e0915a; }
.ev20-lb li > span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--txt); white-space: nowrap; }
.ev20-lb li .nm19 { min-width: 0; overflow: hidden; } .ev20-lb li .nm19 i { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev20-lb li.me { background: rgba(255, 204, 0, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 204, 0, 0.45); }
.ev20-lb li.gap { margin-top: 4px; }
.ev20-you { margin: 0; font-size: 12.5px; color: var(--txt-2); } .ev20-you b { color: #fff; }
.ev20-none { margin: 4px 0; font-size: 13px; color: var(--txt-2); }
.ev20-side .rw20 { margin-top: 2px; }
.ev20-tier { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px 8px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.ev20-tier b { font: 800 26px var(--f-display); color: #fff; } .ev20-tier small { color: var(--txt-2); }
.ev20-tier .hb-bar { grid-column: 1 / -1; height: 8px; } .ev20-tier .hb-bar i { background: var(--c); }
.ev20-tier > small:last-child { grid-column: 1 / -1; }
.ev20-next { padding: 10px 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--c) 50%, transparent); }
.ev20-next b { display: block; margin-top: 2px; color: #fff; }
.ev20-xp { margin: 0; font-size: 13px; color: var(--txt-2); } .ev20-xp b { color: #fff; }
.ev20-side .wide { width: 100%; margin-top: auto; }

/* ==== Weekly Cup: progress left, board + points right ==== */
.ev18-cup.ev20-cup { max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(12px, 2vw, 22px); align-items: start; }
.ev20-cupside { display: grid; gap: 12px; }
.ev20-card { display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(74, 222, 128, 0.28); background: linear-gradient(180deg, rgba(74, 222, 128, 0.08), rgba(10, 13, 19, 0.88) 55%); }
.ev20-card h3 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; font: 800 15px var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.ev20-card h3 small { font: 600 12px Inter, sans-serif; letter-spacing: 0; text-transform: none; color: var(--txt-2); }

/* ==== Time trials: cards stacked left, the fastest laps get the room ==== */
.ev18-cat-trials { max-width: 1320px; }
.ev18-cat-trials .ev18-split { grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.5fr); }
.ev18-cat-trials .ev18-split .ev18-cards { grid-template-columns: 1fr; justify-content: stretch; }
.ev18-cat-trials .ev18-cards .m15-ev { gap: 8px; padding: 12px 14px; }
.ev18-cat-trials .ev18-cards .m15-lad { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.ev18-cat-trials .ev18-cards .m15-lad li { padding: 5px 7px; font-size: 11.5px; }
.ev18-cat-trials .ev18-cards .m15-lad li span { white-space: normal; line-height: 1.25; }
.ev18-cat-trials .ev18-ghosts { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.ev18-ghosts .gh-list li { flex-wrap: nowrap !important; padding: 4px 6px; }
.ev18-ghosts .gh-list li::after { display: none; }
.ev18-ghosts .gh-list li b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev18-ghosts .gh-list li > span { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ev18-ghosts .gh-list li > .gh-act { display: flex; gap: 4px; flex: none; }
.gh-btn.gh-ic { position: relative; width: 30px; height: 28px; padding: 0 !important; min-height: 0; display: inline-grid; place-items: center; border-radius: 8px; margin: 0 !important; }
.gh-btn.gh-ic .gh-tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gh-btn.gh-ic svg { width: 15px; height: 15px; margin: 0; }
.gh-btn.gh-ic[data-tip]:hover::after, .gh-btn.gh-ic[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 5; padding: 4px 8px; border-radius: 6px; background: #0b0f17; border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font: 600 11.5px Inter, sans-serif; white-space: nowrap; pointer-events: none; }

/* ==== race cards: prizes, then the top 5, turning over by themselves ==== */
.ev20-peek { position: relative; display: grid; min-height: 120px; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); border: 1px solid rgba(255, 255, 255, 0.07); overflow: hidden; }
.ev20-face { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 5px; animation: ev20-a 12s infinite; }
.ev20-face.b { animation-name: ev20-b; }
.ev20-peek.one .ev20-face { animation: none; }
.ev20-peek:hover .ev20-face { animation-play-state: paused; }
.ev20-face .kick { font-size: 10.5px; }
.ev20-peek .rw20-r { padding: 3px 6px; grid-template-columns: 50px minmax(0, 1fr); }
.ev20-peek .rw20-rk { font-size: 11.5px; padding: 2px 0; }
.ev20-peek .rw20-i { font-size: 12px; } .ev20-peek .rw20-ic { width: 17px; height: 17px; }
.ev20-peek .ev20-lb li { padding: 3px 7px; font-size: 12px; }
@keyframes ev20-a { 0%, 44% { opacity: 1; visibility: visible; } 50%, 94% { opacity: 0; visibility: hidden; } 100% { opacity: 1; visibility: visible; } }
@keyframes ev20-b { 0%, 44% { opacity: 0; visibility: hidden; } 50%, 94% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .ev20-face { animation: none; } .ev20-face.b { display: none; } }

@media (max-width: 960px) { .ev18-land.ev20-land, .ev18-cup.ev20-cup, .ev18-cat-trials .ev18-split { grid-template-columns: 1fr; } }
@media (max-height: 560px) { .ev20-side { padding: 10px 12px; gap: 6px; } .ev20-lb li { padding: 3px 7px; } .ev20-peek { min-height: 96px; } .rw20-r { padding: 4px 6px; } }

/* ==== the update gift dialog ==== */
.gf20 { text-align: center; }
.gf20-pv { display: grid; place-items: center; min-height: 64px; margin: 6px 0 2px; border-radius: 14px; background: radial-gradient(120% 100% at 50% 0%, rgba(251, 146, 60, 0.22), rgba(10, 13, 19, 0.6)); }
.gf20-pv .nm19 { font-size: 26px; }
.gf20-b { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }

/* ==== pit tyre picker: what each set is for ==== */
.tyres button .tyd { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 600; line-height: 1.2; opacity: .72; white-space: normal; }
.pp-auto h4 { color: #ffcc00; }

/* ==== Updates: the new track ==== */
.upd20-shot { margin: 0 0 12px; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(125, 211, 252, 0.35); background: #0b1220; }
.upd20-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.upd20-imgs img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.upd20-shot figcaption { display: grid; gap: 2px; padding: 10px 14px 12px; background: linear-gradient(180deg, rgba(125, 211, 252, 0.12), transparent); }
.upd20-shot figcaption .kick { color: #7dd3fc; }
.upd20-shot figcaption b { font: 800 20px var(--f-display); letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.upd20-shot figcaption span { color: var(--txt-2); font-size: 13px; }

/* ==== shop previews: bigger, so the art reads ==== */
.sh19-bd .bd19 { width: 56px !important; height: 56px !important; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45)); }
.sh19-pv .nm19.big { font-size: 24px; }
.sh19-pv { background: radial-gradient(120% 90% at 50% 0%, rgba(var(--tt, 148, 163, 184), 0.16), rgba(8, 10, 15, 0.9) 70%) !important; }

/* ==== big screens: menu pages use the width (was capped at 1180 px) ==== */
.m15-wrap { padding: 0 max(clamp(14px, 3vw, 40px), calc((100% - 1560px) / 2)); }
.ev18-land.ev20-land, .ev18-cat, .ev18-cat-trials, .ev18-cup.ev20-cup { max-width: none; }
@media (min-width: 1500px) { .ev18-cards { grid-template-columns: repeat(auto-fit, minmax(300px, 420px)); } .ev18-cat-trials .ev18-split { grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.6fr); } }
.sh19, .lb19, .ev19-det { max-width: none; }
