/* Video Playlist for Elementor — base styles. Every colour/size here can be overridden from the widget's Style tab. */

.vpl {
  --vpl-side-w: 320px;
  --vpl-ratio: 16 / 9;
  --vpl-list-max-h: 50vh;
  --vpl-doc-h: 80vh;
  --vpl-accent: #e53935;
  --vpl-indicator-w: 3px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #1f2a33;
  color: #cfd8de;
  border-radius: 6px;
  overflow: hidden;
  line-height: 1.45;
}
.vpl *, .vpl *::before, .vpl *::after { box-sizing: border-box; }

/* ---------- Layout modes ---------- */
.vpl--layout-fullwidth {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}
body:has(.vpl--layout-fullwidth) { overflow-x: clip; }

.vpl--layout-fullscreen {
  position: fixed;
  top: var(--wp-admin--admin-bar--height, 0px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99990;
  width: auto;
  max-width: none;
  margin: 0;
  border-radius: 0;
}
/* In the Elementor editor, don't cover the canvas — show it as a 100vh block instead */
.vpl--layout-fullscreen.vpl--editor {
  position: relative;
  top: auto;
  z-index: auto;
  height: 100vh;
}
html.vpl-lock, html.vpl-lock body { overflow: hidden; }

.vpl--h-fill { height: 600px; }
.vpl--layout-fullscreen.vpl--h-fill { height: auto; }
.vpl--layout-fullscreen.vpl--editor.vpl--h-fill { height: 100vh; }

/* ---------- Top bar ---------- */
.vpl-topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  background: #34424e;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.vpl-topbar-title { padding: 0 14px; font-size: 17px; color: #fff; }
.vpl-actions { display: flex; align-self: stretch; margin-left: auto; }
.vpl a.vpl-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  font-size: 14px;
  line-height: 1;
  color: #cfd8de;
  text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, .08);
  transition: background-color .15s, color .15s;
}
.vpl a.vpl-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.vpl a.vpl-btn:focus-visible { outline: 2px solid var(--vpl-accent); outline-offset: -2px; }
.vpl .vpl-btn svg {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Body: sidebar + main ---------- */
.vpl-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--vpl-side-w) minmax(0, 1fr);
}
.vpl--side-right .vpl-body { grid-template-columns: minmax(0, 1fr) var(--vpl-side-w); }
.vpl--side-right .vpl-sidebar { order: 2; }

.vpl-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #2c3a45;
}
.vpl .vpl-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
/* Fit-to-video mode: the list never makes the row taller than the player */
.vpl--h-auto .vpl-list { position: absolute; inset: 0; }
.vpl .vpl-list li { margin: 0; padding: 0; list-style: none; }
.vpl .vpl-list li::before { content: none; }

.vpl .vpl-item {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.45;
  color: #cfd8de;
  text-align: left;
  transition: background-color .15s, color .15s;
}
.vpl .vpl-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.vpl .vpl-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset var(--vpl-indicator-w) 0 var(--vpl-accent);
}
.vpl--side-right .vpl-item.is-active { box-shadow: inset calc(-1 * var(--vpl-indicator-w)) 0 var(--vpl-accent); }
.vpl .vpl-item:focus-visible { outline: 2px solid var(--vpl-accent); outline-offset: -2px; }

