/* MTC LMS course player: distraction-free lesson view. */

html.mtc-player-html, html.mtc-player-html body { height: 100%; margin: 0; padding: 0; overflow: hidden; background: var(--mtc-bg); }
html.mtc-player-html body { min-height: 0; }
html.mtc-player-html #wpadminbar { position: fixed; top: 0; }
body.admin-bar .mtc-player { height: calc(100vh - 32px); }
@media screen and (max-width: 782px) { body.admin-bar .mtc-player { height: calc(100vh - 46px); } }

.mtc-player {
  height: 100vh; display: flex; flex-direction: column;
  font-family: inherit; color: var(--mtc-ink); background: var(--mtc-bg);
}

/* ---------- top bar ---------- */
.mtc-player-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 16px;
  padding: 0 16px; height: 60px;
  background: var(--mtc-plum); color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.12);
}
.mtc-icon-btn {
  appearance: none; border: 0; background: rgba(255,255,255,.12); color: #fff;
  width: 38px; height: 38px; border-radius: 9px; cursor: pointer;
  display: grid; place-items: center; flex: 0 0 auto; text-decoration: none;
}
.mtc-icon-btn:hover { background: rgba(255,255,255,.22); color: #fff; }
.mtc-icon-btn:focus-visible { outline: 2px solid var(--mtc-gold); outline-offset: 2px; }

.mtc-player-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mtc-player-course { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .72; }
.mtc-player-lesson {
  font-size: 15px; font-weight: 700; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.mtc-player-progress { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; min-width: 190px; }
.mtc-player-progress .mtc-progress-track { flex: 1; height: 7px; background: rgba(255,255,255,.22); border-radius: 999px; overflow: hidden; }
.mtc-player-progress .mtc-progress-fill { height: 100%; background: var(--mtc-gold); border-radius: 999px; transition: width .35s ease; }
.mtc-player-pct { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }

/* ---------- body ---------- */
.mtc-player-body { flex: 1; min-height: 0; display: flex; }

.mtc-player-sidebar {
  flex: 0 0 330px; width: 330px; min-width: 0;
  background: var(--mtc-surface); border-right: 1px solid var(--mtc-line);
  overflow-y: auto; overscroll-behavior: contain;
  transition: margin-left .25s ease;
}
.mtc-player.is-collapsed .mtc-player-sidebar { margin-left: -330px; }

.mtc-sidebar-title {
  position: sticky; top: 0; z-index: 2;
  padding: 14px 16px; background: var(--mtc-surface);
  border-bottom: 1px solid var(--mtc-line);
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mtc-muted);
}
/* ---------- main pane ---------- */
.mtc-player-main { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; }
.mtc-player-inner { max-width: 820px; margin: 0 auto; padding: 34px 28px 70px; }

.mtc-lesson-kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mtc-purple); margin: 0 0 8px;
}
.mtc-player-inner h1 {
  margin: 0 0 22px; font-size: clamp(24px, 3vw, 33px);
  line-height: 1.18; color: var(--mtc-plum);
}

.mtc-attachments { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- footer nav ---------- */
.mtc-player-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--mtc-line);
  flex-wrap: wrap;
}
.mtc-player-foot .mtc-spacer { flex: 1; }
.mtc-complete-state {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--mtc-ok); font-weight: 700; font-size: 14.5px;
}
/* An author display value beats the UA [hidden] rule, so restore it. */
.mtc-complete-state[hidden], .mtc-player [hidden] { display: none !important; }
.mtc-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px);
  background: var(--mtc-plum); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--mtc-shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 60;
}
.mtc-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- locked lesson row ---------- */
.mtc-lesson-row--locked .mtc-locked-label { opacity: .6; }

/* ---------- mobile drawer ---------- */
.mtc-scrim {
  position: fixed; inset: 0; background: rgba(26,12,36,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 40;
}
.mtc-scrim.is-on { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .mtc-player-progress { min-width: 0; }
  .mtc-player-progress .mtc-progress-track { display: none; }
  .mtc-player-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    width: min(86vw, 340px); flex-basis: min(86vw, 340px);
    margin-left: 0; transform: translateX(-102%);
    transition: transform .25s ease; box-shadow: var(--mtc-shadow-lg);
  }
  .mtc-player.is-drawer-open .mtc-player-sidebar { transform: translateX(0); }
  .mtc-player.is-collapsed .mtc-player-sidebar { margin-left: 0; }
  .mtc-player-inner { padding: 24px 18px 60px; }
}

@media (min-width: 901px) { .mtc-scrim { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .mtc-player-sidebar, .mtc-progress-fill, .mtc-toast, .mtc-scrim { transition: none; }
}

@media print {
  .mtc-player-bar, .mtc-player-sidebar, .mtc-player-foot { display: none; }
  .mtc-player, .mtc-player-main { height: auto; overflow: visible; }
  html.mtc-player-html, html.mtc-player-html body { overflow: visible; height: auto; }
}