/* Day Hub — Today tab on the landing hero. Scoped under .day-hub. */

.day-hub {
  background: #06070d;
  color: #fff;
  font-family: inherit;
}

/* ── BAND 1 · Day header strip ───────────────────────────────── */
.day-hub__header {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.06) 0%, rgba(6, 7, 13, 0) 100%);
  border-bottom: 1px solid rgba(74, 222, 128, 0.18);
}
.day-hub__header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
  justify-content: space-between;
}
.day-hub__title-block { min-width: 0; }
.day-hub__kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4ade80;
  margin-bottom: 6px;
}
.day-hub__title {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.day-hub__title-sub {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  margin-left: 6px;
}

.day-hub__meetings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.day-hub__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.20);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.day-hub__chip:hover {
  background: rgba(212, 175, 55, 0.10);
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-1px);
}
.day-hub__chip-course { letter-spacing: 0.02em; }
.day-hub__chip-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.18);
  color: var(--c-gold, #D4AF37);
}
.day-hub__chip--finished {
  opacity: 0.55;
  filter: grayscale(0.4);
}
.day-hub__chip--finished .day-hub__chip-count {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

/* ── BAND 2 · Dual hero cards ────────────────────────────────── */
.day-hub__hero {
  padding: 24px 24px 8px;
}
.day-hub__hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.day-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  overflow: hidden;
}
.day-card--featured {
  border-color: rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.015) 100%);
}
.day-card--next-off {
  border-color: rgba(74, 222, 128, 0.32);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.07) 0%, rgba(74, 222, 128, 0.012) 100%);
}

