/* ------------------------------------------------------------------
   YS Lesson Path + Lesson Player
   Same visual language as the student dashboard: navy sidebar, cream
   surface, white 18px cards, serif headings, gold only for action.
   ------------------------------------------------------------------ */

/* ====================== Path card (classroom) ===================== */
.ys-path {
  --path-radius: 18px;
  --path-shadow: 0 2px 8px rgba(20,32,66,0.04), 0 8px 24px rgba(20,32,66,0.08);
  background: #fff; border: 1px solid rgba(201,169,97,0.22);
  border-radius: var(--path-radius); padding: 28px; box-shadow: var(--path-shadow);
  color: var(--ys-navy); margin-bottom: 32px;
}
.ys-path-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ys-path-title {
  font-family: var(--ys-serif); font-size: 1.75rem; font-weight: 700;
  line-height: 1.15; letter-spacing: -0.01em; color: var(--ys-navy); margin: 0;
}
.ys-path-count { font-size: 0.875rem; font-weight: 600; color: var(--ys-gold-dark); white-space: nowrap; }
.ys-path-empty { font-size: 1.0625rem; color: var(--ys-text-muted); margin: 12px 0 0; }

.ys-path-progress {
  height: 6px; margin: 16px 0 8px; border-radius: 980px;
  background: rgba(20,32,66,0.08); overflow: hidden;
}
.ys-path-progress-fill { display: block; height: 100%; border-radius: 980px; background: var(--ys-gold-gradient); }

.ys-path-module {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ys-gold-dark); margin: 20px 0 8px;
}
.ys-path-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ys-block.ys-path .ys-path-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 0 -12px; border-radius: 10px;
  text-decoration: none; color: var(--ys-navy);
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ys-block.ys-path .ys-path-item:hover { background: rgba(20,32,66,0.05); color: var(--ys-navy); }
.ys-block.ys-path .ys-path-item:focus-visible { outline: 3px solid var(--ys-focus-on-light); outline-offset: 2px; }
.ys-path-item-icon { display: inline-flex; color: var(--ys-gold-dark); flex: 0 0 auto; }
.ys-path-item-title { font-size: 0.9375rem; font-weight: 600; min-width: 0; }
.ys-path-item.is-done .ys-path-item-title { color: var(--ys-text-muted); font-weight: 400; }
.ys-path-item-file { display: inline-flex; align-items: center; color: var(--ys-gold-dark); flex: 0 0 auto; }
.ys-path-item-file svg { width: 16px; height: 16px; }
.ys-path-item-duration { font-size: 0.8125rem; color: var(--ys-text-muted); margin-left: auto; white-space: nowrap; }
.ys-path-item-check {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; margin-left: auto;
  border: 1.5px solid rgba(20,32,66,0.25);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
}
.ys-path-item-duration + .ys-path-item-check { margin-left: 0; }
.ys-path-item-check.is-done { background: var(--ys-gold-dark); border-color: var(--ys-gold-dark); }
.ys-block.ys-path .ys-path-continue { margin-top: 20px; }

/* ========================= Lesson player ========================== */
.ys-player {
  display: flex; align-items: stretch; min-height: 100vh;
  background: var(--ys-cream-light); color: var(--ys-navy);
}

