/* ytbe.com shared player look (Jeff 12-03: cohesive players site-wide).
   Reference: the AI services example player. One stylesheet for every cover, play button, control bar and chapter picker.
   Light DOM uses .yp-* classes. The region between the @shadow markers is embedded into the demo web components'
   shadow roots by build.mjs (the tokens below are inherited through the shadow boundary). */
:root{--yp-or:#ff813e;--yp-acc:#0089ce;--yp-acc2:#66c6ff;--yp-bar:#08111f;--yp-bar-line:#1b2e47;--yp-btn:#0f1f35;--yp-btn-line:#24405f;--yp-btn-hover:#17304f;--yp-btn-hover-line:#3b6591;--yp-ink:#dbe8f5;--yp-mut:#7d96b0;--yp-pop:#0c1b30;--yp-pop-line:#2b4666;--yp-pop-cur:#123a5c;--yp-dot:#2a4361}
.demo-wrap>:first-child{isolation:isolate}
.yp-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- cover: softened poster and one centred play button ---- */
.yp-cover{position:absolute;inset:0;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;width:100%;height:100%;padding:0;margin:0;border:0;background:#0b192b;cursor:pointer;overflow:hidden;border-radius:inherit;z-index:2;color:#fff;font:inherit}
.yp-cover>img{grid-area:1/1;display:block;width:100%;height:100%;object-fit:cover;filter:blur(1.5px) saturate(.75) brightness(.72);transform:scale(1.02);transition:filter .25s,transform .25s}
.yp-cover:hover>img,.yp-cover:focus-visible>img{filter:blur(0) saturate(.9) brightness(.8)}
.yp-cover>.yp-play{grid-area:1/1;z-index:1}
.yp-cover:focus-visible{outline:none}
.yp-cover.is-off{opacity:0;visibility:hidden;pointer-events:none}
.yp-play{display:block;width:76px;height:76px;border-radius:50%;border:1px solid rgba(255,214,190,.55);background:rgba(255,129,62,.62) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.5 5.6v12.8c0 .8.9 1.3 1.6.9l10-6.4c.6-.4.6-1.3 0-1.7l-10-6.4c-.7-.4-1.6.1-1.6.9z' fill='%23FFFFFF'/></svg>") no-repeat center/30px;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 10px 30px rgba(0,0,0,.35);-webkit-backdrop-filter:blur(12px) saturate(1.4);backdrop-filter:blur(12px) saturate(1.4);transition:transform .2s,background-color .2s}
.yp-cover:hover .yp-play,.yp-cover:focus-visible .yp-play{transform:scale(1.06);background-color:rgba(255,129,62,.8);box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 12px 32px rgba(0,0,0,.4)}
.yp-cover:focus-visible .yp-play{outline:3px solid #fff;outline-offset:4px}
@media(max-width:560px){.yp-play{width:62px;height:62px;background-size:25px}}
@media(prefers-reduced-motion:reduce){.yp-cover>img,.yp-play{transition:none}}
/* ---- scrubber: one rail with chapter ticks along the bottom of the stage ---- */
.yp-rail{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(255,255,255,.14);z-index:70}
.yp-fill{display:block;height:100%;width:0;background:var(--yp-acc2)}
.yp-tick{position:absolute;bottom:0;width:3px;height:13px;min-width:0!important;padding:0!important;margin-left:-1.5px;border:0!important;border-radius:2px!important;background:#0b1626!important;box-shadow:0 0 0 1.5px rgba(255,255,255,.92);cursor:pointer;transition:background .2s,transform .2s}
.yp-tick::before{content:'';position:absolute;left:-7px;right:-7px;top:-8px;bottom:-8px}
.yp-tick.on{background:#fff!important;box-shadow:0 0 0 1.5px var(--yp-acc)}
.yp-tick.cur{background:var(--yp-or)!important}
.yp-tick:hover{background:var(--yp-or)!important;transform:scaleY(1.35)}
.yp-tick:focus-visible{outline:2px solid var(--yp-or);outline-offset:4px}
/* ---- control bar and chapter picker (light DOM) ---- */
.yp-bar{position:relative;flex:none;display:flex;align-items:center;gap:6px;padding:8px 16px;background:var(--yp-bar);border-top:1px solid var(--yp-bar-line);color:#aebfd1;font-size:14px}
.yp-bar button{min-width:40px;height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--yp-btn-line);background:var(--yp-btn);color:var(--yp-ink);display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font:inherit;font-size:13.5px;font-weight:600;white-space:nowrap;transition:background .2s,border-color .2s}
.yp-bar button:hover{background:var(--yp-btn-hover);border-color:var(--yp-btn-hover-line)}
.yp-bar button:focus-visible{outline:3px solid var(--yp-or);outline-offset:2px}
.yp-bar button:disabled{opacity:.4;cursor:default}
.yp-bar button svg{width:14px;height:14px;flex:none}
.yp-bar .yp-main{background:var(--yp-acc);border-color:#2aa0dc;color:#fff}
.yp-bar .yp-main:hover{background:#087cb4}
.yp-lab{margin-left:auto;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#d3e1ef;font-weight:600}
.yp-lab small{color:var(--yp-mut);font-weight:500;margin-right:10px}
.yp-chap{margin-left:0}
.yp-bar .yp-full{margin-left:6px}
.yp-bar .yp-pill{padding:0 14px 0 12px}
.yp-pill em{font-style:normal;color:var(--yp-mut);font-weight:500;font-variant-numeric:tabular-nums}
.yp-bar .yp-pill[aria-expanded=true]{background:var(--yp-btn-hover);border-color:var(--yp-btn-hover-line)}
.yp-pop{display:none;position:absolute;left:16px;bottom:calc(100% + 8px);width:min(380px,calc(100% - 32px));max-height:min(60vh,360px);overflow:auto;margin:0;padding:6px;list-style:none;z-index:80;background:var(--yp-pop);border:1px solid var(--yp-pop-line);border-radius:14px;box-shadow:0 18px 48px rgba(0,5,15,.6)}
.yp-pop.on{display:block}
.yp-pop li{margin:0;padding:0}
.yp-bar .yp-pop button{width:100%;height:auto;min-height:42px;border-radius:9px;border:0;background:none;display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:8px 10px;text-align:left;font-size:14px;font-weight:550;color:#cfdeed}
.yp-bar .yp-pop button:hover{background:#15294a}
.yp-bar .yp-pop button:focus-visible{outline:3px solid var(--yp-or);outline-offset:-2px}
.yp-pop button i{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:12px;font-weight:700;background:#16304f;color:#8fb0cf}
.yp-pop button.done i{background:#103a52;color:var(--yp-acc2)}
.yp-bar .yp-pop button.cur{background:var(--yp-pop-cur);color:#fff;font-weight:650;box-shadow:inset 3px 0 0 var(--yp-or)}
.yp-pop button.cur i{background:var(--yp-or);color:#0b1626}
@media(max-width:720px){.yp-bar{flex-wrap:wrap;padding:8px 10px;gap:6px;row-gap:6px}.yp-bar button{padding:0 11px;gap:6px;font-size:13px}.yp-bar .yp-full{margin-left:0}.yp-lab{flex:1 0 100%;order:-1;text-align:left;padding:2px 4px 6px}
/* @shadow */
/* the stage follows the current chapter's content: its height eases (the scene is scaled by width only) */
.stage{transition:height .35s ease}
@media(prefers-reduced-motion:reduce){.stage{transition:none}}
/* demo web components (shadow DOM): same bar, buttons, pill and popover look */
.ctrls{gap:6px;margin-top:0;padding:8px 12px;background:var(--yp-bar,#08111f);border:1px solid var(--yp-bar-line,#1b2e47);border-top:0;border-radius:0 0 10px 10px;color:#aebfd1}
.ctrls button{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;min-width:40px;border-radius:999px;border:1px solid var(--yp-btn-line,#24405f);background:var(--yp-btn,#0f1f35);color:var(--yp-ink,#dbe8f5);padding:0 14px;font-size:13.5px;font-weight:600;transition:background .2s,border-color .2s}
.ctrls button:hover{background:var(--yp-btn-hover,#17304f);border-color:var(--yp-btn-hover-line,#3b6591);color:#fff}
.ctrls button:focus-visible{outline:3px solid var(--yp-or,#ff813e);outline-offset:2px}
.ctrls button[disabled]:hover{background:var(--yp-btn,#0f1f35);border-color:var(--yp-btn-line,#24405f);color:var(--yp-ink,#dbe8f5)}
.ctrls #btnPlay{background:var(--yp-acc,#0089ce);border-color:#2aa0dc;color:#fff}
.ctrls #btnPlay:hover{background:#087cb4;border-color:#2aa0dc}
.ctrls .chapbtn .cnt{color:var(--yp-mut,#7d96b0);font-weight:500}
.ctrls .chapbtn button[aria-expanded=true]{background:var(--yp-btn-hover,#17304f);border-color:var(--yp-btn-hover-line,#3b6591)}
.ctrls button svg{width:14px;height:14px;flex:none}
.ctrls .chapbtn svg{width:16px;height:16px;flex:none}
.ctrls .vswitch .trk{background:var(--yp-dot,#2a4361)}
.ctrls .stepnote{color:#d3e1ef;font-weight:600;font-size:13px}
.progress{background:var(--yp-acc2,#66c6ff)}
.ticks .tick:hover,.ticks .tick.done:hover{background:var(--yp-or,#ff813e)}
.chapmenu{background:var(--yp-pop,#0c1b30);border:1px solid var(--yp-pop-line,#2b4666);border-radius:14px;box-shadow:0 18px 48px rgba(0,5,15,.6);padding:6px;min-width:300px}
.chapmenu .row{align-items:center;gap:12px;min-height:42px;padding:8px 10px;border-radius:9px;font-size:14px;font-weight:550;color:#cfdeed}
.chapmenu .row:hover{background:#15294a;color:#fff}
.chapmenu .row:focus-visible{outline:3px solid var(--yp-or,#ff813e);outline-offset:-2px}
.chapmenu .row .i{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:700;background:#16304f;color:#8fb0cf}
.chapmenu .row.done .i{background:#103a52;color:var(--yp-acc2,#66c6ff)}
.chapmenu .row.cur{background:var(--yp-pop-cur,#123a5c);color:#fff;font-weight:650;box-shadow:inset 3px 0 0 var(--yp-or,#ff813e)}
.chapmenu .row.cur .i{background:var(--yp-or,#ff813e);color:#0b1626}
.chapmenu .empty{color:var(--yp-mut,#7d96b0)}
@media(max-width:720px){.ctrls{padding:8px 10px;gap:6px}.ctrls button{padding:0 11px;gap:6px;font-size:13px}.ctrls .stepnote{flex:1 0 100%;order:-1;padding:2px 4px 6px}.ctrls .spacer{display:none}.ctrls .chapbtn{position:static}.chapmenu{left:10px;right:10px;min-width:0;max-width:none;bottom:calc(100% + 8px)}.ctrls{position:relative}}
/* fullscreen: the stage fills the screen above the control bar and the demo is centred */
.wrap:fullscreen{display:flex;flex-direction:column;width:100vw;height:100vh;background:#06101c}
.wrap:fullscreen .cap-top{display:none}
.wrap:fullscreen .stage{height:auto!important;transition:none;flex:1 1 auto;min-height:0;width:auto;aspect-ratio:auto!important;border:0;border-radius:0;box-shadow:none;background:#06101c}
.wrap:fullscreen .ctrls{border-radius:0;border-left:0;border-right:0}
/* @end-shadow */