.day-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.day-card__kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gold, #D4AF37);
}
.day-card__kicker--live { color: #4ade80; }
.day-card__star { color: var(--c-gold, #D4AF37); font-size: 14px; }
.day-card__pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.70);
  animation: day-hub-pulse 1.6s ease-in-out infinite;
}
@keyframes day-hub-pulse {
  0%, 100% { opacity: 1;    transform: scale(1);    }
  50%      { opacity: 0.55; transform: scale(1.30); }
}
.day-card__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.80);
}
.day-card__badge--pinned   { background: rgba(212, 175, 55, 0.18); color: var(--c-gold, #D4AF37); }
.day-card__badge--fallback { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.55); font-style: italic; }
.day-card__badge--live     { background: rgba(239, 68, 68, 0.22);  color: #fca5a5; }

.day-card__time-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.day-card__time {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  font-feature-settings: 'tnum';
}
.day-card__course {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.day-card__name {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.day-card__facts {
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.day-card__facts > div {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  min-width: 78px;
}
.day-card__facts dt {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  margin: 0;
}
.day-card__facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.day-card__facts-fox dt { color: var(--c-gold, #D4AF37); }
.day-card__odds {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(212, 175, 55, 0.16);
  color: var(--c-gold, #D4AF37);
  font-size: 12px;
  font-feature-settings: 'tnum';
}

.day-card__cta {
  align-self: flex-start;
  margin-top: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--c-gold, #D4AF37);
  color: #06070d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: filter 0.15s, transform 0.15s;
}
.day-card--next-off .day-card__cta { background: #4ade80; }
.day-card__cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.day-card__cta--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.20);
}
.day-card__cta--ghost:hover { background: rgba(255, 255, 255, 0.05); }
.day-card__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
}

/* Inline countdown for Next Off card. */
.day-hub-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  font-feature-settings: 'tnum';
  margin-top: 4px;
  align-self: flex-start;
}
.day-hub-cd__unit { display: inline-flex; flex-direction: column; align-items: center; min-width: 32px; }
.day-hub-cd__num  { font-size: 18px; font-weight: 800; color: #4ade80; line-height: 1; }
.day-hub-cd__lbl  { font-size: 8px;  font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: rgba(255, 255, 255, 0.50); margin-top: 2px; }
.day-hub-cd__sep  { font-size: 16px; font-weight: 700; color: rgba(74, 222, 128, 0.55); }

/* ── BAND 3 · Race grid ─────────────────────────────────────── */
.day-hub__grid-section { padding: 18px 24px 24px; }
.day-hub__grid-inner   { max-width: 1240px; margin: 0 auto; }

.day-hub__grid-head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.day-hub__grid-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
}
.day-hub__filters { display: flex; gap: 6px; flex-wrap: wrap; }
.day-hub__filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.70);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.day-hub__filter:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.day-hub__filter.is-active {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--c-gold, #D4AF37);
  color: #fff;
}
.day-hub__filter-n {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
}
.day-hub__filter.is-active .day-hub__filter-n { background: rgba(212, 175, 55, 0.30); color: #fff; }

/* Picker-tile overrides for the day hub. We adopt the racecards
   picker's .rp-meeting / .rp-race look directly and only extend it
   with the extra states (live, fox, featured) the picker doesn't ship. */
.day-hub__rp-grid { margin-top: 4px; }
.day-hub__rp-meeting.is-finished { opacity: 0.72; }
.day-hub__rp-meeting.is-hidden    { display: none; }

/* Meeting-name link — routes to /races/meeting/<slug>/<date>/full/.
   Subtle by default (inherits the .rp-meeting__name display-serif),
   gold-tinted on hover with a sliding arrow so it reads as clickable. */
.day-hub__meeting-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  transition: color 0.15s;
}
.day-hub__meeting-link:hover { color: var(--c-gold, #D4AF37); }
.day-hub__meeting-link:focus-visible {
  color: var(--c-gold, #D4AF37);
  outline: 2px solid var(--c-gold, #D4AF37);
  outline-offset: 3px;
  border-radius: 3px;
}
.day-hub__meeting-link-arrow {
  font-size: 0.7em;
  font-weight: 500;
  color: var(--c-gold, #D4AF37);
  opacity: 0.45;
  transform: translateX(0);
  transition: opacity 0.15s, transform 0.15s;
}
.day-hub__meeting-link:hover .day-hub__meeting-link-arrow,
.day-hub__meeting-link:focus-visible .day-hub__meeting-link-arrow {
  opacity: 1;
  transform: translateX(3px);
}

.day-hub__rp-race[hidden] { display: none; }

.rp-race--live {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.06);
}
.rp-race--featured {
  border-color: rgba(212, 175, 55, 0.40);
  background: rgba(212, 175, 55, 0.05);
}
.rp-race__badge--live {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.40);
}
.rp-race__badge--result {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.rp-race__badge--fox {
  background: rgba(212, 175, 55, 0.18);
  color: var(--c-gold, #D4AF37);
  border: 1px solid rgba(212, 175, 55, 0.35);
  font-size: 12px;
  padding: 1px 6px;
  cursor: help;
}

.day-hub__empty-filter {
  text-align: center;
  padding: 20px 0;
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
}

/* ── BAND 4 · Movers ──────────────────────────────────────── */
.day-hub__movers { padding: 0 24px 16px; }
.day-hub__movers-inner { max-width: 1240px; margin: 0 auto; }

/* ── Whole-day empty state ────────────────────────────────── */
.day-hub__empty {
  padding: 60px 24px 80px;
  text-align: center;
}
.day-hub__empty-inner { max-width: 480px; margin: 0 auto; }
.day-hub__empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.day-hub__empty-title {
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  color: var(--c-gold, #D4AF37);
}
.day-hub__empty-text { margin: 0; color: rgba(255, 255, 255, 0.65); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 880px) {
  .day-hub__hero-inner { grid-template-columns: 1fr; }
  .day-row__link {
    grid-template-columns: 56px 1fr 100px;
    grid-template-areas:
      "time course status"
      "time name   name"
      ".    fav    runners";
    row-gap: 4px;
  }
  .day-row__time     { grid-area: time;    font-size: 18px; }
  .day-row__course   { grid-area: course; }
  .day-row__name     { grid-area: name; white-space: normal; }
  .day-row__fav      { grid-area: fav;  font-size: 12px; }
  .day-row__runners  { grid-area: runners; text-align: right; }
  .day-row__status   { grid-area: status; }
}
@media (max-width: 480px) {
  .day-hub__header-inner { padding: 14px 16px 12px; }
  .day-hub__hero         { padding: 14px 16px 4px; }
  .day-card              { padding: 16px 16px 14px; }
  .day-hub__grid-section { padding: 12px 16px 16px; }
}

/* ── Mobile-only accordion for the meetings list ─────────────
   Desktop keeps every meeting open by default — the toggle button
   is hidden. On mobile, races collapse under their meeting header
   and the chevron toggles them open. Course-name link still routes
   to /meeting_full/; the chevron is the dedicated expand target. */
.day-hub__meeting-toggle {
  display: none;     /* desktop hides it; mobile media-query unhides */
  margin-left: auto;
  align-self: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  color: var(--c-gold, #D4AF37);
  font: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.day-hub__meeting-toggle:hover,
.day-hub__meeting-toggle:focus-visible {
  background: rgba(212, 175, 55, 0.10);
  border-color: var(--c-gold, #D4AF37);
  outline: none;
}
.day-hub__meeting-toggle-chev {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.2s ease;
}
[aria-expanded="true"] .day-hub__meeting-toggle-chev { transform: rotate(180deg); }

@media (max-width: 720px) {
  /* Show the toggle and make the header lay out cleanly with it. */
  .day-hub__meeting-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .rp-meeting__head {
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  /* Meeting sub line takes remaining width, leaves room for the chevron. */
  .rp-meeting__sub { width: auto; flex: 0 0 auto; }

  /* Collapse the races list by default on mobile; expand when the
     parent meeting carries .is-open (toggled by JS). */
  .day-hub__rp-meeting .rp-races {
    display: none;
    margin-top: 10px;
  }
  .day-hub__rp-meeting.is-open .rp-races {
    display: grid;
  }
}