/* --- Navy sidebar: the path --- */
.ys-player-side {
  flex: 0 0 340px; width: 340px; box-sizing: border-box;
  background: linear-gradient(180deg, var(--ys-navy) 0%, var(--ys-navy-deep) 100%);
  color: var(--ys-cream); padding: 28px 24px 48px;
  position: sticky; top: 0; align-self: flex-start;
  min-height: 100vh; max-height: 100vh; overflow-y: auto;
}
.ys-block.ys-player .ys-player-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.875rem; font-weight: 600; text-decoration: none;
  color: var(--ys-gold-light);
}
.ys-block.ys-player .ys-player-back:hover { color: #fff; }
.ys-block.ys-player .ys-player-back:focus-visible { outline: 3px solid var(--ys-focus-on-dark); outline-offset: 2px; }
.ys-player-course {
  font-family: var(--ys-serif); font-size: 1.5rem; font-weight: 700;
  line-height: 1.2; color: #fff; margin: 18px 0 14px;
}
.ys-player-progressrow { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ys-player-progress {
  flex: 1; height: 6px; border-radius: 980px;
  background: rgba(255,255,255,0.18); overflow: hidden;
}
.ys-player-progress-fill { display: block; height: 100%; border-radius: 980px; background: var(--ys-gold-gradient); }
.ys-player-pct { font-size: 0.8125rem; font-weight: 600; color: var(--ys-gold-light); }

.ys-player-module {
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ys-gold-light); margin: 24px 0 6px;
}
.ys-player-list { list-style: none; margin: 0; padding: 0; }
.ys-block.ys-player .ys-player-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin: 0 -10px; border-left: 3px solid transparent; border-radius: 8px;
  text-decoration: none; color: rgba(245,239,224,0.82);
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ys-block.ys-player .ys-player-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.ys-block.ys-player .ys-player-item:focus-visible { outline: 3px solid var(--ys-focus-on-dark); outline-offset: -3px; }
.ys-block.ys-player .ys-player-item.is-active {
  background: rgba(255,255,255,0.1); border-left-color: var(--ys-gold);
  color: #fff;
}
.ys-player-item-icon { display: inline-flex; color: var(--ys-gold-light); flex: 0 0 auto; }
.ys-player-item-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ys-player-item-title { font-size: 0.9375rem; line-height: 1.35; }
.ys-player-item.is-active .ys-player-item-title { font-weight: 600; }
.ys-player-item-duration { font-size: 0.75rem; color: rgba(245,239,224,0.6); }
.ys-player-check { margin-left: auto; color: var(--ys-gold); font-weight: 700; flex: 0 0 auto; }

/* --- Main pane: the lesson --- */
.ys-player-main { flex: 1; min-width: 0; padding: 28px 48px 80px; }
.ys-player-topbar { display: flex; justify-content: space-between; gap: 16px; }
/* --- Live-lesson stage: a warm navy "call lobby" nested inside the
   white .ys-player-card, instead of plain text on white. One authored
   motion moment — the orb's breathing glow — carries the "ready to
   connect" feeling; everything else holds still. --- */
.ys-block.ys-player .ys-meet { padding: 0; }
.ys-meet-stage {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--ys-navy) 0%, var(--ys-navy-deep) 100%);
  border-radius: 16px; padding: 48px 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  min-height: 280px;
}
.ys-meet-lobby {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 18px; max-width: 360px;
}
.ys-meet-orb {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(226,194,128,0.14); border: 1px solid rgba(226,194,128,0.3);
  color: var(--ys-gold-light);
}
.ys-meet-orb svg { width: 26px; height: 26px; }
.ys-meet-orb::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(226,194,128,0.35);
  animation: ys-meet-breathe 2.8s ease-in-out infinite;
}
@keyframes ys-meet-breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.18); opacity: 0; }
}
.ys-meet-none { font-size: 1rem; color: rgba(245,239,224,0.72); margin: 0; }
.ys-meet-next {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 1.0625rem; font-weight: 600; color: rgba(245,239,224,0.92); margin: 0;
}
.ys-meet-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ys-gold-light); flex: 0 0 auto; }
.ys-meet-lobby .ys-btn-gold { margin-top: 2px; }
.ys-meet-status { font-size: 0.875rem; color: rgba(245,239,224,0.68); text-align: center; margin: 0; }
.ys-meet-fallback {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  font-size: 0.875rem; margin: 0;
}
.ys-meet-applink { font-weight: 600; color: var(--ys-gold-light); text-decoration: none; }
.ys-meet-applink:hover { text-decoration: underline; }
.ys-meet-pass {
  color: rgba(245,239,224,0.65); font-variant-numeric: tabular-nums;
  padding: 2px 10px; border-radius: 980px; background: rgba(255,255,255,0.08);
}
.ys-meet-join:focus-visible,
.ys-meet-applink:focus-visible { outline: 3px solid var(--ys-focus-on-dark); outline-offset: 2px; border-radius: 980px; }

/* The embed box: the moment "join" is pressed it claims its height
   (our spinner) and then hosts the same-origin iframe running Zoom's
   full web client — camera, mic, chat, share, participants and Zoom's
   own waiting screens all live inside it. */
.ys-meet-embed { position: relative; display: none; width: 100%; border-radius: 12px; overflow: hidden; }
.ys-meet.is-connecting .ys-meet-lobby,
.ys-meet.is-live .ys-meet-lobby { display: none; }
.ys-meet.is-live .ys-meet-embed { display: block; min-height: 420px; background: #080e20; }
.ys-meet.is-connecting .ys-meet-embed {
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,14,32,0.3);
}
.ys-meet.is-connecting .ys-meet-embed::before {
  content: ""; position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(226,194,128,0.25); border-top-color: var(--ys-gold-light);
  animation: ys-meet-spin 0.8s linear infinite;
}
@keyframes ys-meet-spin { to { transform: rotate(360deg); } }
.ys-meet-frame { display: block; width: 100%; height: 100%; border: 0; }

