/* ─────────────────────────────────────────────────────────────────────────
   Football Intelligence — LIVE matches ticker
   Faza 5.17.c-fix

   Sticky strip under the header. Auto-scrolling marquee of live matches.
   reduced-motion → animation off, manual horizontal scroll instead.
   ───────────────────────────────────────────────────────────────────────── */

#fi-live-ticker {
  position: sticky;
  top: 55px;                 /* below the 55px header (60px ≥768px handled below) */
  z-index: 49;               /* just under the header's --z-sticky (50) */
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 12px;
  background: rgba(8, 12, 16, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
@media (min-width: 768px) {
  #fi-live-ticker { top: 60px; }
}

.fi-ticker__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--system-red, #ff2f54);
  text-transform: uppercase;
}
.fi-ticker__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--system-red, #ff2f54);
  box-shadow: 0 0 6px var(--system-red, #ff2f54);
  animation: fi-ticker-pulse 1.6s ease-in-out infinite;
}
@keyframes fi-ticker-pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }

.fi-ticker__viewport {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.fi-ticker__track {
  display: flex;
  width: max-content;
  animation: fi-ticker-scroll var(--fi-ticker-dur, 30s) linear infinite;
}
.fi-ticker__run { display: flex; }
@keyframes fi-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
#fi-live-ticker:hover .fi-ticker__track { animation-play-state: paused; }

/* Karol QA: few live matches that fit on screen — the JS adds .fi-ticker--static
   (single run, no marquee). No animation and no edge-fade mask so they read as a
   calm static strip instead of a needlessly-scrolling one. */
#fi-live-ticker.fi-ticker--static .fi-ticker__track {
  animation: none;
  width: auto;
}
#fi-live-ticker.fi-ticker--static .fi-ticker__viewport {
  -webkit-mask-image: none;
          mask-image: none;
}

.fi-ticker__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 38px;
  white-space: nowrap;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12.5px;
  border-right: 1px solid var(--divider);
  transition: color 150ms ease, background 150ms ease;
}
.fi-ticker__chip:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.fi-ticker__chip img { object-fit: contain; flex: 0 0 auto; }
.fi-ticker__clock {
  color: var(--system-red, #ff2f54);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  min-width: 30px;
}
.fi-ticker__team { font-weight: 500; }
.fi-ticker__score {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  padding: 0 2px;
}

@media (prefers-reduced-motion: reduce) {
  .fi-ticker__track { animation: none; }
  .fi-ticker__dot { animation: none; }
  .fi-ticker__viewport { overflow-x: auto; scrollbar-width: none; }
  .fi-ticker__viewport::-webkit-scrollbar { display: none; }
  /* With no marquee, the duplicate run is redundant — hide it */
  .fi-ticker__run[aria-hidden="true"] { display: none; }
}
