/* ===========================
   PLYR: Vertical volume popover (clean)
   - Slider pops UP above volume icon
   - No layout spill below the video
   - Stable hover (no disappearing)
   =========================== */

/* Keep the player layout normal */
.plyr {
  overflow: hidden; /* keep video/card clean */
}

/* Allow only the controls bar to show the popover */
.plyr__controls {
  overflow: visible !important;
}

/* Anchor for popover */
.plyr__controls .plyr__volume {
  position: relative;
  width: auto;
  padding: 0;
  margin: 0 6px;
}

/* Invisible hover bridge ABOVE the volume button (inside controls) */
.plyr__controls .plyr__volume::before {
  content: "";
  position: absolute;
  left: -16px;
  right: -16px;
  top: -140px;     /* extend upward */
  height: 140px;
  z-index: 5;      /* enough for hover, below slider */
  background: transparent;
  pointer-events: auto;
}

/* Slider (kept in DOM, hidden via opacity) */
.plyr__controls .plyr__volume input[type="range"] {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);

  /* width=80px => move up by 40px so it sits fully above */
  transform: translateX(-50%) translateY(-40px) rotate(-90deg);
  transform-origin: center;

  width: 80px;
  height: 6px;

  z-index: 10;
  background: transparent;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

/* Show popover on hover/focus */
.plyr__controls .plyr__volume:hover input[type="range"],
.plyr__controls .plyr__volume:focus-within input[type="range"] {
  opacity: 1;
  pointer-events: auto;
}

/* Give progress bar more space */
.plyr__controls .plyr__progress {
  flex: 1 1 auto;
  min-width: 0;
}