/* .ys-meet prefix beats the Elementor kit's global `button` styles. */
.ys-meet .ys-meet-leave, .ys-meet .ys-meet-fullscreen {
  appearance: none; cursor: pointer; font: inherit; font-size: 0.875rem; font-weight: 600;
  line-height: 1.2; color: rgba(245,239,224,0.82); background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18); border-radius: 980px; padding: 8px 22px;
  box-shadow: none; text-transform: none; letter-spacing: normal;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ys-meet .ys-meet-fullscreen:hover { background: rgba(255,255,255,0.15); color: #fff; }
/* Leave is the one destructive act in the call — the conventional
   hang-up red, tuned down to sit with the navy. */
.ys-meet .ys-meet-leave { background: #9e3c36; border-color: transparent; color: #fff; }
.ys-meet .ys-meet-leave:hover { background: #88312c; color: #fff; }
.ys-meet .ys-meet-leave:focus-visible, .ys-meet .ys-meet-fullscreen:focus-visible {
  outline: 3px solid var(--ys-focus-on-dark); outline-offset: 2px;
}

/* In the call: the stage tightens and the video takes the whole card,
   topped by a slim bar — live badge left, leave right. */
.ys-meet-bar { display: none; }
.ys-meet.is-live .ys-meet-bar {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
}
.ys-meet.is-live .ys-meet-stage { padding: 12px; gap: 10px; min-height: 0; }
.ys-meet.is-live .ys-meet-fallback { display: none; }
.ys-meet-badge {
  display: inline-flex; align-items: center; gap: 9px; padding-left: 8px;
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; color: rgba(245,239,224,0.92);
}
.ys-meet-badge .ys-meet-pulse { animation: ys-meet-blink 1.8s ease-in-out infinite; }
@keyframes ys-meet-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.ys-meet-bar-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Fullscreen: the stage becomes the whole display — square it off and
   let the embed take every pixel the bar doesn't need. */
.ys-meet-stage:fullscreen { border-radius: 0; padding: 16px; }
.ys-meet-stage:fullscreen .ys-meet-embed { border-radius: 8px; }

@media (max-width: 734px) {
  .ys-meet-stage { padding: 36px 22px; min-height: 240px; }
  .ys-meet.is-live .ys-meet-stage { padding: 8px; }
  .ys-meet.is-live .ys-meet-embed { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .ys-meet-orb::before { animation: none; opacity: 0.5; transform: none; }
  .ys-meet.is-connecting .ys-meet-embed::before { animation: none; }
  .ys-meet-badge .ys-meet-pulse { animation: none; }
}
.ys-block.ys-player .ys-player-navbtn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 22px; border-radius: 980px; border: 1px solid rgba(20,32,66,0.25);
  font-size: 0.875rem; font-weight: 600; text-decoration: none; color: var(--ys-navy);
  background: transparent;
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ys-block.ys-player .ys-player-navbtn:hover { background: rgba(20,32,66,0.06); color: var(--ys-navy); }
.ys-block.ys-player .ys-player-navbtn:focus-visible { outline: 3px solid var(--ys-focus-on-light); outline-offset: 2px; }
.ys-block.ys-player .ys-player-navbtn.is-disabled { opacity: 0.35; pointer-events: none; }

.ys-player-card {
  box-sizing: border-box; margin: 24px 0 0;
  background: #fff; border: 1px solid rgba(201,169,97,0.22);
  border-radius: 18px; padding: 40px;
  box-shadow: 0 2px 8px rgba(20,32,66,0.04), 0 8px 24px rgba(20,32,66,0.08);
}
/* The lesson's own reading text (notes/exercise copy) stays at a
   readable measure even though the card now spans the full pane. */
.ys-player-card > .ys-player-text { max-width: 760px; }
.ys-player--empty { display: block; padding: 80px 28px; }
.ys-player--empty .ys-player-card { text-align: center; }
.ys-player--empty .ys-btn-gold { margin-top: 20px; }

.ys-player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ys-player-kind {
  display: inline-flex; padding: 4px 14px; border-radius: 980px;
  border: 1px solid rgba(201,169,97,0.35);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ys-gold-dark);
}
.ys-player-duration { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; color: var(--ys-text-muted); }
.ys-player-duration svg { color: var(--ys-gold-dark); }
.ys-player-title {
  font-family: var(--ys-serif); font-size: 2.125rem; font-weight: 700;
  line-height: 1.12; letter-spacing: -0.01em; color: var(--ys-navy); margin: 0 0 20px;
}

.ys-player-video,
.ys-player-embed iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; height: auto;
  border: 0; border-radius: 12px; background: var(--ys-navy-deep);
}
.ys-player-frame {
  display: block; width: 100%; height: 70vh; min-height: 420px;
  border: 1px solid rgba(201,169,97,0.22); border-radius: 12px; background: var(--ys-cream-light);
}
.ys-player-text { font-size: 1.0625rem; line-height: 1.6; color: var(--ys-text-muted); margin-top: 20px; }
.ys-player-text p { margin: 0 0 0.8em; }
.ys-player-text p:last-child { margin-bottom: 0; }

.ys-player-live { display: flex; align-items: center; gap: 10px; font-size: 1.0625rem; color: var(--ys-text-muted); margin: 0 0 20px; }
.ys-player-live svg { color: var(--ys-gold-dark); flex: 0 0 auto; }

.ys-block.ys-player .ys-player-btn {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 4px; padding: 11px 26px; border-radius: 980px;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
  color: var(--ys-navy-deep); background: var(--ys-gold-gradient); border: 1px solid var(--ys-gold-dark);
}
.ys-block.ys-player .ys-player-btn:hover { filter: brightness(1.05); color: var(--ys-navy-deep); }
.ys-block.ys-player .ys-player-btn:focus-visible { outline: 3px solid var(--ys-focus-on-light); outline-offset: 2px; }
.ys-player-filename { font-weight: 400; font-size: 0.8125rem; opacity: 0.8; word-break: break-all; }

.ys-player-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(201,169,97,0.22);
}
.ys-block.ys-player .ys-player-done {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 12px 28px; border-radius: 980px;
  font-family: var(--ys-sans); font-size: 0.9375rem; font-weight: 600;
  color: var(--ys-navy-deep); background: var(--ys-gold-gradient); border: 1px solid var(--ys-gold-dark);
}
.ys-block.ys-player .ys-player-done:hover { filter: brightness(1.05); }
.ys-block.ys-player .ys-player-done:focus-visible { outline: 3px solid var(--ys-focus-on-light); outline-offset: 2px; }
.ys-block.ys-player .ys-player-done.is-done {
  background: transparent; filter: none;
  border-color: #5a8c50; color: #2f5a2a;
}
.ys-player-done-check { font-weight: 700; }
.ys-block.ys-player .ys-player-nextlink {
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
  color: var(--ys-link-on-light); min-width: 0;
}
.ys-block.ys-player .ys-player-nextlink:hover .ys-dash-arrow { transform: translateX(4px); }
.ys-block.ys-player .ys-player-nextlink:focus-visible { outline: 3px solid var(--ys-focus-on-light); outline-offset: 2px; }
.ys-player-nextlink .ys-dash-arrow { display: inline-block; transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); }

