/*
 * HOLIDAY CHANNEL player (.hcp-*) and the 24/7 channel page (.hcc-*).
 * player.js adds this stylesheet itself when the page doesn't link it.
 * The player frame is always dark; the channel bar takes the page's colors.
 */

.hcp,
.hcc {
  /* The site's tokens when present (site.css), else the logo's teal. */
  --hcp-accent: var(--accent, #66c0ce);
  --hcp-focus: var(--focus, #66c0ce);
  --hcp-on-accent: var(--accent-ink, #00262b);
  --hcp-fg: #ffffff;
  --hcp-scrim: rgba(0, 0, 0, 0.6);
  --hcp-panel: rgba(0, 0, 0, 0.82);
}

.hcp {
  position: relative;
  width: 100%;
  color: var(--hcp-fg);
  outline: none;
}

.hcp [hidden],
.hcc [hidden] {
  display: none !important;
}

.hcp-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: 8px;
}

/* Inside the site's .player-frame, the frame already has the border and corners. */
.player-frame .hcp-frame {
  border-radius: 0;
}

@supports not (aspect-ratio: 16 / 9) {
  .hcp-frame {
    height: 0;
    padding-top: 56.25%;
  }
}

.hcp-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* The mark and the silent badge, top left (the burned-in bug sits elsewhere).
   A soft scrim keeps the mark readable over bright frames, and the strip sits
   above the message panels so the mark stays visible on every screen. */
.hcp-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem 1.6rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.hcp[data-state="message"] .hcp-badge,
.hcp[data-state="card"] .hcp-top {
  display: none;
}

.hcp-mark,
.hcp-card-mark {
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

.hcp-mark {
  font-size: clamp(0.72rem, 1.5vw, 0.95rem);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  opacity: 0.92;
  transition: opacity 0.3s;
}

.hcp-mark-accent {
  color: var(--hcp-accent);
}

.hcp-mark-reg {
  font-size: 0.65em;
  vertical-align: super;
  margin-left: 0.1em;
}

.hcp-badge {
  font-size: clamp(0.68rem, 1.3vw, 0.8rem);
  font-weight: 600;
  line-height: 1.2;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: var(--hcp-scrim);
  white-space: nowrap;
  transition: opacity 0.3s;
}

.hcp[data-state="playing"]:not(.hcp-controls-on) .hcp-mark {
  opacity: 0.6;
}

.hcp[data-state="playing"]:not(.hcp-controls-on) .hcp-badge {
  opacity: 0;
}

/* Big play button */
.hcp-bigplay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--hcp-fg);
  cursor: pointer;
}

.hcp-bigplay .hcp-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-left: 0.3rem;
}

.hcp-bigplay:hover {
  border-color: var(--hcp-accent);
  background: rgba(0, 0, 0, 0.78);
}

.hcp[data-state="ready"] .hcp-bigplay,
.hcp[data-state="blocked"] .hcp-bigplay,
.hcp[data-state="ended"] .hcp-bigplay {
  display: flex;
}

/* Loading */
.hcp-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: none;
  width: 3rem;
  height: 3rem;
  margin: -1.5rem 0 0 -1.5rem;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--hcp-accent);
  border-radius: 50%;
  pointer-events: none;
  animation: hcp-spin 0.9s linear infinite;
}

.hcp[data-state="loading"] .hcp-spinner,
.hcp[data-state="playing"][data-buffering] .hcp-spinner {
  display: block;
}

@keyframes hcp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Controls */
.hcp-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 2.75rem 0.75rem 0.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.hcp.hcp-controls-on .hcp-controls,
.hcp[data-state="paused"] .hcp-controls,
.hcp[data-state="ended"] .hcp-controls {
  opacity: 1;
  pointer-events: auto;
}

.hcp[data-state="ready"] .hcp-controls,
.hcp[data-state="loading"] .hcp-controls,
.hcp[data-state="blocked"] .hcp-controls,
.hcp[data-state="message"] .hcp-controls,
.hcp[data-state="card"] .hcp-controls {
  display: none;
}

.hcp[data-state="playing"]:not(.hcp-controls-on) .hcp-video {
  cursor: none;
}

