/* GridRival F1 (f1.js): the team's cards, the next race, the market and results tables, the calendar and the scoring page.
   Loads after pages.css. A team's colour only ever draws a stripe or a ring; the name is always written beside it. */

/* faces in their team's colour */
.gr-face { display: inline-flex; flex-shrink: 0; }
.gr-face .face { box-shadow: 0 0 0 2px var(--tc, #64748b); border-color: transparent; }

/* the next race and the lock */
.gr-ev { font: italic 700 34px/1 var(--disp); text-transform: uppercase; margin: 6px 0 2px; overflow-wrap: anywhere; } .gr-ev.sm { display: block; font-size: 26px; margin: 2px 0; }
.gr-nextrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 32px; margin: 14px 0 16px; }
.gr-lock { display: flex; flex-direction: column; gap: 2px; } .gr-count { font-size: clamp(40px, 6vw, 56px); line-height: 1; }
.gr-lockmsg { max-width: 460px; }
.gr-sessions { list-style: none; margin: 0; padding: 0; font-size: 13px; } .gr-sessions li { margin: 3px 0; }
.gr-lockbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; } .gr-lockbar > .grow { min-width: min(100%, 240px); }
.gr-lockbar .gr-lock { align-items: flex-end; text-align: right; }
@media (max-width: 560px) { .gr-lockbar .gr-lock { align-items: flex-start; text-align: left; } .gr-ev { font-size: 28px; } }

/* the points race */
.gr-stable .c-last { width: 88px; } .gr-stable .c-val { width: 96px; }
.gr-tmt { display: flex; flex-direction: column; min-width: 0; } .gr-sub { display: none; } .gr-lr { margin-left: 6px; }
@media (max-width: 560px) { .gr-stable .c-last, .gr-stable .c-val { display: none; } .gr-sub { display: block; } } /* a phone keeps the name whole: the last race and the value go under it */
.gr-bestname { display: block; font-size: 20px; overflow-wrap: anywhere; } .gr-bestpts { font-size: 40px; margin-left: 8px; }

/* my team: five driver cards and a constructor */
.gr-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 12px; }
.gr-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 14px 14px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.gr-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--tc, #64748b); }
.gr-card.talent { border-color: color-mix(in srgb, var(--amber) 55%, var(--line)); background: color-mix(in srgb, var(--amber) 6%, var(--panel)); }
.gr-card.empty { border-style: dashed; border-color: var(--line-2); background: transparent; align-items: flex-start; justify-content: center; min-height: 158px; }
.gr-card.empty::before { display: none; }
.gr-top { display: flex; align-items: center; gap: 12px; min-width: 0; } .gr-top > .grow { min-width: 0; }
.gr-name { margin: 0; font: italic 700 22px/1.05 var(--disp); text-transform: uppercase; overflow-wrap: anywhere; }
.gr-pts { flex-shrink: 0; text-align: right; } .gr-pts .num { font-size: 30px; }
.gr-money { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 13px; color: var(--soft); } .gr-money b { color: var(--text); }
.gr-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.gr-star[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #0b0f16; }
.gr-of { font: 600 12px var(--body); text-transform: none; letter-spacing: 0; margin-left: 6px; }
.gr-talent { margin: 0; } .gr-staricon { font-size: 22px; line-height: 1; color: var(--amber); }
.gr-tiles { margin-top: 0; }
.gr-mini { gap: 10px; } .gr-mini .grow { min-width: 0; }
.gr-rules { margin: 8px 0 12px; padding-left: 18px; } .gr-rules li { margin: 6px 0; }

/* the sign sheet and the list behind an empty seat */
.gr-shead { gap: 14px; } .gr-sname { font-size: 30px; margin: 2px 0 0; overflow-wrap: anywhere; }
.gr-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; } .gr-facts .tile b { font-size: 24px; }
.gr-len .grow { min-width: 0; } .gr-len .step output { min-width: 84px; font-size: 22px; }
.gr-why { margin: 14px 0 0; color: var(--warn); font-weight: 600; }
.gr-pick { display: flex; flex-direction: column; margin-top: 8px; }
.gr-pickrow { width: 100%; min-height: 56px; gap: 10px; padding: 8px 0; background: none; border: 0; border-top: 1px solid var(--line); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gr-pickrow:first-child { border-top: 0; } .gr-pickt { display: flex; flex-direction: column; min-width: 0; } .gr-pickrow.off .gr-pickt b { color: var(--soft); }
.gr-pickprice { flex-shrink: 0; font-size: 20px; }
@media (hover: hover) { .gr-pickrow:hover .gr-pickt b, .gr-who:hover b { color: var(--accent-hi); } }

/* tables: the market, a weekend's results, the scoring page. The name column stays put while the numbers scroll. */
.gr-scroll { position: relative; margin-top: 4px; } /* holds the screen-reader caption, so it can't stretch the page */
.gr-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.gr-table th, .gr-table td { padding: 7px 10px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; vertical-align: middle; }
.gr-table thead th { border-top: 0; font: 700 11px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; }
.gr-table thead th[aria-sort="ascending"], .gr-table thead th[aria-sort="descending"] { color: var(--text); }
.gr-table tbody th { font-weight: 400; text-align: left; }
.gr-table .gr-c1 { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--panel); }
.gr-table tr.me > * { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.gr-sort { min-height: 44px; padding: 0 2px; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.gr-who { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; } button.gr-who { cursor: pointer; }
.gr-whot { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.gr-tot { font-size: 18px; } .gr-left { text-align: left; } .gr-none { text-align: left; }
.gr-spark { display: block; margin-left: auto; color: var(--muted); } .gr-spark-now { fill: var(--accent-hi); }
.gr-rulet td, .gr-rulet th { padding: 5px 10px; } .gr-rulet tbody th { font-weight: 700; }
@media (max-width: 560px) { .gr-table .gr-c1 { max-width: 150px; white-space: normal; } .gr-table .gr-c1 .gr-face { display: none; } .gr-table th, .gr-table td { padding: 6px 8px; } }

/* a weekend's results */
.gr-picker { align-items: flex-end; gap: 10px; margin-bottom: 16px; } .gr-sel { flex: 1 1 260px; max-width: 420px; } .gr-sel select { height: 44px; }
.gr-two { align-items: start; } .gr-move { gap: 10px; } .gr-move .grow { min-width: 0; }
.gr-team { gap: 10px; } .gr-team.me { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 8px; } .gr-rk { width: 20px; flex-shrink: 0; } .gr-tpts { font-size: 22px; }

/* the calendar */
.gr-cal { list-style: none; margin: 10px 0 0; padding: 0; }
.gr-calrow { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--line); } .gr-calrow:first-child { border-top: 0; }
.gr-calrow.now { border-radius: 10px; background: color-mix(in srgb, var(--accent) 9%, transparent); }
.gr-calno { width: 34px; flex-shrink: 0; text-align: center; font-size: 26px; color: var(--muted); } .gr-calrow > .grow { min-width: 0; }
@media (max-width: 560px) { .gr-calrow { flex-wrap: wrap; } .gr-calrow > .grow { flex: 1 1 calc(100% - 50px); } .gr-calrow > .chip { margin-left: 46px; } }
