/*  css/schedule-layout.css
    "Game Cards Only" — Dark aurora background, frosted-glass cards, teal accents
    Pure CSS (no Tailwind dependency). Includes robust overrides so legacy
    .schedule-item styles cannot shrink cards on mid-width screens.
-----------------------------------------------------------------------*/

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --wb-bg: var(--theme-bg-base, #0a1628);
  --wb-text: var(--theme-text-primary, #ffffff);
  --wb-teal-100: var(--theme-text-secondary, #e8ffe9);
  --wb-teal-200: var(--theme-accent-bright, #00F5D4);
  --wb-teal-300: var(--theme-accent, #00D3BD);
  --wb-teal-400: var(--theme-accent, #00D3BD);
  --wb-teal-500: var(--theme-accent-dark, #00AD84);
  --wb-card-bg: rgba(255, 255, 255, 0.05);
  --wb-card-border: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.20);
  --wb-card-border-strong: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.30);
  --wb-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.7);
}

/* Container */
#schedule-container.wb-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  /* background: var(--wb-bg); */
  background: transparent;
  color: var(--wb-text);
}

/* Aurora background + subtle grain */
.wb-background-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.wb-aurora-1 {
  top: -8rem;
  left: -6rem;
  /* background: radial-gradient(closest-side, rgba(20,184,166,0.45), transparent); */
}
.wb-aurora-2 {
  bottom: -10rem;
  right: -6rem;
  /* background: radial-gradient(closest-side, rgba(16,185,129,0.45), transparent); */
}

/* Main layout */
.wb-main {
  position: relative;
  z-index: 1;
  margin-left: auto;
  margin-right: auto;
  max-width: 80rem; /* ~1280px */
  padding: 1.25rem 1rem; /* Reduced vertical padding for 2 visible rows */
  margin-top: -10px;
}

/* Grid */
.wb-schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}

/* Dividers — bottom border on each card */
.wb-schedule-list > li.schedule-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.wb-schedule-list > li.schedule-item:last-child {
  border-bottom: none;
}

/* Force grid items to fill tracks even if old CSS tries to constrain them */
.wb-schedule-list > li.schedule-item {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  display: block !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  margin: 0 !important;
  min-width: 0;
}

/* Card — flat layout, no container chrome */
.wb-card {
  position: relative;
  overflow: hidden;
  height: 100%;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.wb-card .wb-card-content { cursor: pointer; }

.wb-card-glow { display: none; }

.wb-card-content {
  position: relative;
  z-index: 1;
  padding: 0; /* Remove padding, header will fill to edges */
  cursor: default; /* card no longer clickable */
}

/* Header (date + time) */
.wb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem; /* tighter, to fit status just below */
}

.wb-card-date {
  font-size: 0.75rem; /* 12px */
  color: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.85);
  white-space: nowrap;
}

.wb-card-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem; /* 12px */
  color: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.80);
}
.wb-icon { display: inline-flex; opacity: 0.90; }

.wb-card-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .5rem 0;
  padding: .2rem .5rem;
  border-radius: .5rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid var(--wb-card-border-strong);
  color: var(--wb-teal-200);
  background: rgba(20,184,166,.10);
}

.wb-card-status.completed::before{
  content: "●";
  font-size: .85em;
  line-height: 1;
  color: var(--wb-teal-300);
}

/* LIVE status pill — red theme */
.wb-card-status.live{
  /* light red text on dark bg */
  color: #fecaca;                               /* red-200 */
  border: 1px solid rgba(239, 68, 68, 0.35);    /* red-500 border */
  background: rgba(239, 68, 68, 0.12);          /* subtle red tint */
}

.wb-card-status.live::before{
  content: "●";
  font-size: .85em;
  line-height: 1;
  color: #ef4444;                                /* red-500 dot */
  animation: wb-live-pulse 1.1s ease-in-out infinite;
}

