/* ── FFI Ticker v4 ─────────────────────────────────────────────────────────
   Single-row wipe/expand ticker.

   Structure (one 44px row):
     [FFI badge] | [stage: queue pills slide in → expand bar wipes over them]

   Behavior:
     • Category pills queue slides in from the right
     • Leftmost pill is the active category — queue pauses
     • Expand bar wipes left → right across the full stage, covering all pills
     • Active category label + content text appear inside the bar
     • Multi-item sections cross-fade content within the open bar
     • Bar wipes right → left (collapses toward the label), revealing dark stage
     • Queue rotates: active moves to end, next category becomes first
     • Repeat — feels like an ESPN BottomLine lower-third graphic
   ──────────────────────────────────────────────────────────────────────────── */

/* ══ Outer container ════════════════════════════════════════════════════════ */
#ffi-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 44px;
  display: flex;
  align-items: stretch;
  background: #0c1910;
  border-top: 2px solid rgba(201, 168, 76, 0.5);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.65);
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: content-box;
}

/* ══ Gold "FFI" badge — left anchor ════════════════════════════════════════ */
#ffi-badge {
  flex-shrink: 0;
  background: #c9a84c;
  color: #06100a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 0 14px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 3;
}

/* Right-pointing chevron on badge */
#ffi-badge::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 10px solid #c9a84c;
  z-index: 4;
}

/* ══ Stage — clips both the queue and the expand overlay ═══════════════════ */
#ffi-stage {
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ══ Category-label pill queue ══════════════════════════════════════════════ */
/* All pills in a horizontal flex row; JS drives translateX to slide them in. */
#ffi-queue {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  /* transform and transition set entirely by JS */
}

.ffi-pill {
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-right: 1px solid rgba(201, 168, 76, 0.15);
  white-space: nowrap;
  cursor: default;
  /* color set per-position by JS: first pill brighter, rest dimmer */
  color: rgba(245, 240, 232, 0.30);
}

/* ══ Expand overlay bar ═════════════════════════════════════════════════════ */
/* Sits on top of the queue via z-index + clip-path.
   clip-path is driven entirely by JS (wipe-in / wipe-out).
   Default: fully clipped so it's invisible until JS expands it.        */
#ffi-expand {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0c1910;
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 2;
  clip-path: inset(0 100% 0 0); /* hidden by default; JS overrides */
  /* transition set by JS on each wipe */
}

/* Category label inside the expand bar (e.g. "NEXT STOP") */
#ffi-expand-label {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c9a84c;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(201, 168, 76, 0.3);
  white-space: nowrap;
}

/* Main content text */
#ffi-expand-content {
  flex: 1;
  min-width: 0;
  padding: 0 18px;
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 0.3px;
  color: rgba(245, 240, 232, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* opacity and transition set entirely by JS */
  opacity: 0;
}

#ffi-expand-content a {
  color: inherit;
  text-decoration: none;
}

#ffi-expand-content a:hover {
  color: #c9a84c;
}

#ffi-expand-content a:focus-visible {
  outline: 1px solid rgba(201, 168, 76, 0.5);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ══ Mobile ════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  #ffi-ticker {
    height: 40px;
  }

  #ffi-badge {
    font-size: 10px;
    padding: 0 10px;
    letter-spacing: 2px;
  }

  #ffi-badge::after {
    right: -8px;
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 8px;
  }

  .ffi-pill {
    font-size: 9.5px;
    padding: 0 12px;
    letter-spacing: 1.6px;
  }

  #ffi-expand-label {
    font-size: 9.5px;
    padding: 0 10px;
    letter-spacing: 1.6px;
  }

  #ffi-expand-content {
    font-size: 15px;
    padding: 0 10px;
  }
}

/* ══ Reduced motion — JS also checks this; belt-and-suspenders here ════════ */
@media (prefers-reduced-motion: reduce) {
  #ffi-queue,
  #ffi-expand,
  #ffi-expand-content {
    transition: none !important;
  }
}