.hcp-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.hcp-spacer {
  flex: 1 1 auto;
}

.hcp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--hcp-fg);
  cursor: pointer;
}

.hcp-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hcp-btn:disabled {
  opacity: 0.5;
  cursor: default;
  background: transparent;
}

.hcp-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.hcp-time {
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hcp-seek,
.hcp-volume {
  accent-color: var(--hcp-accent);
  cursor: pointer;
}

.hcp-seek {
  display: block;
  width: 100%;
  height: 1.5rem;
  margin: 0 0 0.25rem;
}

.hcp-volume {
  width: 6rem;
}

.hcp-volume:disabled {
  opacity: 0.5;
  cursor: default;
}

.hcp-volume-fixed .hcp-volume {
  display: none;
}

.hcp :focus-visible {
  outline: 3px solid var(--hcp-focus);
  outline-offset: 2px;
}

.hcp-bigplay:focus-visible {
  outline-offset: 4px;
}

/* Panels: messages, the channel's station card, and the idle prompt */
.hcp-panel {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--hcp-panel);
  text-align: center;
}

.hcp[data-state="message"] .hcp-message,
.hcp[data-state="card"] .hcp-card,
.hcp-idle {
  display: flex;
}

.hcp-card {
  background: radial-gradient(circle at 50% 40%, #12343a 0%, #000 75%);
}

.hcp-panel p {
  margin: 0;
}

.hcp-panel-title {
  max-width: 36rem;
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  font-weight: 700;
}

.hcp-panel-text {
  max-width: 36rem;
  opacity: 0.9;
}

.hcp-card-mark {
  margin-bottom: 0.5rem;
  font-size: clamp(1.3rem, 4.2vw, 2.6rem);
}

.hcp-card-kicker {
  color: var(--hcp-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hcp-card-title {
  font-size: clamp(1rem, 2.6vw, 1.6rem);
  font-weight: 700;
}

.hcp-card-detail {
  opacity: 0.85;
}

.hcp-action {
  margin-top: 0.5rem;
  padding: 0.65rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--hcp-accent);
  color: var(--hcp-on-accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hcp-action:hover {
  background: #8fd3dd;
}

.hcp-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Fullscreen: the whole player, mark and controls included */
.hcp.hcp-is-fullscreen,
.hcp:fullscreen {
  width: 100%;
  height: 100%;
  background: #000;
}

.hcp.hcp-is-fullscreen .hcp-frame,
.hcp:fullscreen .hcp-frame {
  height: 100%;
  aspect-ratio: auto;
  padding-top: 0;
  border-radius: 0;
}

@media (max-width: 600px) {
  .hcp-volume {
    display: none;
  }

  .hcp-controls {
    padding: 1.25rem 0.5rem 0.25rem;
  }

  .hcp-time {
    padding: 0 0.25rem;
    font-size: 0.8rem;
  }

  .hcp-top {
    padding: 0.5rem 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hcp-spinner {
    animation-duration: 2.4s;
  }

  .hcp-controls,
  .hcp-mark,
  .hcp-badge {
    transition: none;
  }
}

/* 24/7 channel page: the player full-bleed, then the Now / Next bar */
.hcc {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
}

.hcc-bar,
.hcc-status,
.hcc-error {
  padding: 0 0.9rem;
}

.hcc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
}

.hcc-slot {
  display: flex;
  flex: 1 1 14rem;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent, #66c0ce);
}

.hcc-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hcc-title {
  font-weight: 700;
}

.hcc-when {
  font-size: 0.9rem;
  opacity: 0.85;
}

.hcc-back {
  flex: 0 0 auto;
  padding: 0.6rem 1.2rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hcc-back:focus-visible {
  outline: 3px solid var(--focus, #66c0ce);
  outline-offset: 2px;
}

.hcc .hcp-action:focus-visible {
  outline: 3px solid var(--hcp-focus);
  outline-offset: 2px;
}

.hcc-status {
  min-height: 1.4em;
  margin: 0;
  opacity: 0.85;
}

.hcc-error {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
}

.hcc-error p {
  margin: 0;
}