@keyframes wb-live-pulse{
  0%   { transform: scale(.85); opacity: .9; }
  70%  { transform: scale(1.45); opacity: .35; }
  100% { transform: scale(.85); opacity: .9; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .wb-card-status.live::before{ animation: none; }
}


/* Body (teams + actions) */
.wb-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wb-teams { min-width: 0; }

.wb-teams .team-name {
  display: block;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: 1.5rem; 
  word-break: break-word;
  font-family: 'Anton', sans-serif;
}

.wb-teams .team-name {
  color: var(--name-color, var(--wb-text));
  /* optional global tone-down: */
  /* filter: brightness(.9) saturate(.95); */
}

/* Actions */
.wb-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* Score numbers (shown for live/final) */
.wb-card-score{
  display: inline-flex;
  align-items: baseline;
  gap: .25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.25rem; /* desktop-ish */
  color: var(--wb-text);
}

.wb-card-score .dash{ opacity: .7; }

/* harmonize with your existing status colors */
.wb-card-score.live  { color: #fecaca; }            /* red-200 to match LIVE pill theme */
.wb-card-score.final { color: var(--wb-teal-200); } /* teal tone for completed */

/* =========================================
   Live Score Points (in team row)
   ========================================= */
.wb-live-pts {
  margin-left: auto;
  margin-right: 0.5em;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--wb-text);
  min-width: 1.5em;
  text-align: right;
}

/* Live game — red score to match Live pill */
.wb-card.live-active .wb-live-pts {
  color: #fecaca;
}

/* Completed game — teal score */
.wb-card[data-completed="1"] .wb-live-pts {
  color: var(--wb-teal-200);
}

/* =========================================
   Game Clock (in card header)
   ========================================= */
.wb-game-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
}

.wb-card.live-active .wb-game-clock {
  display: inline-flex;
  align-items: center;
  color: #fecaca;
}

.wb-card.live-active .wb-game-clock::before {
  content: "●";
  font-size: .7em;
  margin-right: 0.5em;
  margin-bottom: .3em;
  color: #ef4444;
  animation: wb-live-pulse 1.1s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .wb-card.live-active .wb-game-clock::before { animation: none; }
}

.wb-card[data-completed="1"] .wb-game-clock {
  color: var(--wb-teal-200);
}

/* Postponed / suspended / cancelled — red label where the clock text goes */
.wb-card[data-ppd="1"] .wb-game-clock {
  color: #ef4444;
}

.wb-btn {
  border-radius: 0.75rem; /* 12px */
  font-size: 0.875rem; /* 14px */
  padding: 0.5rem 0.75rem; /* 8px 12px */
  line-height: 1;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
  cursor: pointer;
}

.wb-btn-primary {
  background-color: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.90);
  color: var(--theme-text-on-accent, #0a1628);
  font-weight: 600;
  border-color: transparent;
  display: none;
}
.wb-btn-primary:hover {
  background-color: var(--theme-accent-bright, #00F5D4);
}

.wb-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--wb-text);
  border-color: var(--wb-card-border-strong);
}
.wb-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.10);
}

/* Empty / error message */
.wb-empty {
  position: relative;
  z-index: 1;
  color: rgba(226, 232, 240, 0.85);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 1rem;
}

/* =========================================
   Game Lines / Odds Table (v3 Design)
   ========================================= */
.wb-odds-table {
  width: 100%;
  margin-top: 0;
}

/* Odds table column headers — hidden */
.wb-odds-table-header {
  display: none;
}

.wb-odds-team-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: none;
}

.wb-team-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wb-team-logo {
  width: 36px;
  height: 36px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.wb-team-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.wb-logo-fallback {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--wb-text);
}

.wb-card:hover .wb-team-logo {
  background: transparent;
}

.wb-team-details h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.wb-team-details span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.wb-odds-cell {
  text-align: center;
  padding: 8px 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  align-self: stretch;
}

.wb-odds-cell:hover {
  background: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.1);
}

.wb-odds-cell .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wb-odds-cell .juice {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.85);
  margin-top: 2px;
}

/* Settled (final-game) markets — a subtle cell tint shows how the closing line resolved:
   green = hit (cover / winner / O-U side), red = missed, neutral = push. No glyph. */
.wb-odds-cell.settle-win   { background: rgba(34, 197, 94, 0.10); }
.wb-odds-cell.settle-loss  { background: rgba(239, 68, 68, 0.10); }
.wb-odds-cell.settle-push  { background: rgba(148, 163, 184, 0.10); }
/* Settled cells aren't placeable bets — drop the clickable hover affordance. */
.wb-odds-settled .wb-odds-cell { cursor: default; }
.wb-odds-settled .wb-odds-cell:hover { background: rgba(255, 255, 255, 0.02); }
.wb-odds-settled .wb-odds-cell.settle-win:hover  { background: rgba(34, 197, 94, 0.10); }
.wb-odds-settled .wb-odds-cell.settle-loss:hover { background: rgba(239, 68, 68, 0.10); }
.wb-odds-settled .wb-odds-cell.settle-push:hover { background: rgba(148, 163, 184, 0.10); }

/* Card body padding adjustment for odds table */
.wb-card-body.has-odds {
  padding: 0;
}

.wb-card-body.has-odds .wb-odds-table {
  padding: 8px 20px 16px;
}

