/* Football: match rows, calendar, match page, league tables. Uses the tokens from site.css. */

.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live);
  animation: live-pulse 1.6s infinite; vertical-align: middle;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgb(214 40 57 / 0.5); }
  70% { box-shadow: 0 0 0 7px rgb(214 40 57 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(214 40 57 / 0); }
}
.nav-matches::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--live); margin-right: 7px; vertical-align: 2px;
}

/* Match row (calendar, widget, competition lists) */
.mrow {
  display: grid; grid-template-columns: 5em minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 15px;
}
.mrow:last-child { border-bottom: 0; }
.mrow:hover { background: var(--surface-2); color: inherit; }
.mrow-status { font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.mrow-date { display: block; color: var(--ink-3); font-weight: 500; }
.mrow-team { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-home { text-align: right; }
.mrow-team.is-win { font-weight: 700; }
.mrow-score {
  min-width: 64px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--surface-2); border-radius: 4px; padding: 3px 8px; white-space: nowrap;
}
.mrow.is-live { box-shadow: inset 3px 0 0 var(--live); }
.mrow.is-live .mrow-status, .mrow.is-live .mrow-score { color: var(--live); }

/* Calendar */
.match-groups { display: grid; gap: 18px; }
.match-group { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.match-group-title {
  margin: 0; padding: 10px 12px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.day-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.day-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.day-strip::-webkit-scrollbar { display: none; }
.day, .day-arrow {
  flex: none; padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums;
}
.day.is-active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip-live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--live); margin-right: 6px;
}
.muted-note { color: var(--ink-3); font-size: 14px; margin: 0 0 12px; }
.data-credit { font-size: 13px; color: var(--ink-3); margin: 16px 0 0; }
.data-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-credit .data-credit { margin: 18px 0 0; color: var(--header-ink-2); }

/* Home page "Today's matches" box */
.matches-box .mini-matches { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mini-comp {
  display: block; padding: 7px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; background: var(--surface-2); color: var(--ink-2);
}
.matches-box .mrow { grid-template-columns: 4.4em minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; padding: 8px; font-size: 13px; }
.matches-box .mrow-score { min-width: 48px; padding: 2px 5px; }
.matches-box .mrow-status { font-size: 12px; }

/* Match page */
.scoreboard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 22px; margin-bottom: 28px; }
.scoreboard.is-live { border-color: var(--live); }
.sb-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); margin-bottom: 14px; }
.sb-meta a { color: var(--brand); font-weight: 600; }
.sb-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.sb-team { display: grid; gap: 4px; }
.sb-home { text-align: right; }
.sb-name { font-family: var(--font-head); font-weight: 700; font-size: clamp(16px, 4.2vw, 30px); line-height: 1.1; overflow-wrap: break-word; }
.sb-team.is-win .sb-name { color: var(--brand); }
.sb-formation { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sb-center { display: grid; justify-items: center; gap: 6px; text-align: center; }
.sb-score { font-family: var(--font-head); font-weight: 700; font-size: clamp(34px, 6vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-status { font-weight: 700; font-size: 14px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.sb-status.is-live { color: var(--live); }
.sb-extra { font-size: 13px; color: var(--ink-3); }
.match-section { margin-bottom: 30px; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ev {
  display: grid; grid-template-columns: 42px 22px minmax(0, 1fr); align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 4px; background: var(--surface);
}
.ev-away { background: var(--surface-2); }
.ev-minute { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; }
.ev-icon { width: 14px; height: 18px; display: inline-block; justify-self: center; border-radius: 2px; }
.ev-goal .ev-icon, .ev-penalty_goal .ev-icon, .ev-shootout_goal .ev-icon {
  width: 14px; height: 14px; border-radius: 50%; background: var(--ink);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 5px var(--ink);
}
.ev-own_goal .ev-icon {
  width: 14px; height: 14px; border-radius: 50%; background: var(--live);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 5px var(--live);
}
.ev-yellow .ev-icon { background: #f2c200; }
.ev-red .ev-icon { background: #d62839; }
.ev-second_yellow .ev-icon { background: linear-gradient(135deg, #f2c200 50%, #d62839 50%); }
.ev-substitution .ev-icon { width: 16px; height: 16px; background: none; border: 2px solid var(--brand); border-radius: 50%; }
.ev-var .ev-icon, .ev-other .ev-icon, .ev-penalty_missed .ev-icon, .ev-shootout_miss .ev-icon {
  width: 14px; height: 14px; background: none; border: 2px solid var(--ink-3); border-radius: 50%;
}
.ev-goal .ev-text, .ev-penalty_goal .ev-text, .ev-own_goal .ev-text { font-weight: 700; }
.ev-in { font-weight: 600; color: var(--brand); }
.ev-out { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.ev-note, .ev-score { font-size: 13px; color: var(--ink-3); font-weight: 500; }

.lineups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.lineup-team { font-size: 16px; margin: 0 0 8px; }
.lineup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 15px; }
.lineup-list li { display: flex; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 4px; background: var(--surface); }
.shirt {
  min-width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
}
.lineup-subs-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin: 12px 0 6px; }
.lineup-subs li { color: var(--ink-2); }

.stats { display: grid; gap: 12px; }
.stat-row { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { font-weight: 500; color: var(--ink-2); text-align: center; }
.stat-bar { height: 6px; border-radius: 3px; background: var(--live); overflow: hidden; margin-top: 4px; }
.stat-bar span { display: block; height: 100%; background: var(--brand); }

/* League tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.standings { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.standings th {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); font-weight: 600;
  padding: 8px 6px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.standings td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.standings tr:last-child td { border-bottom: 0; }
.standings .num { text-align: center; width: 1%; white-space: nowrap; padding-inline: 8px; }
.standings .team-col { text-align: left; }
.standings .pts { font-weight: 700; }
.standings .pos.has-zone { box-shadow: inset 3px 0 0 var(--zone); }
.standings tr.is-highlight td { background: var(--brand-soft); font-weight: 700; }
.zones { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.zone-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--zone); margin-right: 6px; vertical-align: -1px; }
.sidebar .table-wrap { border: 0; }
.sidebar .standings { font-size: 13px; }
.sidebar .hide-sm { display: none; }
.group-title { font-size: 17px; margin: 22px 0 8px; }

/* Competition pages */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tab[aria-current] { color: var(--ink); border-bottom-color: var(--brand); }
.comp-region { margin-bottom: 24px; }
.comp-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.comp-list a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; }
.comp-list a:hover { border-color: var(--brand); }

@media (max-width: 600px) {
  .mrow { grid-template-columns: 4.4em minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; padding: 9px 8px; font-size: 14px; }
  .mrow-score { min-width: 50px; padding: 3px 5px; }
  .lineups { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
  .sb-main { gap: 8px; }
  .scoreboard { padding: 14px 12px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}
