/* Pursue › Demo — videos, slides and Present (frontend/js/pursue-demo-present.js).
 * Tokens only, no literal colours: the audience window sets data-theme="dark"
 * on <html>, so these resolve to theme-dark.css. The prospect's colour arrives
 * as --pdp-brand on the view's root (validated #rrggbb in JS). The barcode
 * plate is the one fixed colour (white keyword): scanners need light behind bars.
 * Cards size in container units (cqw) so the presenter's previews are the same
 * card, smaller. */

/* ── Library › Files: videos ─────────────────────────────────────────── */
.pdp-videos { margin-top: var(--sp-3); }
.pdp-files-head { font-weight: var(--fw-item); }
.pdp-video { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); padding: var(--sp-2); margin: var(--sp-2) 0; }
.pdp-video video { width: 100%; max-height: 420px; border-radius: var(--radius-sm); background: var(--bg-secondary); display: block; }
.pdp-video-meta { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
.pdp-flags { list-style: none; padding: 0; margin: var(--sp-2) 0 0; display: grid; gap: var(--sp-1); }
.pdp-flag { display: flex; gap: var(--sp-2); align-items: baseline; flex-wrap: wrap; padding: var(--sp-1) var(--sp-2); border-left: 3px solid var(--warning); background: var(--bg-secondary); border-radius: var(--radius-sm); }
.pdp-flag[data-done="true"] { border-left-color: var(--border); color: var(--text-secondary); }

/* ── Slides & notes dialog ───────────────────────────────────────────── */
/* One lede saying what the dialog controls, then a headed section each for
 * slides, the presenter note, the steps and timing/checks. */
.pdp-item-dialog table { width: 100%; }
.pdp-lede { margin: 0 0 var(--sp-3); font-size: var(--fs-body); line-height: 1.45; color: var(--text-secondary); }
.pdp-sec { padding: var(--sp-4) 0; border-top: 1px solid var(--border-light); }
.pdp-sec-h { margin: 0 0 var(--sp-1); font-size: var(--fs-item); font-weight: var(--fw-item); color: var(--text-primary); }
.pdp-sec-lede { margin: 0 0 var(--sp-3); font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.pdp-item-dialog .pdp-sec .field { margin-bottom: 0; }
.pdp-slide-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-2); }
.pdp-slide-thumb { display: grid; gap: var(--sp-1); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: var(--sp-1); }
.pdp-slide-thumb .pdp-slide-img { aspect-ratio: 16 / 9; }
.pdp-slide-actions { display: flex; align-items: center; gap: var(--sp-1); }
.pdp-slide-actions .u-btn:last-child { margin-left: auto; }
.pdp-slide-none { grid-column: 1 / -1; }
.pdp-slide-add { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.pdp-check { display: inline-flex; gap: var(--sp-1); align-items: center; }
/* Steps: [tick] [number] [text + note], the note lined up under the text. */
.pdp-step-count { margin: 0 0 var(--sp-2); font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.pdp-steps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border-light); border-radius: var(--radius-sm); }
.pdp-step { display: grid; grid-template-columns: auto 2.5ch minmax(0, 1fr); column-gap: var(--sp-2); align-items: start; padding: var(--sp-2) var(--sp-3); }
.pdp-step + .pdp-step { border-top: 1px solid var(--border-light); }
.pdp-step input[type="checkbox"] { width: 16px; height: 16px; margin: 2px 0 0; cursor: pointer; }
.pdp-step-n { font-size: 13px; line-height: 20px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-secondary); cursor: pointer; }
.pdp-step-body { display: grid; gap: var(--sp-1); min-width: 0; }
.pdp-step-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2); }
.pdp-step-text { font-size: 13px; line-height: 20px; color: var(--text-primary); cursor: pointer; overflow-wrap: anywhere; }
.pdp-step-off { display: none; }
.pursue-modal-form.pdp-item-dialog .pdp-step input.pdp-step-note { min-height: 30px; font-size: 12.5px; }
.pdp-step[data-left-out="true"] { background: var(--bg-secondary); }
.pdp-step[data-left-out="true"] .pdp-step-text { color: var(--text-muted); text-decoration: line-through; }
.pdp-step[data-left-out="true"] .pdp-step-off { display: inline-flex; }
.pdp-step[data-left-out="true"] .pdp-step-note { opacity: .6; }
.pdp-minutes { display: grid; justify-items: start; gap: var(--sp-1); }
.pdp-item-dialog .pdp-sec .pdp-minutes { margin-bottom: var(--sp-3); }
.pursue-modal-form.pdp-item-dialog .pdp-minutes input[name="planned_min"] { width: 9rem; }
.pdp-save-hint { margin: var(--sp-2) 0 0; font-size: 12px; color: var(--text-muted); }
@media (max-width: 560px) {
  .pdp-slide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdp-slide-actions { flex-wrap: wrap; }
  .pdp-slide-actions .u-btn:last-child { margin-left: 0; }
  .pdp-checks tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-1) var(--sp-2); padding: var(--sp-2) 0; }
  .pdp-checks td { padding: 0; overflow-wrap: anywhere; }
  .pdp-checks td:last-child { grid-column: 1 / -1; }
  .pdp-step { padding: var(--sp-2); }
}
.pdp-lb-list { padding-left: var(--sp-4); margin: var(--sp-1) 0; }
.pdp-lb-link { width: min(100%, 420px); font-family: var(--mono); }

