/* Case Code OS tutorials: the click-to-play player and the video lists, used by the Training
   section of /apps/case-code-os and by /apps/case-code-os/tutorials. Files under /assets are
   cached for a year, so bump the number in this file's name (and every <link>) when changing it. */

.course-band{position:relative; overflow:hidden}
.course-band::before{
  content:""; position:absolute; inset:-30% -10% auto auto; width:60rem; height:40rem; pointer-events:none;
  background:radial-gradient(closest-side,rgba(77,203,222,.16),transparent 70%);
}
.course-band > .container{position:relative}
.course-band h2{color:#fff}
.course{display:grid; gap:1.75rem; margin-top:2.5rem; align-items:start}
@media (min-width:62rem){ .course{grid-template-columns:minmax(0,1.75fr) minmax(0,1fr); gap:2.25rem} }

/* player */
.player{border-radius:18px; overflow:hidden; background:#000; border:1px solid var(--deep-rule); box-shadow:0 40px 80px -40px rgba(0,0,0,.8)}
.player__screen{position:relative; aspect-ratio:16/9; background:#000}
.player__poster{position:absolute; inset:0; display:block; cursor:pointer; color:inherit}
.player__poster img{width:100%; height:100%; object-fit:cover; transition:transform .5s ease, filter .3s}
.player__poster:hover img{transform:scale(1.015); filter:brightness(.9)}
.player__play{
  position:absolute; left:50%; top:50%; width:5.25rem; height:5.25rem; transform:translate(-50%,-50%);
  border-radius:50%; background:rgba(255,255,255,.96); display:grid; place-items:center;
  box-shadow:0 14px 34px rgba(0,0,0,.4); transition:transform .2s ease;
}
.player__play::before{content:""; position:absolute; inset:-.6rem; border-radius:50%; border:2px solid rgba(255,255,255,.5); animation:cc-ring 2.6s ease-out infinite}
.player__play svg{width:1.9rem; height:1.9rem; margin-left:.3rem; fill:var(--link)}
.player__poster:hover .player__play{transform:translate(-50%,-50%) scale(1.07)}
.player__poster:focus-visible{outline:3px solid var(--deep-link); outline-offset:-3px}
.player__len{
  position:absolute; inset-inline-end:.9rem; bottom:.9rem; padding:.2rem .55rem; border-radius:6px;
  background:rgba(4,12,14,.8); color:#fff; font:500 .8125rem/1.4 'JBMono',ui-monospace,monospace;
}
.player iframe{position:absolute; inset:0; width:100%; height:100%; border:0}
@keyframes cc-ring{0%{transform:scale(.92); opacity:.9} 100%{transform:scale(1.35); opacity:0}}
@media (prefers-reduced-motion:reduce){ .player__play::before{animation:none} .player__poster img{transition:none} }

.player__info{padding:1.25rem 1.4rem 1.4rem; background:var(--deep-2); color:var(--deep-ink)}
.player__kicker{display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; font:500 .75rem/1.4 'JBMono',ui-monospace,monospace; letter-spacing:.08em; text-transform:uppercase; color:var(--deep-link)}
.player__kicker .lang-note{color:var(--deep-ink-2); border:1px solid var(--deep-rule); border-radius:999px; padding:.1rem .55rem; letter-spacing:.04em}
.player__info h3{margin-top:.5rem; font-size:clamp(1.25rem,2.2vw,1.625rem); line-height:1.2; color:#fff}
.player__info p{margin-top:.5rem; color:var(--deep-ink-2); max-width:62ch}
.player__meta{display:flex; gap:.5rem 1.25rem; align-items:center; flex-wrap:wrap; margin-top:1rem; font-size:.875rem; color:var(--deep-ink-2)}
.player__meta a{color:var(--deep-link); font-weight:600; text-decoration:none}
.player__meta a:hover{text-decoration:underline}
.player__steps{display:flex; gap:.5rem; margin-inline-start:auto}
.step-btn{
  font:inherit; font-size:.875rem; font-weight:600; color:var(--deep-ink); background:transparent; cursor:pointer;
  border:1px solid var(--deep-rule); border-radius:999px; min-height:44px; padding:.4rem 1rem; display:inline-flex; align-items:center; gap:.4rem;
}
.step-btn:hover:not(:disabled){border-color:var(--deep-ink)}
.step-btn:disabled{opacity:.35; cursor:default}
.step-btn svg{width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round}
[dir=rtl] .step-btn svg{transform:scaleX(-1)}
html[lang=en] .lang-note{display:none}

/* the list beside the player */
.vlist-head{display:flex; justify-content:space-between; align-items:baseline; gap:1rem; margin-bottom:.75rem}
.vlist-head .tag{color:var(--deep-ink-2)}
.vlist{list-style:none; display:grid; gap:.5rem}
.vitem{
  display:grid; grid-template-columns:7.5rem minmax(0,1fr); gap:.9rem; align-items:center; padding:.5rem;
  border-radius:14px; border:1px solid transparent; color:var(--deep-ink); text-decoration:none;
  transition:background .15s, border-color .15s;
}
.vitem:hover{background:rgba(255,255,255,.04); border-color:var(--deep-rule)}
.vitem[aria-current="true"]{background:rgba(77,203,222,.08); border-color:rgba(77,203,222,.45)}
.vitem:focus-visible{outline:2px solid var(--deep-link); outline-offset:2px}
.vthumb{position:relative; border-radius:9px; overflow:hidden; aspect-ratio:16/9; background:#000}
.vthumb img{width:100%; height:100%; object-fit:cover}
.vthumb .v-time{
  position:absolute; inset-inline-end:.3rem; bottom:.3rem; padding:0 .35rem; border-radius:4px;
  background:rgba(4,12,14,.82); color:#fff; font:500 .6875rem/1.5 'JBMono',ui-monospace,monospace;
}
.vitem[aria-current="true"] .vthumb::after{
  content:""; position:absolute; inset:0; background:rgba(4,12,14,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/1.4rem no-repeat;
}
.vtext{display:grid; gap:.15rem; min-width:0}
.v-num{font:500 .6875rem/1.4 'JBMono',ui-monospace,monospace; letter-spacing:.08em; color:var(--deep-link)}
.v-title{font-weight:700; line-height:1.3; font-size:.9375rem}
.vitem .v-sum,.vitem .v-who{display:none}
.course-links{display:flex; flex-wrap:wrap; gap:.75rem; margin-top:1.25rem}
.btn--yt,.btn--yt-light{display:inline-flex; align-items:center; gap:.55rem}
.btn--yt{background:transparent; color:var(--deep-ink); border:1px solid var(--deep-rule)}
.btn--yt:hover{border-color:var(--deep-ink)}
.btn--yt svg{width:20px; height:20px; flex:none}

/* the full course on /apps/case-code-os/tutorials */
.course-facts{display:flex; flex-wrap:wrap; gap:.5rem; margin-top:1.75rem; list-style:none}
.course-facts li{padding:.35rem .85rem; border:1px solid var(--rule); border-radius:999px; background:var(--surface); font-size:.875rem; font-weight:600; color:var(--ink-2)}
.chapter + .chapter{margin-top:clamp(3rem,6vw,4.5rem)}
.chapter__head{display:grid; gap:.5rem; margin-bottom:1.5rem}
.chapter__head h2{font-size:clamp(1.5rem,2.8vw,2rem)}
.chapter__head p{color:var(--ink-2); max-width:62ch}
.vgrid{list-style:none; display:grid; gap:1.5rem 1.25rem; grid-template-columns:repeat(auto-fill,minmax(min(100%,16rem),1fr))}
.vcard{display:grid; gap:.75rem; color:var(--ink); text-decoration:none; border-radius:16px}
.vcard .vthumb{border-radius:14px; border:1px solid var(--rule); transition:transform .2s ease, box-shadow .2s ease}
.vcard:hover .vthumb{transform:translateY(-3px); box-shadow:0 16px 32px -16px rgba(0,0,0,.45)}
.vcard .vthumb::before{
  content:""; position:absolute; left:50%; top:50%; width:3rem; height:3rem; transform:translate(-50%,-50%); border-radius:50%; z-index:1;
  background:rgba(255,255,255,.95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2308718A'%3E%3Cpath d='M9 5.5v13l10-6.5z'/%3E%3C/svg%3E") center/1.3rem no-repeat;
  opacity:0; transition:opacity .2s;
}
.vcard:hover .vthumb::before,.vcard:focus-visible .vthumb::before{opacity:1}
.vcard[aria-current="true"] .vthumb{box-shadow:0 0 0 3px var(--link)}
.vcard .v-num{color:var(--link)}
.vcard .v-title{font-size:1.0625rem}
.vcard .v-sum{display:block; color:var(--ink-2); font-size:.9375rem; line-height:1.5}
.vcard .v-who{display:none}
.coming{margin-top:clamp(3rem,6vw,4.5rem); padding:1.25rem 1.4rem; border:1px dashed var(--rule-strong); border-radius:16px; display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between}
.coming p{color:var(--ink-2); max-width:60ch}
.btn--yt-light{background:var(--surface); color:var(--ink); border:1px solid var(--rule)}
.btn--yt-light:hover{border-color:var(--ink)}
.btn--yt-light svg{width:20px; height:20px; flex:none}
.crumbs{font-size:.875rem; color:var(--ink-3); margin-bottom:1.25rem}
.crumbs a{color:var(--link); text-decoration:none; font-weight:600}
.crumbs a:hover{text-decoration:underline}
:lang(ar) .player__kicker,:lang(ar) .v-num{letter-spacing:0}
:lang(ar) .player__kicker .lang-note{font-family:'Manrope',ui-sans-serif,system-ui,sans-serif; font-size:.8125rem; letter-spacing:0; text-transform:none}
@media (max-width:40rem){
  .player__play{width:3.75rem; height:3.75rem}
  .player__play svg{width:1.4rem; height:1.4rem; margin-left:.2rem}
  .player__info{padding:1rem 1.1rem 1.1rem}
  .player__steps{margin-inline-start:0; width:100%}
  .vitem{grid-template-columns:6.25rem minmax(0,1fr)}
}
