/* twoplus11.com: video player styles
   ─────────────────────────────────────────────────────────────────────────
   Paired with video.js. Provides:
     - Pause/play overlay on inline videos
     - Expand badge (open video lightbox)
     - The vlb (video lightbox) fullscreen overlay with transport bar
   Tokens come from the page's palette, with safe fallbacks. */

/* ── Pause / play overlay ──────────────────────────────────────────────── */
.vid-ctl {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s ease;
  z-index: 2;
}
/* Show on hover (desktop) */
.vid-ctl:hover,
.vid-ctl:focus-visible {
  opacity: 1;
}
/* Always show play icon when paused */
.vid-wrap--paused .vid-ctl {
  opacity: 1;
}
/* On touch devices, show play when paused, hide pause overlay */
@media (hover: none) {
  .vid-ctl { opacity: 0; }
  .vid-wrap--paused .vid-ctl { opacity: 1; }
}

/* ── Expand badge ──────────────────────────────────────────────────────── */
.vid-expand {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 11px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity .14s ease;
  z-index: 3;
}
/* Show on parent hover (desktop) or always on touch */
.vid-wrap:hover .vid-expand,
.vid-expand:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .vid-expand { opacity: 1; }
}

/* ── Video lightbox overlay ────────────────────────────────────────────── */
#vlb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  backdrop-filter: blur(8px);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#vlb-overlay.vlb-open {
  display: flex;
}

#vlb-video {
  max-width: 96%;
  max-height: 80%;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0,0,0,.8);
  cursor: pointer;
  outline: none;
}

#vlb-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  z-index: 1001;
}
#vlb-close:hover { background: rgba(255,255,255,.2); }

/* ── Transport bar ─────────────────────────────────────────────────────── */
#vlb-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 8px 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  z-index: 1001;
}

#vlb-pp,
#vlb-mute {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  flex-shrink: 0;
}
#vlb-pp:hover,
#vlb-mute:hover {
  background: rgba(255,255,255,.14);
}

#vlb-progress {
  flex: 1;
  min-width: 120px;
  height: 6px;
  background: rgba(255,255,255,.15);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

#vlb-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--shell-acc, #0A84FF);
  border-radius: 3px;
  transition: width .1s linear;
}

/* ── Mobile adjustments ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  #vlb-video {
    max-width: 100%;
    max-height: 70%;
    border-radius: 0;
  }
  #vlb-bar {
    width: calc(100% - 32px);
    margin: 12px 16px 0;
  }
  #vlb-close {
    top: 10px;
    right: 12px;
  }
}
