/*
  The embed player's look (Sumeet, 2026-11-02): a play button on the left and one
  bar holding the rest, the logo at its right end.
  The colours are the player's own neutrals, white on near-black, never the
  brand's blue. The logo is the icon alone until the pointer is on it; the word
  then opens to its right, and as the bar is anchored on that side the icon moves
  left to make room. The iframe's size is the customer's page's to decide, so the
  stage fills whatever it is given.
*/
html, body { height:100%; margin:0; background:#000; }
body { font:13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color:#fff; overflow:hidden; }
[hidden] { display:none !important; }

.stage { position:fixed; top:0; right:0; bottom:0; left:0; background:#000; }
.stage.is-idle { cursor:none; }
.video, .poster { display:block; width:100%; height:100%; object-fit:contain; background:#000; }

.controls { position:absolute; right:8px; bottom:8px; left:8px; display:flex; gap:8px; transition:opacity .2s; }
.stage.is-idle .controls { opacity:0; pointer-events:none; }
.stage.is-failed .controls, .stage.is-failed .menu { display:none; }

.btn { display:flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; padding:0; color:#fff;
       cursor:pointer; background:transparent; border:0; border-radius:4px; transition:background-color .12s; }
.btn:hover, .btn:focus-visible { background:rgba(255,255,255,.14); }
.btn:disabled { opacity:.35; cursor:default; background:transparent; }
.btn svg { display:block; width:22px; height:22px; fill:currentColor; }
.btn:focus-visible, .brand:focus-visible, .retry:focus-visible, input:focus-visible { outline:2px solid #fff; outline-offset:1px; }

.btn-play { width:56px; background:rgba(15,15,15,.9); }
.btn-play:hover, .btn-play:focus-visible { background:rgba(45,45,45,.95); }
.btn-play svg { width:26px; height:26px; }
.btn .icon-pause, .btn .icon-muted, .btn .icon-exit, .stage.is-playing .btn .icon-play, .btn.is-muted .icon-sound, .stage.is-full .btn .icon-enter { display:none; }
.stage.is-playing .btn .icon-pause, .btn.is-muted .icon-muted, .stage.is-full .btn .icon-exit { display:block; }

.bar { display:flex; align-items:center; flex:1; min-width:0; height:32px; padding:0 4px 0 12px; background:rgba(15,15,15,.9); border-radius:4px; }

/* Both sliders. --played and --buffered come from player.js. */
input[type=range] { -webkit-appearance:none; appearance:none; display:block; width:100%; height:32px; margin:0; padding:0; cursor:pointer; background:transparent; --played:0%; --buffered:0%; }
input[type=range]::-webkit-slider-runnable-track { height:4px; border-radius:2px;
    background:linear-gradient(to right, #fff var(--played), rgba(255,255,255,.45) var(--played), rgba(255,255,255,.45) var(--buffered), rgba(255,255,255,.22) var(--buffered)); }
input[type=range]::-moz-range-track { height:4px; border-radius:2px;
    background:linear-gradient(to right, #fff var(--played), rgba(255,255,255,.45) var(--played), rgba(255,255,255,.45) var(--buffered), rgba(255,255,255,.22) var(--buffered)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:12px; height:12px; margin-top:-4px; border-radius:50%; background:#fff; opacity:0; transition:opacity .12s; }
input[type=range]::-moz-range-thumb { width:12px; height:12px; border:0; border-radius:50%; background:#fff; opacity:0; transition:opacity .12s; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { opacity:1; }
input[type=range]:hover::-moz-range-thumb, input[type=range]:focus-visible::-moz-range-thumb { opacity:1; }
@media (hover:none) {
  input[type=range]::-webkit-slider-thumb { opacity:1; }
  input[type=range]::-moz-range-thumb { opacity:1; }
}

/* The running time, the track and the total, in one row. */
.seek { display:flex; align-items:center; gap:10px; flex:1; min-width:40px; margin-right:6px; }
.seek input { flex:1; width:auto; min-width:30px; }
.clock { flex:none; font-size:12px; color:#fff; white-space:nowrap; font-variant-numeric:tabular-nums; }
.clock-total { opacity:.7; }

.volume { display:flex; align-items:center; flex:none; }
.volume input { width:0; opacity:0; transition:width .15s, opacity .15s, margin .15s; }
.volume:hover input, .volume:focus-within input { width:60px; margin:0 6px 0 2px; opacity:1; }

/* The logo: the icon, and the word that opens beside it. */
.brand { display:flex; align-items:center; flex:none; height:32px; margin-left:2px; padding:0 4px; line-height:0; color:#fff; border-radius:4px; opacity:.9; transition:opacity .12s; }
.brand-icon { display:block; flex:none; width:28px; height:18px; }
.brand-word { display:block; overflow:hidden; max-width:0; opacity:0; transition:max-width .22s ease, margin .22s ease, opacity .22s ease; }
.brand-word img { display:block; width:82px; max-width:none; height:15px; }
.brand:focus-visible .brand-word { max-width:82px; margin-left:7px; opacity:1; }
.brand:focus-visible { opacity:1; }
@media (hover:hover) {
  .brand:hover { opacity:1; }
  .brand:hover .brand-word { max-width:82px; margin-left:7px; opacity:1; }
}
.brand--corner { position:absolute; right:8px; bottom:8px; background:rgba(15,15,15,.9); }
/* A paying customer's own logo, in the same place: a picture, not a link. */
.brand--logo { opacity:1; }
.brand--logo img { display:block; max-width:72px; height:18px; object-fit:contain; }

/* The call to action: over the video, in the corner the customer chose, and it stays while
   the bar fades. 8px in from the sides, as the bar is, so its edge lines up with the bar's.
   A bottom corner sits 8px above the bar; a top one 8px from the top, where nothing else
   is drawn. Bottom left is the plain .cta, so a page from before the choice lands there. */
.cta { position:absolute; bottom:48px; left:8px; max-width:calc(100% - 16px); padding:7px 12px; overflow:hidden; font-weight:600; color:#000; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; background:#fff; border-radius:4px; box-sizing:border-box; }
.cta--top-left, .cta--top-right { top:8px; bottom:auto; }
.cta--bottom-right, .cta--top-right { right:8px; left:auto; }
.cta:hover { background:#e6e6e6; }
.cta:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.stage.is-form .cta, .stage.is-failed .cta { display:none; }
/* The settings menu opens on the right: a CTA on that side steps aside while it is open.
   A browser without :has() keeps the menu on top of it instead (.menu's z-index). */
.stage:has(.menu:not([hidden])) .cta--bottom-right, .stage:has(.menu:not([hidden])) .cta--top-right { visibility:hidden; }

/* The lead form covers the video and scrolls inside the frame, however small that is. */
.stage.is-form .controls { display:none; }
.lead { position:absolute; top:0; right:0; bottom:0; left:0; display:flex; overflow:auto; background:rgba(0,0,0,.86); }
.lead-box { width:100%; max-width:440px; margin:auto; padding:12px 16px; box-sizing:border-box; }
.lead-title { margin:0 0 8px; font-size:15px; font-weight:600; }
.lead-fields { display:grid; grid-template-columns:repeat(auto-fit, minmax(130px, 1fr)); gap:8px; }
.lead-field span { display:block; margin-bottom:3px; font-size:12px; color:rgba(255,255,255,.8); }
.lead input[type=text], .lead input[type=email] { display:block; width:100%; height:30px; padding:0 8px; font:inherit; color:#fff; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.3); border-radius:4px; box-sizing:border-box; }
.lead input[type=text]::placeholder, .lead input[type=email]::placeholder { color:transparent; }
.lead input:focus-visible { outline:2px solid #fff; outline-offset:0; }
/* Off the page for people, there for a bot that fills in everything. */
.lead-hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.lead-consent { display:flex; align-items:flex-start; gap:8px; margin-top:8px; font-size:12px; line-height:1.35; color:rgba(255,255,255,.85); cursor:pointer; }
.lead-consent input { flex:none; width:16px; height:16px; margin:0; }
.lead-error { margin:6px 0 0; font-size:12px; font-weight:600; }
.lead-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px; }
.lead-submit { max-width:100%; padding:6px 14px; overflow:hidden; font:inherit; font-weight:600; color:#000; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; background:#fff; border:0; border-radius:4px; }
.lead-submit:hover { background:#e6e6e6; }
.lead-skip { padding:6px 8px; font:inherit; color:rgba(255,255,255,.8); cursor:pointer; background:none; border:0; border-radius:4px; }
.lead-skip:hover { color:#fff; background:rgba(255,255,255,.14); }
.lead-submit:focus-visible, .lead-skip:focus-visible { outline:2px solid #fff; outline-offset:1px; }
/* A short frame gives up the words over each box for words inside it. */
@media (max-height:260px) {
  .lead-box { padding:8px 12px; }
  .lead-title { margin-bottom:6px; font-size:13px; }
  .lead-field span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .lead input[type=text]::placeholder, .lead input[type=email]::placeholder { color:rgba(255,255,255,.6); }
  .lead-fields { gap:6px; }
  .lead-consent, .lead-actions { margin-top:6px; }
}

/* Over a call to action while it is open: one in the bottom right sits where it opens. */
.menu { position:absolute; z-index:1; right:8px; bottom:48px; min-width:140px; max-height:calc(100% - 56px); padding:4px 0 6px; overflow:auto; background:rgba(15,15,15,.95); border-radius:4px; }
.menu-title { margin:6px 12px 2px; font-size:11px; color:rgba(255,255,255,.6); }
.menu-item { position:relative; display:block; width:100%; padding:4px 12px 4px 28px; font:inherit; color:#fff; text-align:left; cursor:pointer; background:none; border:0; }
.menu-item:hover, .menu-item:focus-visible { background:rgba(255,255,255,.14); outline:0; }
.menu-item.is-on::before { content:"\2713"; position:absolute; left:10px; }

.spinner { position:absolute; top:50%; left:50%; width:44px; height:44px; margin:-22px 0 0 -22px; pointer-events:none; border:3px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:embed-spin .9s linear infinite; box-sizing:border-box; }
@keyframes embed-spin { to { transform:rotate(360deg); } }

.note { position:absolute; top:0; right:0; bottom:0; left:0; display:flex; flex-direction:column; align-items:center;
        justify-content:center; gap:12px; padding:24px; font-size:15px; text-align:center; background:rgba(0,0,0,.6); }
.note p { margin:0; max-width:40ch; }
.retry { padding:7px 16px; font:inherit; color:#000; cursor:pointer; background:#fff; border:0; border-radius:6px; }

/* A narrow iframe keeps what matters: play, the bar, the running time, full screen, the logo. */
@media (max-width:420px) {
  .clock-total { display:none; }
}
@media (max-width:520px) {
  .btn-play { width:44px; }
  .btn-pip { display:none; }
  .volume input, .volume:hover input, .volume:focus-within input { display:none; }
}
@media (max-width:340px) {
  .btn-settings { display:none; }
}
@media (pointer:coarse) {
  .cta { bottom:54px; }
  .cta--top-left, .cta--top-right { bottom:auto; }
  /* Under 16px, an iPhone zooms the page in on a field. */
  .lead input[type=text], .lead input[type=email] { height:34px; font-size:16px; }
  .controls { gap:6px; }
  .btn, .bar, .brand, input[type=range] { height:38px; }
  .btn { width:38px; }
  .btn-play { width:48px; }
  .menu { bottom:54px; }
  .menu-item { padding-top:9px; padding-bottom:9px; }
}

/* A password-protected video: its poster under a plain form, in a frame of any size. */
.lock { position:absolute; top:0; right:0; bottom:0; left:0; display:flex; overflow:auto; margin:0; background:rgba(0,0,0,.72); }
.lock-box { width:100%; max-width:340px; margin:auto; padding:12px 16px; box-sizing:border-box; }
.lock-title { margin:0 0 4px; overflow:hidden; font-size:15px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.lock-note { margin:0 0 10px; font-size:12px; color:rgba(255,255,255,.8); }
.lock-field span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
.lock input[type=password] { display:block; width:100%; height:32px; padding:0 8px; font:inherit; color:#fff; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.3); border-radius:4px; box-sizing:border-box; }
.lock input[type=password]::placeholder { color:rgba(255,255,255,.55); }
.lock input:focus-visible { outline:2px solid #fff; outline-offset:0; }
.lock-error { margin:6px 0 0; font-size:12px; font-weight:600; }
.lock-submit { margin-top:8px; padding:6px 16px; font:inherit; font-weight:600; color:#000; cursor:pointer; background:#fff; border:0; border-radius:4px; }
.lock-submit:hover { background:#e6e6e6; }
.lock-submit:focus-visible { outline:2px solid #fff; outline-offset:1px; }
@media (max-height:200px) {
  .lock-note { display:none; }
  .lock-box { padding:6px 12px; }
}
@media (pointer:coarse) {
  /* Under 16px, an iPhone zooms the page in on a field. */
  .lock input[type=password] { height:38px; font-size:16px; }
  .lock-submit { padding:9px 18px; }
}
