/* Quiz League - fixtures/results/table components. Loaded after style.css. */
:root { --accent: #ffa94d; --gold: #ffd166; --card: rgba(255,255,255,.05); --line: #2e384d; --win: #3ccf78; --draw: #ffd166; --loss: #ff6b6b; --muted: #9aa3b8; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sidebar-menu a.current { background: var(--accent); color: #141b2d; }

/* toolbar: last updated + follow team */
.league-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 18px; font-size: .9rem; color: var(--muted); }
#team-picker label { display: flex; align-items: center; gap: 8px; }
#team-picker select { background: #1e2b40; color: #fff; border: 1px solid #34425e; border-radius: 6px; padding: 7px 8px; font: inherit; max-width: 230px; }

/* week picker */
.week-nav { display: flex; align-items: center; gap: 6px; margin: 0 0 22px; }
.week-strip { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; flex: 1; padding: 2px; }
.week-strip::-webkit-scrollbar { display: none; }
.week-pill { flex: 0 0 auto; scroll-snap-align: center; background: #1a2338; color: #fff; border: 1px solid transparent; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.week-pill.played { color: #c9cfdc; }
.week-pill.next { border-color: var(--accent); }
.week-pill:hover { background: #26324d; }
.week-pill.active { background: var(--accent); color: #141b2d; }
.week-pill:focus-visible, .week-step:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.week-step { flex: 0 0 36px; height: 36px; border-radius: 50%; border: 0; background: #1e2b40; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.week-step:disabled { opacity: .3; cursor: default; }

.week-title { margin: 0 0 14px; font-size: 1.3rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; background: var(--accent); color: #141b2d; padding: 3px 8px; border-radius: 4px; }
.tag.muted { background: #2a3247; color: var(--muted); }
.callout { background: rgba(255,169,77,.12); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 6px; font-size: .95rem; }
.placeholder.small { padding: 12px 0; font-size: .9rem; }

/* badges with monogram fallback */
.badge { --size: 64px; width: var(--size); height: var(--size); flex: 0 0 var(--size); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.badge img { width: 100%; height: 100%; object-fit: contain; }
.badge.monogram { border-radius: 50%; background: hsl(var(--h) 45% 32%); border: 2px solid hsl(var(--h) 60% 55%); }
.badge.monogram::after { content: attr(data-initials); color: #fff; font-weight: 800; font-size: calc(var(--size) * .36); letter-spacing: .02em; }
.badge.sm { --size: 30px; }

/* match cards */
.match { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px; background: var(--card); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.3); border: 1px solid transparent; }
.match.mine { border-color: var(--accent); background: rgba(255,169,77,.08); }
.match .side { display: flex; align-items: center; gap: 12px; min-width: 0; }
.match .side.away { flex-direction: row-reverse; text-align: right; }
.match .team-name { font-size: 1.15rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.match .side.loss .team-name { color: #c3c9d6; font-weight: 600; }
.pts-chip { font-size: .72rem; font-weight: 800; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.pts-chip.win { background: rgba(60,207,120,.18); color: var(--win); }
.pts-chip.draw { background: rgba(255,209,102,.18); color: var(--draw); }
.pts-chip.loss { background: rgba(255,255,255,.07); color: var(--muted); }
.scoreline { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 110px; }
.scores { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.score { font-size: 1.5rem; font-weight: 800; color: #dfe3ec; }
.score.win { color: var(--gold); }
.scores.small .score { font-size: 1.1rem; color: var(--muted); }
.dash { color: var(--muted); }
.vs { font-weight: 800; color: var(--muted); font-size: 1.2rem; }
.outcome { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.match-note { grid-column: 1 / -1; margin: 2px 0 0; font-size: .82rem; color: var(--muted); text-align: center; }

/* league table */
.table-wrap { overflow-x: auto; border-radius: 8px; }
.league-table { width: 100%; border-collapse: collapse; background: #1c2333; font-variant-numeric: tabular-nums; }
.league-table th, .league-table td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: .95rem; }
.league-table thead th { background: #2a3247; color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.league-table .c-num { text-align: center; }
.league-table .c-pos { width: 52px; white-space: nowrap; }
.league-table .pos { font-weight: 800; display: inline-block; min-width: 1.2em; }
.league-table .c-pts strong { color: var(--gold); font-size: 1.05rem; }
.league-table tr.leader td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
.league-table tr.mine td { background: rgba(255,169,77,.12); }
.league-table tr.inactive { opacity: .6; }
.team-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-text { display: flex; flex-direction: column; min-width: 0; }
.standing-team-name { font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
.league-table .c-team { width: 100%; }
.move { display: block; font-size: .68rem; font-weight: 800; }
.move.up { color: var(--win); } .move.down { color: var(--loss); } .move.same { color: var(--muted); opacity: .6; }
.form { display: inline-flex; gap: 3px; }
.form i, .table-key i { font-style: normal; font-size: .62rem; font-weight: 800; width: 17px; height: 17px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; color: #141b2d; }
.f-W { background: var(--win); } .f-D { background: var(--draw); } .f-L { background: var(--loss); }
.form-inline { display: none; margin-top: 4px; }
.table-key { font-size: .82rem; color: var(--muted); margin-top: 12px; }
.table-key i { margin: 0 2px; vertical-align: middle; }

/* home snapshot */
.snapshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.snap-card.snap-table { grid-column: 1 / -1; }
.snap-card .league-table .c-pos { width: 36px; }
.snap-card { background: rgba(255,255,255,.04); border: 1px solid #2b334d; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; }
.snap-card h3 { margin: 0 0 10px; color: var(--gold); font-size: 1.05rem; }
.snap-card h3 small { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 4px; }
.snap-card .league-table th, .snap-card .league-table td { padding: 7px 6px; font-size: .85rem; }
.mini-list { list-style: none; padding: 0; margin: 0 0 8px; font-size: .9rem; }
.mini-list li { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid #262e45; align-items: center; }
.mini-list li span:last-child { text-align: right; }
.mini-list b { color: var(--accent); font-variant-numeric: tabular-nums; }
.mini-list .w { color: var(--gold); font-weight: 700; }
.snap-link { margin-top: auto; padding-top: 8px; color: var(--accent); font-weight: 700; text-decoration: none; font-size: .9rem; }
.feature > h2:first-child { margin-top: 0; }
