/* =====================================================================
   vsl-player.css — self-hosted VSL player for /launch.
   Everything is scoped under .vsl. Colours track the .lv page theme but
   fall back so the player also works outside the launch page.
   ===================================================================== */

.vsl{
  --vsl-accent: #ff3b30;
  --vsl-accent-2: #d42a1e;
  --vsl-ink: #f4f4f7;

  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  font-family: "Inter", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--vsl-ink);
  isolation: isolate;
  /* Lets the overlay type scale with the player, not the viewport, so the
     docked mini-player gets proportionally smaller text. */
  container-type: inline-size;
}
.vsl *, .vsl *::before, .vsl *::after{ box-sizing: border-box; }

.vsl-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* Click-target over the frame. Sits under every overlay. */
.vsl-surface{
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

/* ── Centre play/pause pulse ─────────────────────────────────────────── */
.vsl-pulse{
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(8,7,13,.72);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.7);
  pointer-events: none;
}
.vsl-pulse svg{ width: 28px; height: 28px; fill: #fff; margin-left: 3px; }
.vsl-pulse[data-icon="pause"] svg{ margin-left: 0; }
.vsl-pulse[data-show="1"]{ animation: vsl-pulse .5s ease-out forwards; }
@keyframes vsl-pulse{
  0%   { opacity: .95; transform: scale(.7); }
  100% { opacity: 0;   transform: scale(1.35); }
}

/* ── Cold-start cover ────────────────────────────────────────────────── */
.vsl-cover{
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(8,7,13,.18), rgba(8,7,13,.5));
  transition: background .25s ease, opacity .25s ease;
}
.vsl-cover:hover{ background: linear-gradient(180deg, rgba(8,7,13,.06), rgba(8,7,13,.38)); }
.vsl-cover-icon{
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(8,7,13,.7);
  border: 2px solid rgba(255,59,48,.44);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 34px rgba(0,0,0,.55);
  transition: transform .2s ease, border-color .2s ease;
}
.vsl-cover:hover .vsl-cover-icon{ transform: scale(1.08); border-color: var(--vsl-accent); }
.vsl-cover-icon svg{ width: 26px; height: 26px; fill: #fff; margin-left: 4px; }
.vsl-cover-label{
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.vsl[data-started="1"] .vsl-cover{ display: none; }

/* ── Smart-autoplay unmute overlay ───────────────────────────────────── */
.vsl-unmute{
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5%;
  border: 0;
  background: rgba(8,7,13,.44);
  color: #fff;
  cursor: pointer;
  animation: vsl-fade .3s ease-out;
}
.vsl-unmute[hidden]{ display: none; }
.vsl-unmute-frame{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.6%, 14px);
  width: min(78%, 620px);
  padding: clamp(14px, 4.5%, 40px) clamp(12px, 4%, 34px);
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 10px;
  background: rgba(26,24,36,.34);
  text-align: center;
  transition: border-color .2s ease, background .2s ease;
}
.vsl-unmute:hover .vsl-unmute-frame{
  border-color: #fff;
  background: rgba(26,24,36,.5);
}
.vsl-unmute-icon{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 12%, 96px);
  height: clamp(44px, 12%, 96px);
  animation: vsl-unmute-beat 1.9s ease-in-out infinite;
}
.vsl-unmute-icon svg{
  width: 100%;
  height: 100%;
  fill: #fff;
  color: #fff;
  filter: drop-shadow(0 3px 14px rgba(0,0,0,.65));
}
/* Expanding ring behind the speaker, so the button reads as "tap me". */
.vsl-unmute-icon::after{
  content: "";
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  animation: vsl-unmute-ring 1.9s ease-out infinite;
  pointer-events: none;
}
.vsl-unmute-title,
.vsl-unmute-sub{
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.01em;
  text-shadow: 0 2px 16px rgba(0,0,0,.75);
}
.vsl-unmute-title{ font-size: clamp(16px, 4.1cqw, 34px); }
.vsl-unmute-sub{ font-size: clamp(15px, 3.8cqw, 31px); }
@keyframes vsl-fade{ from{ opacity: 0; } }
@keyframes vsl-unmute-beat{
  0%, 100%{ transform: scale(1); }
  50%     { transform: scale(1.11); }
}
@keyframes vsl-unmute-ring{
  0%  { transform: scale(.82); opacity: .75; }
  100%{ transform: scale(1.55); opacity: 0; }
}