/* --- Responsive --- */
@media (max-width: 1068px) {
  .ys-player { flex-direction: column; }
  .ys-player-side {
    position: static; width: auto; flex: 0 0 auto; max-height: none;
    padding: 24px 20px 32px;
  }
  .ys-player-main { padding: 24px 20px 56px; }
  .ys-player-card { padding: 28px 24px; }
  .ys-player-title { font-size: 1.75rem; }
  .ys-player-frame { height: 60vh; min-height: 320px; }
}
@media (max-width: 734px) {
  .ys-path { padding: 20px; }
  .ys-player-card { padding: 22px 18px; }
  .ys-player-foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .ys-block.ys-path .ys-path-item,
  .ys-block.ys-player .ys-player-item,
  .ys-block.ys-player .ys-player-navbtn,
  .ys-player-nextlink .ys-dash-arrow { transition: none; }
  .ys-block.ys-player .ys-player-nextlink:hover .ys-dash-arrow { transform: none; }
}

/* Scheduled release: locked (not-yet-available) modules & lessons. */
.ys-path-module-lock {
	font-weight: 400;
	font-size: 0.75rem;
	color: var(--ys-text-muted);
	white-space: nowrap;
}
.ys-path-module-lock svg { width: 13px; height: 13px; vertical-align: -2px; }
.ys-block.ys-path .ys-path-item.is-locked {
	cursor: default;
	opacity: 0.6;
}
.ys-block.ys-path .ys-path-item.is-locked:hover { background: transparent; color: inherit; }
.ys-path-item.is-locked .ys-path-item-icon { color: var(--ys-text-muted); }

.ys-player-item.is-locked { opacity: 0.55; cursor: default; }
.ys-player-item.is-locked:hover { background: transparent; }
.ys-player-locked {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 22px;
	margin: 0 0 20px;
	border: 1px dashed rgba(20,32,66,0.25);
	border-radius: 14px;
	color: var(--ys-text-muted);
	font-size: 1rem;
}
.ys-player-locked svg { color: var(--ys-gold-dark); flex: 0 0 auto; }
