/* The locked YouTube player. Self-contained tokens so it can drop into the
   public site, the course page or the learner shell without inheriting. */
.ytl{
  --ytl-ink:#12121a;
  --ytl-line:rgba(255,255,255,.16);
  --ytl-bar:rgba(10,10,16,.92);
  position:relative;display:flex;flex-direction:column;
  border-radius:16px;overflow:hidden;background:var(--ytl-ink);
  box-shadow:0 18px 44px rgba(16,16,32,.20);
  -webkit-user-select:none;user-select:none;
}
.ytl:focus-visible{outline:2px solid #5B4FE9;outline-offset:3px}

.ytl-stage{position:relative;width:100%;aspect-ratio:16/9;background:#000;overflow:hidden}
.ytl-stage > iframe,.ytl-stage > .ytl-frame{
  position:absolute;inset:0;width:100%;height:100%;border:0;display:block;
  pointer-events:none;              /* clicks never reach YouTube's own UI */
}

/* Sits over the frame: takes every click, kills the context menu, and hides
   the strip where the title and Watch-on-YouTube link would appear. */
.ytl-shield{position:absolute;inset:0;cursor:pointer;background:transparent;z-index:3}

.ytl-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}
.ytl.is-live .ytl-poster{display:none}

.ytl-big{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:4;
  width:74px;height:74px;border-radius:50%;border:0;cursor:pointer;
  background:rgba(255,255,255,.94);color:var(--ytl-ink);
  display:grid;place-items:center;box-shadow:0 10px 30px rgba(0,0,0,.34);
  transition:transform .16s ease,background .16s ease;
}
.ytl-big:hover{transform:translate(-50%,-50%) scale(1.06);background:#fff}
.ytl-big::after{
  content:"";width:0;height:0;margin-left:5px;
  border-left:21px solid currentColor;border-top:13px solid transparent;
  border-bottom:13px solid transparent;
}
.ytl.is-live .ytl-big,.ytl.is-loading .ytl-big{display:none}

.ytl-tag{
  position:absolute;left:14px;top:14px;z-index:4;display:inline-flex;align-items:center;gap:6px;
  padding:6px 11px;border-radius:999px;font-size:12px;font-weight:700;letter-spacing:.01em;
  background:rgba(10,10,16,.72);color:#fff;backdrop-filter:blur(6px);
}
.ytl-tag svg{width:13px;height:13px}
.ytl.is-live .ytl-tag{display:none}

.ytl-spin{
  position:absolute;left:50%;top:50%;margin:-17px 0 0 -17px;z-index:4;display:none;
  width:34px;height:34px;border-radius:50%;border:3px solid rgba(255,255,255,.3);
  border-top-color:#fff;animation:ytl-spin .8s linear infinite;
}
.ytl.is-loading .ytl-spin{display:block}
@keyframes ytl-spin{to{transform:rotate(360deg)}}

/* our controls — the only ones on screen */
.ytl-bar{
  display:flex;align-items:center;gap:12px;padding:10px 13px;
  background:var(--ytl-bar);color:#fff;
}
.ytl-btn{
  width:34px;height:34px;flex:none;border:0;border-radius:9px;cursor:pointer;
  background:rgba(255,255,255,.10);color:#fff;display:grid;place-items:center;
  transition:background .14s ease;
}
.ytl-btn:hover{background:rgba(255,255,255,.2)}
.ytl-btn svg{width:16px;height:16px;fill:currentColor}
.ytl-btn .on,.ytl.is-playing .ytl-btn .off{display:none}
.ytl.is-playing .ytl-play .on{display:block}
.ytl-mute .on{display:none}
.ytl.is-muted .ytl-mute .on{display:block}
.ytl.is-muted .ytl-mute .off{display:none}

.ytl-scrub{
  flex:1;min-width:0;height:16px;position:relative;cursor:pointer;
  display:flex;align-items:center;
}
.ytl-scrub::before{content:"";position:absolute;left:0;right:0;height:4px;border-radius:999px;
  background:rgba(255,255,255,.22)}
.ytl-fill{position:absolute;left:0;height:4px;width:0;border-radius:999px;background:#fff}
.ytl-time{font-size:12px;font-variant-numeric:tabular-nums;color:rgba(255,255,255,.82);
  white-space:nowrap;flex:none}

.ytl.is-full{border-radius:0;height:100vh;justify-content:center;background:#000}
.ytl.is-full .ytl-stage{aspect-ratio:auto;flex:1;min-height:0}

.ytl.is-broken .ytl-stage::after{
  content:"This review is not available right now.";
  position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:20px;
  text-align:center;color:rgba(255,255,255,.72);font-size:14px;background:#12121a;
}

@media(max-width:600px){
  .ytl-big{width:60px;height:60px}
  .ytl-big::after{border-left-width:17px;border-top-width:11px;border-bottom-width:11px}
  .ytl-time{display:none}
}