/* ── the card stage: one card, full screen or as a preview ───────────── */
.pdp-audience {
  --pdp-brand: var(--accent);
  --pdp-brand-2: var(--accent-soft);
  container-type: inline-size;
  position: relative; overflow: hidden;
  background: var(--bg-page); color: var(--text-primary); font-family: var(--font);
}
/* above the app header (z-index 945) — the audience window shows nothing else */
body.is-chromeless .pdp-audience:not(.pdp-mini) { position: fixed; inset: 0; z-index: 1000; }
.pdp-audience:not(.pdp-mini) { min-height: 100vh; cursor: none; }
.pdp-frame { position: absolute; inset: 0 0 4.2cqw 0; display: flex; }
.pdp-card { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 4cqw 6cqw; gap: 1.4cqw; min-width: 0; }
.pdp-card--title { align-items: flex-start; border-left: 1.2cqw solid var(--pdp-brand); }
.pdp-card--section, .pdp-card--scenario { border-top: 0.6cqw solid var(--pdp-brand); }
.pdp-logo { max-height: 9cqw; max-width: 30cqw; object-fit: contain; margin-bottom: 2cqw; }
.pdp-title { font-size: 3.6cqw; line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.pdp-title--xl { font-size: 5cqw; }
.pdp-sub { font-size: 2cqw; color: var(--text-secondary); margin: 0; max-width: 70cqw; }
.pdp-eyebrow { font-size: 1.3cqw; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pdp-brand); margin: 0; font-weight: 600; }
.pdp-outcome { font-size: 2.1cqw; margin: 1cqw 0 0; padding-left: 1.4cqw; border-left: 0.4cqw solid var(--pdp-brand); }
.pdp-rich { font-size: 1.9cqw; color: var(--text-secondary); max-width: 75cqw; }
.pdp-rich--big { font-size: 2.4cqw; color: var(--text-primary); }
.pdp-rich .pdp-rich-h { font-size: 2.4cqw; margin: 1cqw 0 0.4cqw; color: var(--text-primary); }
.pdp-rich p, .pdp-rich ul { margin: 0.6cqw 0; }
.pdp-card--slide { padding: 1.5cqw; }
.pdp-slide-img { display: flex; align-items: center; justify-content: center; flex: 1; min-height: 0; background: var(--bg-secondary); border-radius: var(--radius-sm); overflow: hidden; }
.pdp-slide-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pdp-slide-img.is-missing::after, .pdp-shot.is-missing::after { content: 'Picture not available'; color: var(--text-muted); font-size: 1.4cqw; }

/* a step: what to scan, big, with before / after beside it */
.pdp-card--step { justify-content: flex-start; padding-top: 3cqw; }
.pdp-step-head .pdp-title { font-size: 3cqw; }
.pdp-scan { display: inline-flex; flex-direction: column; align-items: center; gap: 0.6cqw; align-self: flex-start; background: white; border-radius: var(--radius); padding: 1.4cqw 2.4cqw; }
.pdp-barcode { height: 9cqw; max-width: 55cqw; display: block; }
.pdp-scan-value { font-family: var(--mono); font-size: 3.2cqw; font-weight: 700; color: black; letter-spacing: 0.04em; }
.pdp-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 2cqw; flex: 1; min-height: 0; }
.pdp-shot { margin: 0; display: flex; flex-direction: column; min-height: 0; }
.pdp-shot img { flex: 0 1 auto; min-height: 0; max-height: 100%; max-width: 100%; width: auto; align-self: flex-start; object-fit: contain; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pdp-shot figcaption { font-size: 1.2cqw; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.4cqw; }

.pdp-progress { position: absolute; left: 0; right: 0; bottom: 0.8cqw; display: flex; justify-content: space-between; padding: 0 6cqw; font-size: 1.1cqw; color: var(--text-muted); }
.pdp-track { position: absolute; left: 0; right: 0; bottom: 0; height: 0.35cqw; background: var(--border-light); }
.pdp-fill { height: 100%; background: var(--pdp-brand); transition: width 0.3s; }
.pdp-blank { position: absolute; inset: 0; background: black; z-index: 3; }
.pdp-hint { position: absolute; top: 1cqw; right: 1.5cqw; font-size: 1.1cqw; color: var(--text-muted); transition: opacity 0.6s; }
.pdp-hint.is-gone { opacity: 0; }
.pdp-stage-msg { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 6rem; color: var(--text-muted); }

/* ── the presenter window ────────────────────────────────────────────── */
.pdp-stage-view { display: grid; gap: var(--sp-3); padding: var(--sp-3); max-width: 1500px; margin: 0 auto; }
/* its own window: nothing of the app around it */
body.is-chromeless .pdp-stage-view { position: fixed; inset: 0; z-index: 1000; overflow: auto; max-width: none; background: var(--bg-page); align-content: start; }
.pdp-stage-bar, .pdp-stage-foot { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.pdp-stage-main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--sp-3); }
.pdp-mini { aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius); }
.pdp-mini .pdp-frame { inset: 0 0 4.2cqw 0; }
.pdp-stage-notes { margin-top: var(--sp-3); display: grid; gap: var(--sp-2); font-size: var(--fs-item); }
.pdp-note, .pdp-talk, .pdp-gaps { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); }
.pdp-talk ul { margin: var(--sp-1) 0 0; padding-left: var(--sp-4); }
.pdp-talk li { margin: var(--sp-1) 0; }
.pdp-gaps { border-left: 3px solid var(--warning); }
.pdp-timers { display: inline-flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.pdp-schedule tr.is-current td { background: var(--accent-soft); }
@media (max-width: 820px) { .pdp-stage-main { grid-template-columns: 1fr; } }
