/* Live presentations (js/present.js) and the training course (js/academy.js). */

/* ---------- presenter console */
.pr-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 360px; max-width: 100vw; z-index: 2600; background: var(--surface); border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.pr-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pr-head i { color: var(--primary); }
.pr-head b { flex: 1; }
.pr-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pr-hint { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.pr-wide { width: 100%; justify-content: center; min-height: 44px; }
.pr-h { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pr-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    padding: 10px 12px; cursor: pointer; min-height: 44px; }
.pr-item:hover { border-color: var(--primary); }
.pr-item span { flex: 1; display: flex; flex-direction: column; }
.pr-item small { color: var(--muted); }
.pr-back { align-self: flex-start; cursor: pointer; }
.pr-title { margin: 0; font-size: 16px; }
.pr-link { display: flex; gap: 6px; }
.pr-link .input { flex: 1; min-width: 0; font-size: 12.5px; }
.pr-switch { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.pr-switch input { margin-top: 3px; width: 18px; height: 18px; cursor: pointer; }
.pr-switch span { display: flex; flex-direction: column; }
.pr-switch small { color: var(--muted); font-size: 12px; }
.pr-count { font-size: 13px; color: var(--ink-2); }
.pr-count i { color: var(--primary); margin-right: 4px; }
.pr-step { background: var(--primary-50); border-radius: var(--radius); padding: 12px; }
.pr-step small { color: var(--primary); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.pr-step b { display: block; margin: 4px 0; }
.pr-step p { margin: 0 0 8px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.pr-nav { display: flex; gap: 8px; }
.pr-nav .btn { flex: 1; justify-content: center; min-height: 44px; }
.pr-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.pr-tools .btn.is-on { border-color: var(--accent); color: var(--accent); }
.pr-chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pr-chap { width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; min-height: 40px; }
.pr-chap:hover { background: var(--surface-2); }
.pr-chap.is-here { border-color: var(--primary); background: var(--primary-50); font-weight: 600; }
.pr-chap i { color: var(--primary); width: 20px; }
.pr-foot { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
body.pr-presenting .shell { margin-right: 360px; }
body.pr-picking, body.pr-picking * { cursor: crosshair !important; }
@media (max-width: 1100px) { body.pr-presenting .shell { margin-right: 0; } }

/* ---------- email invitations */
.pr-mail { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; }
.pr-mail[open] { padding-bottom: 12px; }
.pr-mail summary { cursor: pointer; padding: 12px 0; font-weight: 600; min-height: 44px; box-sizing: border-box; }
.pr-mail summary i { color: var(--primary); margin-right: 6px; }
.pr-mail label { display: block; font-size: 13px; font-weight: 600; margin: 8px 0 4px; }
.pr-mail .form-text { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pr-mail .textarea { width: 100%; }
.pr-mail .pr-wide { margin-top: 10px; }
.pr-mail-add { display: flex; gap: 6px; }
.pr-mail-add .input { flex: 1; min-width: 0; }
.pr-mail-add .btn { min-height: 40px; }
.pr-chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pr-chips li { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-50); color: var(--ink); border-radius: 999px; padding: 4px 4px 4px 10px; font-size: 13px; max-width: 100%; word-break: break-all; }
.pr-chip-x { border: none; background: none; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-2); flex: none; }
.pr-chip-x:hover { background: var(--surface-2); }
.pr-sent { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pr-sent li { display: flex; gap: 8px; align-items: flex-start; word-break: break-all; }
.pr-sent li span { display: flex; flex-direction: column; }
.pr-sent small { color: var(--muted); }
.pr-sent i { margin-top: 3px; color: var(--muted); }
.pr-sent .is-ok i { color: var(--success, #1f8a4c); }
.pr-sent .is-err i { color: var(--danger); }

/* ---------- what the presenter shows (recorded with her page, so the clients see it too) */
.pr-card { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2540; width: 560px; max-width: calc(100vw - 24px); background: var(--surface);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 16px 48px 16px 20px; border-top: 4px solid #f0a47f; }
body.pr-presenting .pr-card { left: calc((100vw - 360px) / 2); }
.pr-card small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.pr-card b { display: block; font-size: 18px; margin: 2px 0 6px; }
.pr-card p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.pr-card-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: none; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.pr-card-x:hover { background: var(--surface-2); }
.pr-rect { position: fixed; z-index: 2545; pointer-events: none; border: 4px solid #39ff14; border-radius: 6px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 18px 4px rgba(57, 255, 20, .75), inset 0 0 14px rgba(57, 255, 20, .35); animation: pr-glow 1.6s ease-in-out infinite; }
@keyframes pr-glow { 50% { box-shadow: 0 0 0 2px rgba(0, 0, 0, .35), 0 0 30px 8px rgba(57, 255, 20, .95), inset 0 0 18px rgba(57, 255, 20, .5); } }
.pr-draw { position: fixed; inset: 0; z-index: 2590; cursor: crosshair; background: rgba(0, 0, 0, .04); touch-action: none; }

.pr-backstage-note { display: none; position: fixed; inset: 0 0 0 236px; z-index: 2530; align-items: center; justify-content: center; gap: 12px;
    background: var(--bg); color: var(--ink-2); font-size: 18px; padding: 24px; text-align: center; }
.pr-backstage-note i { color: var(--primary); font-size: 26px; }
@media (max-width: 900px) { .pr-backstage-note { inset: 0; } }

/* ---------- the client's screen, seen by the presenter while he tries */
.pr-watch { position: fixed; z-index: 2580; top: 70px; left: 20px; right: 380px; bottom: 20px; background: #10181f; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; overflow: hidden; border: 3px solid var(--primary); }
.pr-watch.is-small { top: auto; left: auto; right: 380px; width: 420px; height: 300px; }
body:not(.pr-presenting) .pr-watch { right: 20px; }
body:not(.pr-presenting) .pr-watch.is-small { right: 20px; }
.pr-watch-head { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--primary); color: #fff; font-size: 14px; }
.pr-watch-head b { flex: 1; }
.pr-watch-head .btn { color: #fff; min-height: 36px; cursor: pointer; }
.pr-watch-wait { font-size: 12.5px; opacity: .85; }
.pr-watch-screen { position: relative; flex: 1; overflow: hidden; }

/* ---------- viewer */
.pr-strip { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 2700; background: var(--ink); color: #fff; border-radius: 0 0 12px 12px;
    padding: 8px 16px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; max-width: calc(100vw - 24px); pointer-events: none; }
.pr-strip i { color: #f0a47f; }
body.pr-explore .pr-strip { background: var(--primary); }
.pr-screen { position: fixed; inset: 0; z-index: 2600; background: #10181f; overflow: hidden; }
.pr-screen[hidden] { display: none; }
.pr-screen-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: #cfe2ea; font-size: 16px; padding: 24px; text-align: center; }
.pr-screen .replayer-wrapper, .pr-watch-screen .replayer-wrapper { position: absolute; transform-origin: 0 0; }
.pr-screen .replayer-wrapper iframe, .pr-watch-screen .replayer-wrapper iframe { border: 0; background: #fff; }
.pr-screen.pr-nocursor .replayer-mouse { display: none; }
body.pr-viewer #presentBtn, body.pr-viewer #academyBtn, body.pr-viewer #tourBtn, body.pr-viewer #demoResetBtn { display: none !important; }

/* ---------- training course */
.ac-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; padding: 20px; max-width: 1200px; }
.ac-side { display: flex; flex-direction: column; gap: 6px; }
.ac-progress { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.ac-progress b { font-size: 22px; }
.ac-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.ac-bar span { display: block; height: 100%; background: var(--primary); }
.ac-mod { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 10px 12px; cursor: pointer; min-height: 44px; }
.ac-mod:hover { border-color: var(--line-strong); }
.ac-mod.is-here { border-color: var(--primary); background: var(--primary-50); }
.ac-mod i.ac-ico { color: var(--primary); width: 22px; text-align: center; }
.ac-mod span { flex: 1; }
.ac-mod .ac-state { color: var(--muted); font-size: 12px; }
.ac-mod.is-done .ac-state { color: var(--success, #1f8a4c); }
.ac-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; min-width: 0; }
.ac-main h2 { margin: 0 0 4px; font-family: var(--font-brand); }
.ac-main h3 { margin: 22px 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ac-main h3 i { color: var(--primary); }
.ac-main p, .ac-main li { color: var(--ink-2); line-height: 1.6; }
.ac-ex { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; display: flex; gap: 12px; align-items: flex-start; }
.ac-ex.is-done { border-color: var(--success, #1f8a4c); background: rgba(31, 138, 76, .06); }
.ac-ex > i { font-size: 20px; color: var(--muted); margin-top: 2px; }
.ac-ex.is-done > i { color: var(--success, #1f8a4c); }
.ac-ex div { flex: 1; }
.ac-ex b { display: block; }
.ac-ex small { color: var(--muted); }
.ac-ex .btn { margin-top: 8px; cursor: pointer; min-height: 40px; }
.ac-say { background: var(--accent-50, #fdf1ea); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 14px; }
.ac-say p { margin: 0 0 8px; }
.ac-say p:last-child { margin: 0; }
.ac-qa dt { font-weight: 700; color: var(--ink); margin-top: 10px; }
.ac-qa dd { margin: 4px 0 0; color: var(--ink-2); line-height: 1.55; }
.ac-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.ac-foot .btn { min-height: 44px; }
@media (max-width: 900px) {
    .ac-wrap { grid-template-columns: minmax(0, 1fr); padding: 12px; }
    .ac-main { padding: 16px; }
    .ac-foot .btn { flex: 1 1 auto; justify-content: center; }
    .pr-panel { width: 100vw; }
}