/* Card footer — hidden */
.wb-card-footer {
  display: none;
}

/* =========================================
   Matchup Header
   ========================================= */
.wb-matchup-header {
  display: block;
  padding: 16px 20px 0px;
}

.wb-matchup-header .wb-card-status {
  margin-top: 6px;
}

.wb-matchup-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(var(--theme-accent-rgb, 0, 211, 189), 0.85);
  line-height: 1.2;
}

.wb-matchup-at {
  font-size: 0.85em;
  font-weight: 400;
  opacity: 0.7;
}

.wb-chevron {
  font-size: 1.4em;
  font-weight: 300;
  margin-left: 2px;
  opacity: 0.7;
  vertical-align: -2px;
}

.wb-matchup-time {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

/* Desktop card header — hidden (replaced by matchup header) */
.wb-card-header {
  display: none;
}

/* Date picker (NBA) */
#date-picker {
  position: relative;
  z-index: 2;
  display: block;
  margin: 1rem auto 0.25rem auto;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.05);
  color: var(--wb-text);
  border: 1px solid var(--wb-card-border-strong);
}
#date-picker:focus {
  outline: none;
  border-color: var(--wb-teal-500);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb, 0, 211, 189), 0.25);
}

/* =========================================
   Schedule Page Header (NFL)
   ========================================= */
.wb-schedule-header {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 0 1rem;
}

.wb-schedule-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--wb-text);
  margin: 0 0 0.25rem 0;
}

.wb-schedule-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.wb-schedule-subtitle strong {
  color: var(--wb-teal-200);
  font-weight: 600;
}

/* =========================================
   Day Sections (NFL grouped by date)
   ========================================= */
.wb-day-section {
  margin-bottom: 1.5rem;
}

.wb-day-section:last-child {
  margin-bottom: 0;
}

.wb-day-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.5rem 0.75rem 0.5rem;
}

.wb-day-label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
}

.wb-day-dot {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
}

.wb-day-date {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

.wb-day-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--wb-card-border) 0%, var(--wb-card-border) 95%, transparent 100%);
  min-width: 2rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.wb-day-count {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  border: 1px solid var(--wb-card-border);
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  .wb-card-glow { transition: none; }
  .wb-btn { transition: none; }
}

@media (min-width: 1001px) {
  .wb-schedule-list {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
  }

  .wb-odds-team-row {
    padding: 5px 0;
  }
}

@media (max-width: 1000px) {
  #schedule-back-button {
    margin-top: 0px;
  }

  /* --- Mobile layout: flat cards, matchup header, no footer --- */

  /* Uniform text: 24px / weight 500 for all card text */
  .wb-matchup-title,
  .wb-matchup-at,
  .wb-matchup-time,
  .wb-matchup-header .wb-game-clock,
  .wb-matchup-header .wb-card-status,
  .wb-odds-cell .value,
  .wb-odds-cell .juice,
  .wb-live-pts,
  .wb-logo-fallback {
    font-size: 24px;
    font-weight: 500;
  }

  .wb-team-details h4{
    font-size: 26px;
  }
  .wb-chevron{
    font-size: 42px;
    font-weight: 400;
    margin-left: 0px;
    opacity: 0.7;
    vertical-align: -4px;
  }

  /* --- Mobile font size overrides --- */

  .wb-matchup-time,
  .wb-matchup-header .wb-game-clock {
    font-size: 20px;
  }

  .wb-card.live-active .wb-game-clock::before {
    font-size: .7em;
    margin-bottom: .1em;
  }

  .wb-odds-team-row {
    grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
    gap: 8px;
  }

  .wb-team-logo {
    width: 48px;
    height: 48px;
  }

  .wb-team-logo img {
    width: 40px;
    height: 40px;
  }

  .wb-odds-cell .value {
    font-size: 22px;
  }

  .wb-odds-cell .juice {
    font-size: 22px;
  }

  /* Schedule header on mobile */
  .wb-schedule-header {
    margin-bottom: 1.75rem;
  }

  .wb-schedule-title {
    font-size: 2.25rem;
  }

  .wb-schedule-subtitle {
    font-size: 1.25rem;
  }

  /* Day sections on mobile */
  .wb-day-section {
    margin-bottom: 2rem;
  }

  .wb-day-header {
    padding-bottom: 1rem;
  }

  .wb-day-label {
    font-size: 1.75rem;
  }

  .wb-day-dot {
    font-size: 1.75rem;
  }

  .wb-day-date {
    font-size: 1.75rem;
  }

  .wb-day-count {
    font-size: 1.125rem;
    padding: 0.5rem 1.25rem;
  }

}