.vpl .vpl-icon { flex: none; width: 12px; height: 12px; margin-top: .3em; fill: currentColor; opacity: .8; }
.vpl .vpl-icon-doc { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.vpl--no-icons .vpl-icon { display: none; }

/* ---------- Main: player / PDF + info bar ---------- */
.vpl-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #000; }
.vpl-frame { position: relative; flex: none; aspect-ratio: var(--vpl-ratio); background: #000; }
.vpl--h-fill .vpl-frame { flex: 1 1 auto; aspect-ratio: auto; min-height: 0; }
.vpl--h-auto.is-doc .vpl-frame { aspect-ratio: auto; height: var(--vpl-doc-h); }

.vpl-frame iframe, .vpl-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vpl .vpl-doc { background: #fff; }
.vpl .vpl-doc[hidden] { display: none; }
.vpl.is-doc .vpl-frame > :not(.vpl-doc):not(.vpl-pdfv) { visibility: hidden; }

.vpl-meta {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: #232e37;
}
.vpl .vpl-title { margin: 0; font-size: 18px; line-height: 1.35; color: #fff; }
.vpl a.vpl-pdf {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  background: var(--vpl-accent);
  color: #fff;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.vpl a.vpl-pdf:hover { filter: brightness(1.1); }
.vpl a.vpl-pdf[hidden] { display: none; }

.vpl-empty { padding: 16px; }

/* ---------- Stacked (tablet / mobile) ---------- */
@media (max-width: 1024px) {
  .vpl.vpl--stack-tablet .vpl-body { display: flex; flex-direction: column; }
  .vpl.vpl--stack-tablet .vpl-main { order: -1; flex: none; }
  .vpl.vpl--stack-tablet .vpl-frame { flex: none; aspect-ratio: var(--vpl-ratio); height: auto; }
  .vpl.vpl--stack-tablet.is-doc .vpl-frame { aspect-ratio: auto; height: 70vh; }
  .vpl.vpl--stack-tablet .vpl-sidebar { order: 0; flex: 1 1 auto; }
  .vpl.vpl--stack-tablet .vpl-list { position: static; max-height: var(--vpl-list-max-h); }
  .vpl.vpl--stack-tablet.vpl--h-fill .vpl-list { max-height: none; }
  .vpl.vpl--stack-tablet .vpl-topbar-title { display: none; }
  .vpl.vpl--stack-tablet .vpl-actions { width: 100%; }
  .vpl.vpl--stack-tablet a.vpl-btn { flex: 1; justify-content: center; padding: 14px 8px; }
  .vpl.vpl--stack-tablet a.vpl-btn:first-child { border-left: 0; }
  .vpl.vpl--stack-tablet .vpl-item.is-active { box-shadow: inset var(--vpl-indicator-w) 0 var(--vpl-accent); }
}
@media (max-width: 767px) {
  .vpl.vpl--stack-mobile .vpl-body { display: flex; flex-direction: column; }
  .vpl.vpl--stack-mobile .vpl-main { order: -1; flex: none; }
  .vpl.vpl--stack-mobile .vpl-frame { flex: none; aspect-ratio: var(--vpl-ratio); height: auto; }
  .vpl.vpl--stack-mobile.is-doc .vpl-frame { aspect-ratio: auto; height: 70vh; }
  .vpl.vpl--stack-mobile .vpl-sidebar { order: 0; flex: 1 1 auto; }
  .vpl.vpl--stack-mobile .vpl-list { position: static; max-height: var(--vpl-list-max-h); }
  .vpl.vpl--stack-mobile.vpl--h-fill .vpl-list { max-height: none; }
  .vpl.vpl--stack-mobile .vpl-topbar-title { display: none; }
  .vpl.vpl--stack-mobile .vpl-actions { width: 100%; }
  .vpl.vpl--stack-mobile a.vpl-btn { flex: 1; justify-content: center; padding: 14px 8px; }
  .vpl.vpl--stack-mobile a.vpl-btn:first-child { border-left: 0; }
  .vpl.vpl--stack-mobile .vpl-item.is-active { box-shadow: inset var(--vpl-indicator-w) 0 var(--vpl-accent); }
}

/* ---------- Logo (before the top-bar title) ---------- */
.vpl-topbar { position: relative; z-index: 5; }
.vpl-topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vpl-logo-link { display: flex; flex: none; line-height: 0; }
.vpl .vpl-logo { display: block; flex: none; width: auto; height: 28px; max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }

/* ---------- Share button + menu ---------- */
.vpl-share { position: relative; display: flex; }
.vpl .vpl-btn svg.vpl-share-toggle-icon { width: 15px; height: 15px; flex: none; fill: currentColor; stroke: none; }
.vpl-share.is-open a.vpl-share-toggle { color: #fff; background: rgba(255, 255, 255, .06); }

.vpl .vpl-share-panel {
  --vpl-share-size: 38px;
  --vpl-share-icon: 16px;
  --vpl-share-radius: 6px;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: max-content;
  max-width: min(360px, calc(100vw - 24px));
  margin-top: 1px;
  padding: 12px;
  background: #34424e;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}
.vpl .vpl-share-panel[hidden] { display: none; }

.vpl a.vpl-share-link {
  --b: var(--vpl-item-color, var(--vpl-share-color, var(--vpl-net)));
  --f: var(--vpl-item-icon, var(--vpl-share-icon-color, #fff));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: var(--vpl-share-size);
  height: var(--vpl-share-size);
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--vpl-share-radius);
  background: var(--b);
  color: var(--f);
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .15s, background-color .15s, color .15s, border-color .15s;
}
.vpl a.vpl-share-link:hover,
.vpl a.vpl-share-link:focus-visible {
  --b: var(--vpl-item-color-h, var(--vpl-share-color-h, var(--vpl-item-color, var(--vpl-share-color, var(--vpl-net)))));
  --f: var(--vpl-item-icon-h, var(--vpl-share-icon-color-h, var(--vpl-item-icon, var(--vpl-share-icon-color, #fff))));
  filter: var(--vpl-share-hover-filter, brightness(1.12));
}
.vpl a.vpl-share-link:focus-visible { outline: 2px solid var(--vpl-accent); outline-offset: 2px; }
.vpl .vpl-share-icon { width: var(--vpl-share-icon); height: var(--vpl-share-icon); flex: none; fill: currentColor; }

.vpl .vpl-share--icon a.vpl-share-link { width: var(--vpl-share-size); padding: 0; }
.vpl .vpl-share--square a.vpl-share-link { border-radius: 0; }
.vpl .vpl-share--circle a.vpl-share-link { border-radius: 999px; }

/* Skins: flat = brand background; minimal = brand-coloured icon; framed = icon + outline */
.vpl .vpl-share--minimal a.vpl-share-link,
.vpl .vpl-share--framed a.vpl-share-link { background: transparent; color: var(--b); }
.vpl .vpl-share--framed a.vpl-share-link { border-color: currentColor; }
.vpl .vpl-share--minimal a.vpl-share-link:hover,
.vpl .vpl-share--framed a.vpl-share-link:hover { background: rgba(255, 255, 255, .08); }
/* Official colours that are too dark to read on the dark panel in minimal/framed skins */
.vpl .vpl-share--minimal .vpl-net-x,
.vpl .vpl-share--framed .vpl-net-x,
.vpl .vpl-share--minimal .vpl-net-email,
.vpl .vpl-share--framed .vpl-net-email,
.vpl .vpl-share--minimal .vpl-net-copy,
.vpl .vpl-share--framed .vpl-net-copy,
.vpl .vpl-share--minimal .vpl-net-native,
.vpl .vpl-share--framed .vpl-net-native { --vpl-net: #e6ebef !important; }

.vpl .vpl-share-status { flex-basis: 100%; font-size: 12px; line-height: 1.3; color: #cfd8de; }
.vpl .vpl-share-status:empty { display: none; }

@media (max-width: 1024px) {
  .vpl.vpl--stack-tablet .vpl-share { flex: 1; }
  .vpl.vpl--stack-tablet .vpl-share a.vpl-btn { width: 100%; }
  /* Share menu drops down as a full-width strip under the top bar, so every icon fits */
  .vpl.vpl--stack-tablet .vpl-share { position: static; }
  .vpl.vpl--stack-tablet .vpl-share-panel { left: 0; right: 0; width: auto; max-width: none; margin-left: auto; margin-right: auto; justify-content: center; border-radius: 0 0 6px 6px; }
}
@media (max-width: 767px) {
  .vpl.vpl--stack-mobile .vpl-share { flex: 1; }
  .vpl.vpl--stack-mobile .vpl-share a.vpl-btn { width: 100%; }
  /* Share menu drops down as a full-width strip under the top bar, so every icon fits */
  .vpl.vpl--stack-mobile .vpl-share { position: static; }
  .vpl.vpl--stack-mobile .vpl-share-panel { left: 0; right: 0; width: auto; max-width: none; margin-left: auto; margin-right: auto; justify-content: center; border-radius: 0 0 6px 6px; }
}

/* ---------- Image overlay ---------- */
.vpl .vpl-overlay {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}
.vpl .vpl-overlay[hidden] { display: none; }
.vpl .vpl-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--vpl-overlay-tint, transparent);
  transition: background-color .2s;
}
.vpl .vpl-overlay:hover::after { background: var(--vpl-overlay-tint-h, var(--vpl-overlay-tint, transparent)); }
.vpl .vpl-overlay:focus-visible { outline: 3px solid var(--vpl-accent); outline-offset: -3px; }
.vpl .vpl-overlay-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: var(--vpl-overlay-fit, cover);
  object-position: var(--vpl-overlay-pos, center);
}
.vpl .vpl-overlay-img:not([src]) { visibility: hidden; }
.vpl .vpl-play {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--vpl-play-size, 72px);
  height: var(--vpl-play-size, 72px);
  border-radius: var(--vpl-play-radius, 50%);
  background: var(--vpl-play-bg, rgba(0, 0, 0, .55));
  color: var(--vpl-play-color, #fff);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
  transition: transform .15s, background-color .15s, color .15s;
}
.vpl .vpl-play svg { width: 46%; height: 46%; margin-left: 6%; fill: currentColor; }
.vpl .vpl-overlay:hover .vpl-play {
  transform: scale(1.08);
  background: var(--vpl-play-bg-h, var(--vpl-accent));
  color: var(--vpl-play-color-h, var(--vpl-play-color, #fff));
}

/* ---------- One-page-at-a-time PDF viewer (PDF.js) ---------- */
.vpl .vpl-pdfv {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  background: #525659;
}
.vpl .vpl-pdfv[hidden] { display: none; }
.vpl .vpl-pdfv-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: auto;
  padding: var(--vpl-pdf-gap, 14px);
  background: #525659;
  outline: none;
  /* At fit size, horizontal swipes turn pages (not browser back/forward); vertical scroll + pinch still work */
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: contain;
}
.vpl .vpl-pdfv.is-zoomed .vpl-pdfv-stage { touch-action: pan-x pan-y pinch-zoom; }
.vpl .vpl-pdfv-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--vpl-accent); }
.vpl .vpl-pdfv-canvas {
  display: block;
  flex: none;
  margin: auto;            /* centred, but scrolls correctly when zoomed in */
  max-width: none;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
.vpl .vpl-pdfv.is-loading .vpl-pdfv-canvas { opacity: .35; }
.vpl .vpl-pdfv-msg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 14px;
  pointer-events: none;
}
.vpl .vpl-pdfv-msg:empty { display: none; }

.vpl .vpl-pdfv-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 10px;
  background: #323639;
  color: #e8eaed;
  font-size: 14px;
  line-height: 1;
}
.vpl .vpl-pdfv-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 4px;
  cursor: pointer;
  color: inherit;
}
.vpl .vpl-pdfv-btn:hover { background: var(--vpl-pdf-btn-hover, rgba(255, 255, 255, .12)); }
.vpl .vpl-pdfv-btn:focus-visible { outline: 2px solid var(--vpl-accent); outline-offset: -2px; }
.vpl .vpl-pdfv-btn[disabled] { opacity: .35; cursor: default; background: none; }
.vpl .vpl-pdfv-btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.vpl .vpl-pdfv-zoom { min-width: 44px; text-align: center; font-size: 13px; }
.vpl .vpl-pdfv-pages { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px; }
.vpl .vpl-pdfv-num {
  box-sizing: border-box;
  width: 3.4em;
  height: 28px;
  margin: 0;
  padding: 0 4px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 4px;
  background: rgba(0, 0, 0, .25);
  color: inherit;
  font: inherit;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.vpl .vpl-pdfv-num::-webkit-outer-spin-button,
.vpl .vpl-pdfv-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vpl .vpl-pdfv-num:focus { outline: 2px solid var(--vpl-accent); outline-offset: 0; }
.vpl .vpl-pdfv-of { opacity: .85; white-space: nowrap; }
.vpl .vpl-pdfv-sep { width: 1px; height: 20px; margin: 0 6px; background: currentColor; opacity: .25; }


/* ---------- Mobile/tablet slide-out playlist (☰) — hidden on desktop ---------- */
.vpl a.vpl-btn.vpl-drawer-toggle { display: none; }
.vpl .vpl-mnav, .vpl .vpl-drawer-head, .vpl .vpl-backdrop { display: none; }
.vpl .vpl-drawer-toggle svg, .vpl .vpl-drawer-close svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round;
}
.vpl .vpl-drawer-count { flex: none; font-size: .85em; opacity: .7; white-space: nowrap; }
.vpl a.vpl-drawer-toggle--logo_title .vpl-drawer-count, .vpl a.vpl-drawer-toggle--logo .vpl-drawer-count { margin-left: auto; }
.vpl .vpl-drawer-count:empty { display: none; }
html.vpl-drawer-lock, html.vpl-drawer-lock body { overflow: hidden; }
@media (max-width: 1024px) {
  /* Player area takes the full height; with a fixed/100vh height the video is centred with black bars */
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-main { flex: 1 1 auto; min-height: 0; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer.vpl--h-fill .vpl-frame,
  .vpl.vpl--stack-tablet.vpl--mnav-drawer.vpl--h-fill.is-doc .vpl-frame { flex: 1 1 auto; aspect-ratio: auto; height: auto; min-height: 0; }

  /* Toggle buttons */
  .vpl.vpl--stack-tablet.vpl--mnav-drawer a.vpl-btn.vpl-drawer-toggle { display: flex; flex: 1 1 auto; min-width: 0; justify-content: center; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-mnav { display: flex; flex: none; min-height: 46px; background: #34424e; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-mnav a.vpl-btn { flex: 1; border-left: 0; }
  /* Other top-bar buttons become icon-only to make room (labels stay for screen readers) */
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-actions > a.vpl-btn:not(.vpl-drawer-toggle) > span,
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-share-toggle > span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-actions > a.vpl-btn:not(.vpl-drawer-toggle), .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-share { flex: 0 0 auto; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-actions > a.vpl-btn:not(.vpl-drawer-toggle), .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-share a.vpl-btn { min-width: 50px; padding-left: 14px; padding-right: 14px; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer a.vpl-btn.vpl-drawer-toggle { border-left: 0; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-actions > :not(:first-child) a.vpl-btn:first-child,
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-actions > a.vpl-btn:not(:first-child) { border-left: 1px solid rgba(255, 255, 255, .08); }

  /* The playlist becomes a slide-out drawer */
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 100001;
    order: 0;
    width: min(86vw, var(--vpl-drawer-w, 360px));
    max-height: none;
    padding-top: 0;
    box-shadow: 0 0 32px rgba(0, 0, 0, .5);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer.vpl--side-right .vpl-sidebar { left: auto; right: 0; transform: translateX(105%); }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer.is-drawer-open .vpl-sidebar { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-list { position: static; max-height: none; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-item.is-active { box-shadow: inset var(--vpl-indicator-w) 0 var(--vpl-accent); }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-drawer-head {
    display: flex; align-items: center; gap: 10px; flex: none;
    min-height: 52px; padding: 0 6px 0 16px;
    background: #34424e; color: #fff; font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-drawer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-drawer-close {
    all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 4px; cursor: pointer; color: inherit;
  }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-drawer-close:hover { background: rgba(255, 255, 255, .1); }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-drawer-close:focus-visible { outline: 2px solid var(--vpl-accent); outline-offset: -2px; }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer .vpl-backdrop {
    display: block; position: fixed; inset: 0; z-index: 100000;
    background: var(--vpl-backdrop, rgba(0, 0, 0, .55));
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .vpl.vpl--stack-tablet.vpl--mnav-drawer.is-drawer-open .vpl-backdrop { opacity: 1; pointer-events: auto; }
}
@media (max-width: 767px) {
  /* Player area takes the full height; with a fixed/100vh height the video is centred with black bars */
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-main { flex: 1 1 auto; min-height: 0; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer.vpl--h-fill .vpl-frame,
  .vpl.vpl--stack-mobile.vpl--mnav-drawer.vpl--h-fill.is-doc .vpl-frame { flex: 1 1 auto; aspect-ratio: auto; height: auto; min-height: 0; }

  /* Toggle buttons */
  .vpl.vpl--stack-mobile.vpl--mnav-drawer a.vpl-btn.vpl-drawer-toggle { display: flex; flex: 1 1 auto; min-width: 0; justify-content: center; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-mnav { display: flex; flex: none; min-height: 46px; background: #34424e; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-mnav a.vpl-btn { flex: 1; border-left: 0; }
  /* Other top-bar buttons become icon-only to make room (labels stay for screen readers) */
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-actions > a.vpl-btn:not(.vpl-drawer-toggle) > span,
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-share-toggle > span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-actions > a.vpl-btn:not(.vpl-drawer-toggle), .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-share { flex: 0 0 auto; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-actions > a.vpl-btn:not(.vpl-drawer-toggle), .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-share a.vpl-btn { min-width: 50px; padding-left: 14px; padding-right: 14px; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer a.vpl-btn.vpl-drawer-toggle { border-left: 0; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-actions > :not(:first-child) a.vpl-btn:first-child,
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-actions > a.vpl-btn:not(:first-child) { border-left: 1px solid rgba(255, 255, 255, .08); }

  /* The playlist becomes a slide-out drawer */
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 100001;
    order: 0;
    width: min(86vw, var(--vpl-drawer-w, 360px));
    max-height: none;
    padding-top: 0;
    box-shadow: 0 0 32px rgba(0, 0, 0, .5);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer.vpl--side-right .vpl-sidebar { left: auto; right: 0; transform: translateX(105%); }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer.is-drawer-open .vpl-sidebar { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-list { position: static; max-height: none; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-item.is-active { box-shadow: inset var(--vpl-indicator-w) 0 var(--vpl-accent); }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-drawer-head {
    display: flex; align-items: center; gap: 10px; flex: none;
    min-height: 52px; padding: 0 6px 0 16px;
    background: #34424e; color: #fff; font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-drawer-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-drawer-close {
    all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 4px; cursor: pointer; color: inherit;
  }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-drawer-close:hover { background: rgba(255, 255, 255, .1); }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-drawer-close:focus-visible { outline: 2px solid var(--vpl-accent); outline-offset: -2px; }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer .vpl-backdrop {
    display: block; position: fixed; inset: 0; z-index: 100000;
    background: var(--vpl-backdrop, rgba(0, 0, 0, .55));
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .vpl.vpl--stack-mobile.vpl--mnav-drawer.is-drawer-open .vpl-backdrop { opacity: 1; pointer-events: auto; }
}

/* ---------- Poster: fitted thumbnail shown before a video starts when the player isn't 16:9 ---------- */
.vpl .vpl-poster {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  background: #000;
}
.vpl .vpl-poster[hidden] { display: none; }
.vpl .vpl-poster:focus-visible { outline: 3px solid var(--vpl-accent); outline-offset: -3px; }
.vpl .vpl-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;   /* whole thumbnail, centred with black bars — like the playing video */
}
.vpl .vpl-poster-img:not([src]) { visibility: hidden; }
.vpl .vpl-poster:hover .vpl-play {
  transform: scale(1.08);
  background: var(--vpl-play-bg-h, var(--vpl-accent));
  color: var(--vpl-play-color-h, var(--vpl-play-color, #fff));
}

/* ---------- ☰ button showing the logo (+ title) on smaller screens ---------- */
.vpl a.vpl-drawer-toggle--logo_title,
.vpl a.vpl-drawer-toggle--logo { min-width: 0; gap: 10px; }
.vpl .vpl-toggle-logo { height: 26px; width: auto; max-width: 40vw; object-fit: contain; }
.vpl .vpl-toggle-title {
  flex: 0 1 auto;
  min-width: 2.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--vpl-toggle-title-color, #fff);
  font-size: 16px;
}
@media (max-width: 1024px) {
  .vpl.vpl--stack-tablet.vpl--mnav-drawer a.vpl-btn.vpl-drawer-toggle--logo_title,
  .vpl.vpl--stack-tablet.vpl--mnav-drawer a.vpl-btn.vpl-drawer-toggle--logo { justify-content: flex-start; padding-left: 14px; padding-right: 12px; }
}
@media (max-width: 767px) {
  .vpl.vpl--stack-mobile.vpl--mnav-drawer a.vpl-btn.vpl-drawer-toggle--logo_title,
  .vpl.vpl--stack-mobile.vpl--mnav-drawer a.vpl-btn.vpl-drawer-toggle--logo { justify-content: flex-start; padding-left: 14px; padding-right: 12px; }
}

/* ---------- "Tap to unmute" (shown when a browser only allowed muted autoplay) ---------- */
.vpl .vpl-unmute {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  animation: vpl-pulse 2s ease-in-out 2;
}
.vpl .vpl-unmute[hidden] { display: none; }
.vpl .vpl-unmute:hover { background: var(--vpl-accent); }
.vpl .vpl-unmute:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vpl .vpl-unmute svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes vpl-pulse { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .vpl .vpl-unmute { animation: none; } }

/* ---------- Keep Full Screen / Full Width layouts intact inside themes that cap content width
   (e.g. block themes' "constrained" layout adds max-width + auto margins to every child) ---------- */
.vpl.vpl--layout-fullscreen { max-width: none !important; margin: 0 !important; }
.vpl.vpl--layout-fullscreen:not(.vpl--editor) { width: auto !important; }
.vpl.vpl--layout-fullwidth {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}
