/* Captions are presentational; player controls and linked video cards own input. */
.wpf-caption-overlay,
.wpf-caption-overlay * {
  pointer-events: none !important;
}

/* The vendor wildcard restores pointer handling on buffering descendants. */
.fts-nextgen-player-ui .wpf-buffering-overlay,
.fts-nextgen-player-ui .wpf-buffering-overlay * {
  pointer-events: none !important;
}

/* FTS: keep stacked caption cues from overlapping in live embeds. */
.wpf-caption-overlay {
  gap: 0.2em;
}

.wpf-caption-overlay .wpf-caption-label:not(.wpf-caption-label--grid) {
  line-height: 1.45 !important;
  margin: 0.18em 0 !important;
}

.wpf-caption-overlay .wpf-caption-label--cea608,
.wpf-caption-overlay .wpf-caption-label--grid.wpf-caption-label--cea608 {
  line-height: 1.3 !important;
  padding: 0.08em 0.22em !important;
}

/* Keep the custom live title in the same auto-hide lifecycle as Next Gen controls.
   Compact / narrow embeds (home Doomsday, article) register fts-live-title-small|micro
   (and may still report vendor smallScreen|microScreen). FTSWB-5784 used a more
   specific desktop opacity:1 rule, so idle-hide must match that specificity.
   The host center pause hit-target is not WPF chrome and must not keep the title. */
.wpf-live-title {
  opacity: 0;
  transition: opacity var(--wpf-transition-speed) ease;
}

.wpf-player-ui.wpf-controls-visible .wpf-live-title,
.fts-nextgen-player-ui[data-layout='fts-live-title-small'].wpf-controls-visible .wpf-live-title,
.fts-nextgen-player-ui[data-layout='fts-live-title-micro'].wpf-controls-visible .wpf-live-title,
.fts-nextgen-player-ui[data-layout='smallScreen'].wpf-controls-visible .wpf-live-title,
.fts-nextgen-player-ui[data-layout='microScreen'].wpf-controls-visible .wpf-live-title {
  opacity: 1;
}

.wpf-player-ui:not(.wpf-controls-visible) .wpf-live-title,
.fts-nextgen-player-ui[data-layout='fts-live-title-small']:not(.wpf-controls-visible) .wpf-live-title,
.fts-nextgen-player-ui[data-layout='fts-live-title-micro']:not(.wpf-controls-visible) .wpf-live-title,
.fts-nextgen-player-ui[data-layout='smallScreen']:not(.wpf-controls-visible) .wpf-live-title,
.fts-nextgen-player-ui[data-layout='microScreen']:not(.wpf-controls-visible) .wpf-live-title {
  opacity: 0 !important;
}

/*
 * Mobile web must not show compact title overlays at normal size (FTSWB-5923 / prod parity).
 * The breakpoint matches utils/responsive.js isMobile() (< 768); coarse pointers
 * keep mobile landscape layouts hidden when their viewport is wider
 * (coarse + landscape only, so desktop touch screens are unaffected).
 */
@media (max-width: 767.999px), (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .fts-nextgen-player-ui[data-layout='fts-live-title-small'] .wpf-live-title,
  .fts-nextgen-player-ui[data-layout='fts-live-title-micro'] .wpf-live-title {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wpf-live-title {
    transition: none;
  }
}
