/* video-player.css — the self-playing course player (PHP-FUNCTIONS/functions-video-player.php, js/video-player.js).
   Built from theoildesk.com's player.css. Self-contained: every colour, size and space is a --vp-* variable defined here
   with theoildesk's values (navy stage, amber accent), and the buttons and small text the player uses are styled inside
   it at zero specificity (:where), so a site's own button styles win and a site without any still gets these. A site restyles it by overriding the variables on .page-play.
   Slide image fills the frame, subtitles in a translucent band, progress bar in the accent colour, one row of controls.
   Works at 390 px: the stage keeps 16:9, subtitles scale with the viewport, controls wrap. */
.page-play, .player {
  --vp-c-navy: #214d74;
  --vp-c-navy-darker: #1a3d5e;
  --vp-c-footer: #1a2e40;
  --vp-c-accent: #b8862b;
  --vp-c-ok: #2e7d4f;
  --vp-c-fail: #b23a3a;
  --vp-c-text: #24313f;
  --vp-c-text-body: #3f4b58;
  --vp-c-muted: #7a8899;
  --vp-c-border: #e3e8ee;
  --vp-c-bg: #f7f8fa;
  --vp-c-bg-alt: #eef2f6;
  --vp-c-surface: #fff;
  --vp-radius: 4px;
  --vp-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --vp-fs-0: .8125rem;
  --vp-fs-1: .9375rem;
  --vp-fs-2: 1.0625rem;
  --vp-fs-3: 1.25rem;
  --vp-sp-1: .25rem;
  --vp-sp-2: .5rem;
  --vp-sp-3: .75rem;
  --vp-sp-4: 1rem;
  --vp-sp-5: 1.5rem;
  --vp-sp-6: 2rem;
  --vp-subs-bg: rgba(33, 77, 116, .82);
}
:where(.page-play) { margin: 0; font-family: var(--vp-font-body); font-size: var(--vp-fs-1); line-height: 1.7; }
.page-play *, .page-play *::before, .page-play *::after { box-sizing: border-box; }
:where(.player .btn) { display: inline-flex; align-items: center; justify-content: center; gap: var(--vp-sp-2); min-height: 42px; padding: var(--vp-sp-2) var(--vp-sp-5); border-radius: var(--vp-radius); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: var(--vp-fs-1); text-decoration: none; cursor: pointer; line-height: 1.2; }
:where(.player .btn-primary) { background: var(--vp-c-navy); color: #fff; }
:where(.player .btn-primary:hover) { background: var(--vp-c-navy-darker); color: #fff; }
:where(.player .btn-secondary) { background: var(--vp-c-surface); color: var(--vp-c-navy); border-color: var(--vp-c-navy); }
:where(.player .btn-secondary:hover) { background: var(--vp-c-bg-alt); }
:where(.player .btn-ghost) { background: transparent; color: var(--vp-c-navy); border-color: var(--vp-c-border); }
:where(.player .btn-ghost:hover) { border-color: var(--vp-c-navy); }
:where(.player .btn-sm) { min-height: 36px; padding: var(--vp-sp-1) var(--vp-sp-4); font-size: var(--vp-fs-0); }
:where(.player .btn[disabled]) { opacity: .45; cursor: not-allowed; }
:where(.player .muted) { color: var(--vp-c-muted); }
:where(.player .small) { font-size: var(--vp-fs-0); }
:where(.player h2) { margin: 0; line-height: 1.3; }
:where(.player p) { margin-top: 0; }

.page-play { background: var(--vp-c-footer); color: #fff; min-height: 100vh; }
.player { max-width: 1400px; margin: 0 auto; padding: var(--vp-sp-3) var(--vp-sp-3) var(--vp-sp-5); outline: none; }
.player:fullscreen { max-width: none; padding: 0; background: #000; display: flex; flex-direction: column; justify-content: center; }
.player:fullscreen .keys { display: none; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0f2236; overflow: hidden; border-radius: var(--vp-radius); }
.player:fullscreen .stage { border-radius: 0; max-height: calc(100vh - 56px); }
.slide { display: block; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.subs { position: absolute; left: 0; right: 0; bottom: 6%; margin: 0 auto; width: max-content; max-width: 88%; padding: .35em .9em; background: var(--vp-subs-bg); color: #fff;
        font-size: clamp(14px, 2.2vw, 28px); line-height: 1.3; text-align: center; border-radius: var(--vp-radius); white-space: pre-line; pointer-events: none; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.subs[hidden] { display: none; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(255,255,255,.18); }
.prog { height: 100%; width: 0; background: var(--vp-c-accent); transition: width .3s linear; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 34, 54, .55); padding: var(--vp-sp-4); overflow: auto; }
.overlay[hidden] { display: none; }
.ov-card { background: var(--vp-c-surface); color: var(--vp-c-text-body); border-radius: var(--vp-radius); padding: var(--vp-sp-5) var(--vp-sp-6); max-width: 720px; width: 100%; max-height: 100%; overflow: auto; box-shadow: 0 6px 30px rgba(0,0,0,.35); }
.ov-card h2 { font-size: var(--vp-fs-3); margin-bottom: var(--vp-sp-3); }
.ov-card p { margin-bottom: var(--vp-sp-3); }
.ov-actions { display: flex; gap: var(--vp-sp-3); flex-wrap: wrap; margin-top: var(--vp-sp-4); }
.ov-compact { max-width: 520px; }
.ov-timer { display: flex; align-items: center; gap: var(--vp-sp-4); flex-wrap: wrap; }
.ov-label { text-transform: uppercase; letter-spacing: .08em; font-size: var(--vp-fs-0); color: var(--vp-c-accent); font-weight: 600; }
.ov-clock { font-size: 2.6rem; font-weight: 600; color: var(--vp-c-text); font-variant-numeric: tabular-nums; line-height: 1; }
.ov-task { margin-top: var(--vp-sp-3); font-size: var(--vp-fs-1); }
.ov-mini-card { position: absolute; right: var(--vp-sp-4); bottom: 12%; max-width: 420px; width: auto; padding: var(--vp-sp-3) var(--vp-sp-4); }
.overlay:has(.ov-mini-card) { background: transparent; pointer-events: none; }
.ov-mini-card { pointer-events: auto; }
.ov-mini { display: flex; align-items: center; gap: var(--vp-sp-4); }
.qz { border: 0; border-top: 1px solid var(--vp-c-border); padding: var(--vp-sp-3) 0 var(--vp-sp-2); margin: 0; }
.qz legend { font-weight: 600; color: var(--vp-c-text); padding: 0 0 var(--vp-sp-2); float: left; width: 100%; }
.qz label { display: flex; gap: var(--vp-sp-2); align-items: flex-start; padding: var(--vp-sp-1) 0; cursor: pointer; font-size: var(--vp-fs-1); clear: both; }
.qz input { margin-top: .35em; flex: none; }
.qz-detail { padding-left: 1.2rem; }
.qz-detail .ok { color: var(--vp-c-ok); }
.qz-detail .fail { color: var(--vp-c-fail); }
.controls { display: flex; align-items: center; justify-content: space-between; gap: var(--vp-sp-3); padding: var(--vp-sp-3) 0 0; flex-wrap: wrap; }
.ctl-left, .ctl-right { display: flex; align-items: center; gap: var(--vp-sp-2); }
.ctl-title { flex: 1; text-align: center; color: #c9d3dc; font-size: var(--vp-fs-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbtn { min-width: 44px; min-height: 40px; padding: 0 var(--vp-sp-3); border-radius: var(--vp-radius); border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pbtn:hover { background: rgba(255,255,255,.16); color: #fff; }  /* color: a site's a:hover (0,1,1) beats .pbtn on the links */
.pbtn-main { background: var(--vp-c-accent); border-color: var(--vp-c-accent); min-width: 56px; }
.pbtn-main:hover { background: #a6781f; }
.pbtn.is-off { opacity: .45; text-decoration: line-through; }
.pbtn-link { font-weight: 500; }
.pbtn-speed { min-width: 56px; font-variant-numeric: tabular-nums; }
.counter, .clock { color: #c9d3dc; font-variant-numeric: tabular-nums; font-size: var(--vp-fs-1); padding: 0 var(--vp-sp-2); }
.keys { color: #8fa3b5; margin: var(--vp-sp-3) 0 0; font-size: var(--vp-fs-0); }
@media (max-width: 640px) {
    .player { padding: var(--vp-sp-2); }
    /* The stage is only 219 px tall on a phone, so the cards (mode choice, quiz form, score) cover the viewport instead of the stage. */
    .overlay { position: fixed; inset: 0; z-index: 20; align-items: flex-start; padding: var(--vp-sp-3); }
    .overlay:has(.ov-mini-card) { position: absolute; inset: 0; z-index: auto; }
    .ov-card { max-height: calc(100vh - 2 * var(--vp-sp-3)); }
    .ctl-title { order: 3; flex-basis: 100%; text-align: left; font-size: var(--vp-fs-0); }
    .clock { display: none; }
    .ov-card { padding: var(--vp-sp-4); }
    .ov-clock { font-size: 2rem; }
    .ov-mini-card { right: var(--vp-sp-2); left: var(--vp-sp-2); bottom: 10%; max-width: none; }
    .subs { max-width: 94%; bottom: 8%; }
}

/* Learning modes (2026-09-10): start-card mode cards, the header pill, the timed-check question card */
.mode-pill { display: inline-block; margin-left: var(--vp-sp-2); padding: 0 var(--vp-sp-2); border-radius: 999px; font-size: var(--vp-fs-0); font-weight: 600; border: 1px solid rgba(255,255,255,.35); color: #fff; vertical-align: middle; }
.mode-pill[hidden] { display: none; }
.mode-pill.mode-timed { border-color: var(--vp-c-accent); color: var(--vp-c-accent); }
.mode-pill.mode-assessed { border-color: #7fc79a; color: #7fc79a; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--vp-sp-3); margin: var(--vp-sp-2) 0 var(--vp-sp-3); }
.mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--vp-sp-2); text-align: left; padding: var(--vp-sp-3) var(--vp-sp-4); border: 1px solid var(--vp-c-border); border-radius: var(--vp-radius); background: var(--vp-c-bg); color: var(--vp-c-text-body); font: inherit; cursor: pointer; line-height: 1.45; }
.mode-card:hover, .mode-card:focus { border-color: var(--vp-c-navy); outline: 2px solid var(--vp-c-navy); outline-offset: 1px; background: var(--vp-c-surface); }
.mode-name { font-weight: 600; color: var(--vp-c-text); font-size: var(--vp-fs-2); display: flex; align-items: center; gap: var(--vp-sp-2); }
.mode-desc { font-size: var(--vp-fs-0); }
.ov-card kbd { display: inline-block; min-width: 1.4em; padding: 0 .35em; border: 1px solid var(--vp-c-border); border-bottom-width: 2px; border-radius: 3px; background: var(--vp-c-surface); font: 600 .75em/1.5 var(--vp-font-body); color: var(--vp-c-muted); text-align: center; }
.ov-status { color: var(--vp-c-text); }
.tq-head { display: flex; align-items: center; justify-content: space-between; gap: var(--vp-sp-3); margin-bottom: var(--vp-sp-2); }
.ov-clock-sm { font-size: 1.6rem; }
.ov-mini b { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .mode-grid { grid-template-columns: 1fr; }
    .mode-pill { margin-left: 0; }
}
