/* ===================================================================
   Plyr Brand Theme
   Overrides Plyr CSS custom properties to use Staffoak brand colors.
   Must be loaded AFTER plyr.css.
   Brand palette is defined in main.css as --brand-royal (#3A7CA8) etc.
   =================================================================== */

:root {
  /* Primary brand color — used for play/scrub/selection accents */
  --plyr-color-main: var(--brand-royal);

  /* Hover state for the main color */
  --plyr-color-main-hover: var(--brand-sapphire);

  /* Video background */
  --plyr-video-background: #000;

  /* Modal / fullscreen */
  --plyr-modal-bg: rgba(0, 0, 0, 0.8);

  /* Controls background — semi-transparent dark overlay */
  --plyr-control-bg: rgba(0, 0, 0, 0.5);

  /* Text / icon color in controls */
  --plyr-control-icon: #fff;
  --plyr-control-color: #fff;

  /* Tooltip colors */
  --plyr-tooltip-bg: rgba(27, 42, 74, 0.9); /* brand-navy */
  --plyr-tooltip-color: #fff;

  /* Progress bar */
  --plyr-progress-track-bg: rgba(255, 255, 255, 0.2);
  --plyr-progress-filled-bg: var(--brand-royal);
  --plyr-progress-checked-bg: var(--brand-royal);
  --plyr-progress-circle: #fff;

  /* Volume slider */
  --plyr-volume-slider-bg: rgba(255, 255, 255, 0.2);
  --plyr-volume-slider-fill: var(--brand-royal);

  /* Captions */
  --plyr-captions-bg: rgba(0, 0, 0, 0.8);
  --plyr-captions-color: #fff;

  /* Focus ring for keyboard navigation */
  --plyr-focus-visible-color: var(--brand-royal);

  /* Scrubber thumb */
  --plyr-range-thumb-background: var(--brand-royal);
}

/* Ensure the Plyr wrapper integrates with the existing layout */
.plyr-wrapper {
  border-radius: 8px;
  overflow: hidden;
  background: var(--plyr-video-background);
}

/* Force brand color on hover state of control buttons */
.plyr__control:hover,
.plyr__control:focus {
  background-color: var(--plyr-color-main);
  color: #fff;
}

/* Play button (the big center one) uses brand color */
.plyr__play-inner {
  fill: #fff;
}

.plyr__play > button {
  background: var(--brand-royal);
}

.plyr__play > button:hover {
  background: var(--brand-sapphire);
}

/* Responsive video-embed wrapper (used by partials/video-embed.php) */
.plyr__video-embed {
  position: relative;
  width: 100%;
  background: var(--plyr-video-background);
  border-radius: 8px;
  overflow: hidden;
}

.plyr__video-embed.aspect-16-9 {
  padding-bottom: 56.25%;
}

.plyr__video-embed.aspect-4-3 {
  padding-bottom: 75%;
}

.plyr__video-embed > :first-child,
.plyr__video-embed iframe,
.plyr__video-embed video,
.plyr__video-embed > div {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
