/**
 * ============================================================================
 * FOXYBETTING LIVE-ENGINE.CSS: Zero-CLS Layout Rules, Mechanical Odometer & Ticker
 * ============================================================================
 * Strict Core Web Vitals (CLS = 0.00) Enforcement
 * GPU Composite Translation: transform translate3d(0, -Y%, 0)
 * Brand Tokens: #c5f82a / #c3f400 neon lime, #090d0b dark slate canvas
 * ============================================================================
 */

:root {
  --fb-lime: #c5f82a;
  --fb-lime-glow: #c3f400;
  --fb-surface: #090d0b;
  --live-surface: #090d0b;
  --live-accent: #c5f82a;
  --live-accent-glow: #c3f400;
  --live-border: rgba(197, 248, 42, 0.15);
  --live-text: #ffffff;
  --live-muted: #8b949e;
}

/* ── 1. Zero CLS Typographic & Layout Invariants ───────────────────────────── */
.odometer-slot,
.scoreline,
.fb-score-slot,
.fb-score-wrap,
[data-live-score],
[data-live-clock] {
  font-variant-numeric: tabular-nums lining-nums;
  -moz-font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-feature-settings: "tnum" 1, "lnum" 1;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

[data-live-match],
.fb-matches-table tr,
.fb-match-card,
.fb-page-hero {
  contain: layout style;
}

[data-live-score],
.fb-score-slot {
  display: inline-block;
  min-width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  contain: strict;
}

[data-live-clock] {
  display: inline-block;
  min-width: 52px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  contain: layout style size;
}

[data-live-status] {
  display: inline-block;
  min-width: 72px;
  text-align: center;
  flex-shrink: 0;
}

/* ── 2. Mechanical Slot-Machine Odometer Reel ──────────────────────────────── */
.odometer-slot {
  display: inline-block;
  width: 1.1ch;
  height: 1.4em;
  overflow: hidden;
  position: relative;
  vertical-align: middle;
  contain: strict;
}

.odometer-reel {
  display: flex;
  flex-direction: column;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  transition: transform 500ms cubic-bezier(0.23, 1, 0.32, 1);
}

.odometer-reel span {
  display: block;
  height: 1.4em;
  line-height: 1.4em;
  text-align: center;
}

/* ── 3. Neon Accent Pulse Flash on Score Increment ─────────────────────────── */
.odometer-pulse-neon {
  animation: odometer-neon-flare 500ms ease-out;
}

@keyframes odometer-neon-flare {
  0% {
    color: #c5f82a;
    text-shadow: 0 0 12px #c3f400, 0 0 20px rgba(197, 248, 42, 0.8);
    transform: scale(1.08);
  }
  50% {
    color: #c5f82a;
    text-shadow: 0 0 8px #c3f400;
    transform: scale(1.04);
  }
  100% {
    color: inherit;
    text-shadow: none;
    transform: scale(1);
  }
}

/* ── 4. Accessibility: Reduced Motion Compliance ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .odometer-reel {
    transition: none !important;
    animation: none !important;
  }
  .odometer-pulse-neon {
    animation: none !important;
  }
  .live-ticker-track,
  .fb-ticker-track {
    animation: none !important;
  }
}

/* ── 5. Sub-Header Sticky Live Ticker Marquee ──────────────────────────────── */
.fb-live-ticker,
.live-ticker-sticky {
  position: sticky;
  top: var(--header-height, 68px);
  z-index: 25;
  height: 48px;
  min-height: 48px;
  background: var(--live-surface, #090d0b);
  border-bottom: 1px solid rgba(197, 248, 42, 0.15);
  overflow: hidden;
  contain: layout style;
  transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
}

.fb-live-ticker.is-empty,
.live-ticker-sticky.is-empty {
  height: 0;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.live-ticker-track,
.fb-ticker-track {
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  will-change: transform;
  animation: live-ticker-marquee 25s linear infinite;
}

/* Marquee Hover and Keyboard Focus Pause Controls */
.live-ticker-track:hover,
.fb-ticker-track:hover,
.live-ticker-sticky:hover .live-ticker-track,
.fb-live-ticker:hover .fb-ticker-track,
.live-ticker-track:focus-within,
.fb-ticker-track:focus-within {
  animation-play-state: paused;
}

@keyframes live-ticker-marquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* ── 6. Responsive Viewports & Touch Targets (WCAG >=44px) ────────────────── */
.live-ticker-card,
.fb-live-ticker-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.card-stream-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
