/**
 * gd-yt-player.css — Genre Dive (genredive-child)
 * Styles for the YouTube-hosted episode player path (BUI-129).
 *
 * Enqueued only on episode pages that take the YouTube branch. Everything
 * here is additive: the band reuses the theme's .player / .play / .pbar /
 * .plabel rules from site.css, and only the pieces that do not exist on
 * the Mixcloud path are defined below. No rule in this file changes the
 * rendering of a Mixcloud episode page.
 *
 * Colour: signal-red #D8453F (--accent) is the dark-ground red per the
 * Brand & Design Standard; #C13B35 is the paper-ground text red and is
 * not used on the feature band. Track/thumb greys use --faint, which is
 * the ladder's dark-ground grey (5.1:1 on ink; Brand Standard §1).
 */

/* ------------------------------------------------------------------ */
/*  Hero cover slot: the visible YouTube player lives here             */
/* ------------------------------------------------------------------ */
.gd-yt-stage {
  position: relative;
  /* The wrapper takes the cover's own box; the cover inside is untouched. */
}

/* Created by gd-yt-player.js on first play. Sits over the artwork at the
 * cover's full size. Never below YouTube's 200×200 floor — the hero cover is
 * 360×360 on desktop and full-width at 760px, but the floor is enforced here
 * too so a future cover resize cannot silently breach it. */
.gd-yt-stage .gd-yt-frame {
  position: absolute;
  inset: 0;
  min-width: 200px;
  min-height: 200px;
  background: #000;
  border-radius: inherit;
  overflow: hidden;
}
.gd-yt-stage .gd-yt-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------------------------------------------------ */
/*  Band: play control                                                 */
/*  .play is a <span> on the Mixcloud fallback; here it is a <button>. */
/*  Strip the UA button chrome so the theme's .player .play rule wins. */
/* ------------------------------------------------------------------ */
.player.gd-yt button.play {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  margin: 0;
  font: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.player.gd-yt button.play:focus-visible {
  outline: 2px solid var(--accent, #D8453F);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/*  Band: progress track (does not exist on the Mixcloud path)         */
/* ------------------------------------------------------------------ */
.player.gd-yt .pbar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.player.gd-yt .gd-yt-track {
  position: relative;
  display: block;
  height: 4px;
  margin: 10px 0 8px;
  border-radius: 2px;
  background: var(--faint, #85847E);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Larger hit area than the 4px visual, without moving anything. */
.player.gd-yt .gd-yt-track::before {
  content: '';
  position: absolute;
  inset: -10px 0;
}
.player.gd-yt .gd-yt-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 2px;
  background: var(--accent, #D8453F);
  pointer-events: none;
}
.player.gd-yt .gd-yt-fill::after {
  /* scrub thumb */
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent, #D8453F);
  transform: translate(50%, -50%);
  opacity: 0;
  transition: opacity .15s ease;
}
.player.gd-yt .gd-yt-track:hover .gd-yt-fill::after,
.player.gd-yt .gd-yt-track:focus-visible .gd-yt-fill::after,
.player.gd-yt.is-playing .gd-yt-fill::after {
  opacity: 1;
}
.player.gd-yt .gd-yt-track:focus-visible {
  outline: 2px solid var(--accent, #D8453F);
  outline-offset: 6px;
}

/* ------------------------------------------------------------------ */
/*  Band: status + time line                                           */
/*  .plabel keeps the theme's type treatment; only the layout is new.  */
/* ------------------------------------------------------------------ */
.player.gd-yt .plabel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.player.gd-yt .gd-yt-time {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.player.gd-yt .gd-yt-status a {
  color: inherit;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .player.gd-yt .gd-yt-fill::after { transition: none; }
}
