/* ============================================================
   Tutorial video viewer modal (2026-05-22)
   Markup and script in partials/_film_player.html, which exposes window.QLVideo.open(slug). Its own file since
   2026-10-12 (U1-07 of the U1 report): it lived in quantin.css and _quantin.html, which only a signed-in member gets,
   so a guest's "Introduction to QuanterLab" did nothing and a visitor never met the film library. Every var() names
   its own value, so it reads the same with or without quantin.css.
   Fullscreen-ish overlay matching the Quantin chat panel's dark treatment so the tutorial player reads as native
   platform UI.
   ============================================================ */

.ql-video-modal {
    position: fixed;
    inset: 0;
    /* Ribbon dropdowns + mobile drawers + hamburger sit at 10000-10001 (see
       sidebar.css). The video modal must overlay all of them, so it lives
       above that band. Welcome modal below stays one tier higher. */
    z-index: 10500;
    display: none;          /* JS flips to flex when opened */
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Calibri', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}
body.ql-video-modal-open {
    overflow: hidden;       /* freeze background scroll while modal is open */
}

.ql-video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(3px);
}

.ql-video-modal-frame {
    position: relative;
    width: 100%;
    max-width: 1120px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    border-radius: 12px;
    background:
        linear-gradient(var(--quantin-surface, #141414), var(--quantin-surface, #141414)) padding-box,
        linear-gradient(180deg,
            rgba(63, 174, 127, 0.55) 0%,
            rgba(63, 174, 127, 0.22) 50%,
            rgba(63, 174, 127, 0.45) 100%) border-box;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    color: var(--quantin-text, #ffffff);
}

.ql-video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--quantin-border, #1f1f1f);
}
.ql-video-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--quantin-text, #ffffff);
    letter-spacing: -0.01em;
}
.ql-video-modal-close {
    background: none;
    border: 1px solid var(--quantin-border, #1f1f1f);
    color: var(--quantin-text-secondary, #a3a3a3);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}
.ql-video-modal-close:hover {
    border-color: var(--quantin-accent, #3fae7f);
    color: var(--quantin-text, #ffffff);
}

.ql-video-modal-stage {
    flex: 1;
    background: #000;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ql-video-modal-player {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    background: #000;
    outline: none;
    display: block;
}

.ql-video-modal-footer {
    padding: 14px 18px;
    border-top: 1px solid var(--quantin-border, #1f1f1f);
    background: rgba(0, 0, 0, 0.25);
}
.ql-video-modal-description {
    margin: 0;
    font-size: 0.88rem;
    color: var(--quantin-text-secondary, #a3a3a3);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .ql-video-modal       { padding: 12px; }
    .ql-video-modal-frame { max-height: calc(100vh - 24px); }
    .ql-video-modal-title { font-size: 0.95rem; }
}
