/* scores.css — Live Scores page for OffThePress.
   Matches the site's editorial look: Merriweather headings, Lato body,
   black / white / red palette. Layered on top of the global style.css. */

:root {
  --otp-red: #c8102e;
  --otp-ink: #1a1a1a;
  --otp-muted: #6b6b6b;
  --otp-line: #e3e3e3;
  --otp-bg-soft: #f6f6f6;
}

body.scores-page {
  background: #fff;
  color: var(--otp-ink);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
}

/* --- branded header (black, matches crossword page so the logo shows) --- */
.game-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--otp-ink); border-bottom: 3px solid var(--otp-red);
}
.game-header .game-logo img { height: 34px; display: block; }
.game-header .game-back {
  font-weight: 700; font-size: 0.85rem; text-decoration: none;
  color: #fff; text-transform: uppercase; letter-spacing: 0.04em;
}
.game-header .game-back:hover { color: var(--otp-red); }

/* --- day switcher --- */
.day-switcher {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; margin-bottom: 20px;
}
.day-arrow {
  font-family: 'Lato', sans-serif; font-size: 1.4rem; line-height: 1;
  width: 38px; height: 38px; border: 1px solid var(--otp-line);
  background: #fff; color: var(--otp-ink); cursor: pointer;
  border-radius: 2px; transition: all 0.12s ease;
}
.day-arrow:hover:not(:disabled) { border-color: var(--otp-ink); background: var(--otp-bg-soft); }
.day-arrow:disabled { opacity: 0.3; cursor: default; }
.day-label {
  font-family: 'Merriweather', Georgia, serif; font-weight: 700;
  font-size: 1.05rem; min-width: 150px; text-align: center;
  color: var(--otp-ink);
}

/* --- layout --- */
.scores-main { max-width: 880px; margin: 0 auto; padding: 28px 20px 60px; }
.scores-titlebar {
  display: flex; align-items: baseline; gap: 16px;
  border-bottom: 2px solid var(--otp-ink); padding-bottom: 10px; margin-bottom: 18px;
}
.scores-title {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: 2rem; margin: 0; color: var(--otp-ink);
}
.scores-updated { font-size: 0.8rem; color: var(--otp-muted); margin-left: auto; }

/* --- league tabs --- */
.league-tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px;
}
.league-tab {
  font-family: 'Lato', sans-serif; font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 7px 14px; border: 1px solid var(--otp-line);
  background: #fff; color: var(--otp-muted); cursor: pointer;
  border-radius: 2px; transition: all 0.12s ease;
}
.league-tab:hover { border-color: var(--otp-ink); color: var(--otp-ink); }
.league-tab.is-active {
  background: var(--otp-ink); border-color: var(--otp-ink); color: #fff;
}

/* --- league section --- */
.league-block { margin-bottom: 32px; }
.league-heading {
  font-family: 'Merriweather', Georgia, serif; font-weight: 700;
  font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--otp-red); margin: 0 0 12px;
  border-left: 4px solid var(--otp-red); padding-left: 10px;
}
.league-unavailable { color: var(--otp-muted); font-size: 0.9rem; font-style: italic; }

/* --- score grid --- */
.score-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.score-card {
  border: 1px solid var(--otp-line); border-radius: 3px;
  padding: 12px 14px; background: #fff;
}
.score-team {
  display: flex; align-items: center; gap: 9px; padding: 4px 0;
}
.team-logo { width: 24px; height: 24px; object-fit: contain; flex: none; }
.team-logo--empty { background: var(--otp-bg-soft); border-radius: 50%; }
.team-name {
  font-weight: 700; font-size: 0.92rem; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-record { font-size: 0.72rem; color: var(--otp-muted); flex: none; }
.team-score {
  font-family: 'Merriweather', Georgia, serif; font-weight: 900;
  font-size: 1.15rem; min-width: 30px; text-align: right; flex: none;
}
.score-team.is-winner .team-name,
.score-team.is-winner .team-score { color: var(--otp-ink); }
.score-team:not(.is-winner) .team-name { color: var(--otp-muted); }

/* --- status line --- */
.score-status {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--otp-line);
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; display: flex; align-items: center; gap: 6px;
}
.score-status--final { color: var(--otp-muted); }
.score-status--pre { color: var(--otp-muted); }
.score-status--live { color: var(--otp-red); }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--otp-red);
  display: inline-block; animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.25; }
}

/* --- states --- */
.scores-loading, .scores-empty {
  text-align: center; color: var(--otp-muted); padding: 40px 20px;
  font-size: 0.95rem;
}

/* --- footer --- */
.scores-footer {
  text-align: center; padding: 24px 20px; border-top: 1px solid var(--otp-line);
  color: var(--otp-muted); font-size: 0.78rem;
}

@media (max-width: 560px) {
  .scores-title { font-size: 1.5rem; }
  .score-grid { grid-template-columns: 1fr; }
}
