/* =========================================================
   STADIUM DAYLIGHT — Match detail page (/matches/:id)
   Hero (teams + score + status), pot panel, prediction form,
   and reveal block (reused from match_card.css).
   Tokens: tokens.css. Conventions: BEM, mobile-first.
   ========================================================= */

.match-show {
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ----- Hero ------------------------------------------------- */

.match-show__hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}
.match-show__hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pitch-deep), var(--terracotta), var(--sky-deep));
}

.match-show__teams {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.match-show__team {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}
/* Resolved teams link to their country page — inherit the hero type, no
   underline, name underlines on hover as the click affordance. */
.match-show__team-link {
  color: inherit;
  text-decoration: none;
}
.match-show__team-link:hover .match-show__team-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.match-show__team-name {
  font-variation-settings: "SOFT" 100, "opsz" 96;
}

.match-show__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  color: var(--slate);
}
.match-show__kickoff {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.match-show__stadium-extra {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 13px;
  color: var(--slate-soft);
}
.match-show__map-link {
  color: var(--pitch-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.match-show__map-link:hover {
  color: var(--ink);
}

.match-show__score {
  text-align: center;
  margin: var(--space-sm) 0 0;
}
.match-show__score--live {
  color: var(--terracotta-deep);
}
/* "n.v." under an extra-time score — same muted mono treatment as the card's
   shootout line, sitting directly beneath the stat-lg score. The period score
   lines in the goalscorers ledger ("Na 90 minuten" / "Na verlenging") share
   the treatment. */
.match-show__aet,
.match-show__period-score {
  margin: 2px 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--slate);
}
.match-show__period-score {
  margin-top: var(--space-sm);
}
/* Labelled divider between the regulation and extra-time goal columns —
   a centred "VERLENGING" with hairlines either side, same width as the
   goalscorers grid it splits. */
.match-show__period-divider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 36rem;
  margin: var(--space-sm) auto 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}
.match-show__period-divider::before,
.match-show__period-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}
.match-show__live-minute {
  margin-left: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--terracotta);
  vertical-align: middle;
}

/* Goalscorers under the score: two columns split at centre — home scorers
   right-aligned just left of centre, away scorers left-aligned just right of
   centre, mirroring the score above. */
.match-show__goalscorers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  max-width: 36rem;
  margin: var(--space-sm) auto 0;
}
.match-show__goal-col {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.match-show__goal-col--home { text-align: right; }
.match-show__goal-col--away { text-align: left; }
.match-show__goal {
  font-size: 15px;
  color: var(--ink-soft);
}
.match-show__goal-minute {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
}
.match-show__goal-og {
  font-size: 12px;
  color: var(--slate);
}

/* Penalty shootout — under the goalscorers. A labelled aggregate score, then
   the per-kick board mirroring the goalscorers layout (home right of centre,
   away left), each taker marked scored (filled) or missed (hollow/muted). */
.penalty-shootout {
  max-width: 36rem;
  margin: var(--space-md) auto 0;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line, var(--slate-soft));
  text-align: center;
}
.penalty-shootout__heading {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-sm);
  margin: 0;
}
.penalty-shootout__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
}
.penalty-shootout__score {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.penalty-shootout__outcome {
  margin: var(--space-xs) 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.penalty-shootout__board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-sm) auto 0;
}
.penalty-shootout__col {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.penalty-shootout__col--home { text-align: right; }
.penalty-shootout__col--away { text-align: left; }
.penalty-shootout__kick {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--ink-soft);
}
.penalty-shootout__col--away .penalty-shootout__kick {
  flex-direction: row;
}
.penalty-shootout__col--home .penalty-shootout__kick {
  flex-direction: row;
  justify-content: flex-end;
}
.penalty-shootout__kick--missed .penalty-shootout__kicker {
  color: var(--slate);
  text-decoration: line-through;
}
.penalty-shootout__mark {
  font-size: 13px;
  line-height: 1;
}
.penalty-shootout__kick--scored .penalty-shootout__mark { color: var(--pitch-deep); }
.penalty-shootout__kick--missed .penalty-shootout__mark { color: var(--terracotta-deep); }

/* LIVE badge — the one status badge that must grab attention. A terracotta
   pill with a gently pulsing dot, reused on the match card and the hero. */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.badge-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--terracotta);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}
@media (prefers-reduced-motion: reduce) {
  .badge-live::before { animation: none; }
}

/* ----- Pot panel ------------------------------------------- */

.match-show__pot {
  background: var(--pitch-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.match-show__pot-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pitch-deep);
  margin: 0;
}
.match-show__pot-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 600;
  color: var(--pitch-deep);
  margin: 0;
}
.match-show__pot-note {
  font-size: 13px;
  color: var(--pitch-deep);
  margin: 0;
}

/* ----- Prediction form ------------------------------------ */

.match-show__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.match-show__form-heading {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}
.match-show__form-errors {
  background: var(--error-soft);
  color: var(--error-deep);
  border: 1px solid var(--error);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 0;
  list-style: none;
  font-size: 14px;
}
.match-show__form-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: var(--space-sm);
  align-items: end;
}
.match-show__form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.match-show__form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.match-show__form-input {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  text-align: center;
}
.match-show__form-sep {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--slate);
  padding-bottom: 14px;
}
/* Visual treatment lives on .btn-icon (buttons.css); this rule only
   keeps the submit in the 4th grid column on the same row as the
   score inputs. */
.match-show__form-hint {
  font-size: 13px;
  color: var(--slate);
  margin: 0;
}

/* ----- Next-match navigation ------------------------------- */

.match-show__next-nav {
  text-align: center;
}
.match-show__next-link {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ----- Pre-kickoff family roster --------------------------- */

/* Reuses .prediction-list / .prediction-row from match_card.css. The
   roster shows who has and hasn't predicted yet, never the scores —
   those reveal at kickoff via _predictions_revealed. */
.match-show__roster {
  margin-top: var(--space-lg);
}

/* Status pill: a leading glyph plus the label. Predicted reads in the
   pitch accent; pending stays muted so "done" rows pop and "todo" rows
   recede at a glance. */
.prediction-row__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.prediction-row__status::before {
  font-weight: 700;
}
.prediction-row__status--is-predicted {
  color: var(--pitch-deep);
}
.prediction-row__status--is-predicted::before {
  content: "✓";
}
.prediction-row__status--is-pending {
  color: var(--slate-soft);
}
.prediction-row__status--is-pending::before {
  content: "–";
}

/* ----- Wider screens --------------------------------------- */

@media (min-width: 481px) {
  .match-show { padding: var(--space-lg) var(--space-md); }
  .match-show__hero { padding: var(--space-xl); }
}