/* ── Controls ────────────────────────────────────────────────────────── */
.vsl-controls{
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(4,3,8,.82) 55%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.vsl[data-started="1"][data-idle="0"] .vsl-controls,
.vsl[data-started="1"]:hover .vsl-controls,
.vsl[data-started="1"][data-paused="1"] .vsl-controls,
.vsl[data-started="1"]:focus-within .vsl-controls,
.vsl[data-intro="1"] .vsl-controls{
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.vsl[data-idle="1"]:not([data-paused="1"]){ cursor: none; }

.vsl-row{ display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.vsl-spacer{ flex: 1; }

.vsl-btn{
  width: 32px;
  height: 32px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  padding: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}
.vsl-btn:hover{ background: rgba(255,255,255,.14); }
.vsl-btn svg{ width: 18px; height: 18px; fill: currentColor; }
.vsl-btn--text{
  width: auto;
  min-width: 38px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.vsl-i-pause, .vsl-i-off, .vsl-i-shrink{ display: none; }
.vsl[data-paused="0"] .vsl-i-play{ display: none; }
.vsl[data-paused="0"] .vsl-i-pause{ display: block; }
.vsl[data-muted="1"] .vsl-i-on{ display: none; }
.vsl[data-muted="1"] .vsl-i-off{ display: block; }
.vsl[data-fullscreen="1"] .vsl-i-expand{ display: none; }
.vsl[data-fullscreen="1"] .vsl-i-shrink{ display: block; }

.vsl-time{
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.6);
  margin-left: 4px;
  white-space: nowrap;
}
.vsl-time b{ color: #fff; font-weight: 600; }

.vsl-volume{ display: flex; align-items: center; gap: 2px; }
.vsl-slider{
  width: 0;
  opacity: 0;
  height: 4px;
  appearance: none;
  background: rgba(255,255,255,.26);
  border-radius: 999px;
  cursor: pointer;
  transition: width .2s ease, opacity .2s ease;
}
.vsl-volume:hover .vsl-slider,
.vsl-slider:focus-visible{ width: 68px; opacity: 1; }
.vsl-slider::-webkit-slider-thumb{
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
}
.vsl-slider::-moz-range-thumb{
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

/* Progress bar */
.vsl-bar{ position: relative; padding: 6px 0; cursor: pointer; }
.vsl-bar-track{
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  transition: height .15s ease;
}
.vsl-bar:hover .vsl-bar-track{ height: 6px; }
.vsl-bar-buffer{
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
}
.vsl-bar-fill{
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--vsl-accent), var(--vsl-accent-2));
}
.vsl-bar-knob{
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.6);
  opacity: 0;
  transition: opacity .15s ease;
}
.vsl-bar:hover .vsl-bar-knob, .vsl-bar:focus-visible .vsl-bar-knob{ opacity: 1; }

/* Chapter markers from the admin "sections" setting. */
.vsl-bar-marks{ position: absolute; inset: 0; pointer-events: none; }
.vsl-bar-mark{
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 3px rgba(0,0,0,.6);
}
.vsl-chapter{
  max-width: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: rgba(255,255,255,.72);
  padding-left: 10px;
  margin-left: 8px;
  border-left: 1px solid rgba(255,255,255,.18);
}
.vsl-chapter[hidden]{ display: none; }
.vsl-bar-tip{
  position: absolute;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(8,7,13,.95);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.vsl-bar-tip[hidden]{ display: none; }
/* Seek lock: the un-watched remainder reads as unavailable. */
.vsl[data-noskip="1"] .vsl-bar{ cursor: default; }
.vsl[data-noskip="1"] .vsl-bar-track::after{
  content: "";
  position: absolute;
  inset: 0 0 0 var(--vsl-watched, 0%);
  border-radius: 0 999px 999px 0;
  background: rgba(255,255,255,.07);
}

/* ── End card ────────────────────────────────────────────────────────── */
.vsl-ended{
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  text-align: center;
  background: rgba(6,5,11,.9);
}
.vsl-ended[hidden]{ display: none; }
.vsl-ended p{
  margin: 0;
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(16px, 2.6vw, 21px);
  font-weight: 700;
}
.vsl-ended-cta{
  padding: 13px 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4d40, var(--vsl-accent-2));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 16px 40px -14px rgba(255,59,48,.8);
}
.vsl-ended-replay{
  border: 0;
  background: none;
  color: rgba(255,255,255,.55);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
}

.vsl-error{
  position: absolute;
  inset: auto 0 0 0;
  z-index: 8;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  background: rgba(212,42,30,.9);
}
.vsl-error[hidden]{ display: none; }
.vsl-error button{
  margin-left: 8px;
  border: 0;
  border-radius: 6px;
  padding: 5px 11px;
  font-weight: 700;
  cursor: pointer;
}

.vsl-setup{
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  font-size: 13.5px;
  color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.03);
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 12px;
}
.vsl--missing{ aspect-ratio: auto; background: transparent; }
.vsl-setup b{ color: #fff; font-size: 15px; }
.vsl-setup a{ color: #ff5a4d; font-weight: 600; }
.vsl-setup code{
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,.1);
  font-size: 12.5px;
}

/* ── Sticky mini player ──────────────────────────────────────────────── */
.vsl-anchor{ position: relative; width: 100%; }
.vsl.vsl--stuck{
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: auto;
  width: min(330px, 78vw);
  border-radius: 14px;
  box-shadow: 0 26px 60px -18px rgba(0,0,0,.92), 0 0 0 1px rgba(255,255,255,.1);
  animation: vsl-dock .28s ease-out;
}
@keyframes vsl-dock{ from{ opacity: 0; transform: translateY(18px) scale(.96); } }

/* The screenshot lightbox must win over the docked player. */
body:has(.lv-lightbox[data-open="1"]) .vsl--stuck{ display: none; }

/* Small frame: keep only the essentials, and don't wait for a hover that
   never comes on touch. */
.vsl--stuck .vsl-controls{
  opacity: 1;
  transform: none;
  pointer-events: auto;
  padding: 20px 8px 7px;
}
.vsl--stuck .vsl-volume,
.vsl--stuck .vsl-time,
.vsl--stuck .vsl-chapter,
.vsl--stuck [data-vsl-speed]{ display: none; }
.vsl--stuck .vsl-ended{ display: none; }
/* Too small for the copy — the pulsing speaker alone carries the message. */
.vsl--stuck .vsl-unmute-frame{
  width: auto;
  padding: 0;
  border: 0;
  background: none;
}
.vsl--stuck .vsl-unmute-title,
.vsl--stuck .vsl-unmute-sub{ display: none; }
.vsl--stuck .vsl-unmute-icon{ width: 38%; height: auto; aspect-ratio: 1; }

.vsl-close{
  position: absolute;
  z-index: 10;
  top: 7px;
  right: 7px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: rgba(10,9,16,.92);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.55);
}
.vsl-close:hover{ background: #14121c; border-color: rgba(255,255,255,.4); }
.vsl-close[hidden]{ display: none; }

/* ── CTA gate ────────────────────────────────────────────────────────── */
[data-vsl-gate]{ display: none; }
[data-vsl-gate][data-open="1"]{ display: block; animation: vsl-reveal .45s ease-out; }
@keyframes vsl-reveal{ from{ opacity: 0; transform: translateY(14px); } }
.vsl-gate-note{
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 22px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 14px;
  text-align: center;
  font-size: 13.5px;
  color: rgba(244,244,247,.6);
}
.vsl-gate-note[hidden]{ display: none; }
.vsl-gate-note b{ color: #fff; }

@media (max-width: 640px){
  .vsl-controls{ padding: 22px 8px 8px; }
  .vsl-time{ font-size: 11px; }
  .vsl-chapter{ display: none; }
  .vsl-volume .vsl-slider{ display: none; }
}

/* Mobile dock: sit clear of the sticky "Book your call" bar, not on top of it. */
@media (max-width: 860px){
  .vsl.vsl--stuck{
    right: 12px;
    width: min(220px, 56vw);
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    border-radius: 12px;
  }
  /* Keyboard is up and the booking form owns the screen — stays hidden for the
     rest of the page view. */
  body[data-form-focus="1"] .vsl--stuck{ display: none; }
  .vsl--stuck .vsl-controls{ padding: 16px 6px 5px; }
  .vsl--stuck .vsl-bar{ padding: 4px 0; }
  .vsl--stuck .vsl-bar-track{ height: 3px; }
  .vsl--stuck .vsl-btn{ width: 28px; height: 28px; }
  .vsl--stuck .vsl-btn svg{ width: 15px; height: 15px; }
  .vsl--stuck .vsl-pulse{
    width: 52px; height: 52px; margin: -26px 0 0 -26px;
  }
  .vsl--stuck .vsl-pulse svg{ width: 20px; height: 20px; }
  .vsl--stuck .vsl-close{ top: 5px; right: 5px; width: 27px; height: 27px; }
}

@media (prefers-reduced-motion: reduce){
  .vsl-pulse[data-show="1"], .vsl.vsl--stuck, [data-vsl-gate][data-open="1"]{
    animation: none;
  }
  .vsl-unmute, .vsl-unmute-icon, .vsl-unmute-icon::after{ animation: none; }
}
