/* ============================================================
   SAS Video Player
   Wraps Video.js. The .sas-video-wrapper <figure> is the unit
   that splitContent() isolates as its own content block.
   ============================================================ */

.sas-video-wrapper {
  margin: 1.5rem 0;
  padding: 0;
}

/* Container div — Video.js injects the player element here. */
.sas-video-player {
  position: relative;
  display: block;
  width: 100%;
}

/* Ensure Video.js fills the container at all viewport widths. */
.sas-video-player .video-js {
  width: 100%;
}

/* ============================================================
   Favicon branding overlay
   Rendered via ::before pseudo-element so it lives in CSS, not
   in the DOM.  The favicon URL and a show-toggle are injected as
   CSS custom properties in the player's inline style attribute by
   the PHP shortcode — this value is part of the raw HTML string
   stored in the starlord content array, so React's
   dangerouslySetInnerHTML preserves it on every re-render without
   any JavaScript DOM manipulation required.

   --sas-vp-show  set to '' (empty string) to activate the element.
                  Default (not set) → content:none → no pseudo-element.
   --sas-favicon-url  url("...") pointing to the favicon image.
   ============================================================ */
.sas-video-player::before {
  content: var(--sas-vp-show, none);
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  background-image: var(--sas-favicon-url, none);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  padding: 2px;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.3s;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .sas-video-player::before {
    width: 22px;
    height: 22px;
    top: 8px;
    left: 8px;
  }
}

/* Fade branding when the user is inactive during playback.
   Video.js manages vjs-user-inactive on its own element; video-player.js
   mirrors it onto the outer .sas-video-player container so this rule works. */
.sas-video-player.vjs-user-inactive.vjs-playing::before {
  opacity: 0;
  transition: opacity 1s;
}

/* ============================================================
   Video title / caption
   ============================================================ */
.sas-video-title {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #555;
  line-height: 1.4;
}
