/**
 * Business-Plan chapter slide decks — picker + editor popup + inline gallery
 * chrome. Scoped under .psoo-bp / .psoo-slides-* so it can't bleed into the
 * surrounding Youzify/group chrome.
 */

/* ── Inline deck wrapper under a chapter description ── */
.psoo-bp__slides { margin: 22px 0 6px; }
.psoo-bp__slides-viewer:empty { display: none; }
.psoo-bp__slides-viewer { margin-bottom: 12px; }

/* Slides are authored on a 16:9 canvas; make the gallery frame a responsive
   16:9 box so each slide fills it with no black bars / no cropping. Scoped to
   chapter decks so singular st_proposal pages keep their fixed-height frame. */
.psoo-bp__slides .quantum-gallery-frame { height: auto !important; aspect-ratio: 16 / 9 !important; min-height: 0 !important; }
.psoo-bp__slides .stp-slide-scope { height: 100% !important; padding: 0 !important; }
.psoo-bp__slides .psd-slide { height: 100% !important; }
/* Phones → portrait frame (matches the editor's Mobile view). */
@media (max-width: 600px) {
    .psoo-bp__slides .quantum-gallery-frame { aspect-ratio: 9 / 16 !important; }
}

/* ── Editor toolbar ── */
.psoo-bp__slides-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.psoo-bp__slides-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: 0;
    border-radius: 9px;
    padding: 9px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
    box-shadow: 0 4px 14px rgba(99,102,241,0.25);
}
.psoo-bp__slides-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(99,102,241,0.35); }
.psoo-bp__slides-btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.psoo-bp__slides-btn--ghost {
    background: transparent;
    color: #94a3b8;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.14);
}
.psoo-bp__slides-btn--ghost:hover { color: #e2e8f0; border-color: rgba(255,255,255,0.3); box-shadow: none; }
.psoo-bp__slides-status { color: #94a3b8; font-size: 12px; }

/* ── Overlay / modal ── */
.psoo-slides-overlay {
    position: fixed;
    inset: 0;
    /* Sit above all the digital-society widgets (cart, chat, profile bar). */
    z-index: 2147483000;
    background: rgba(4, 6, 12, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.psoo-slides-modal {
    position: relative;
    background: #0e1320;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    color: #e2e8f0;
}

/* Editor: a large centered panel (drops in) showing the slide-builder. */
.psoo-slides-overlay--editor {
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.psoo-slides-modal--editor {
    max-width: 1280px;
    width: 100%;
    height: 90vh;
    border-radius: 18px;
    transform: translateY(-28px) scale(.98);
    opacity: 0;
    transition: transform .3s cubic-bezier(.22,.61,.36,1), opacity .3s ease;
    will-change: transform, opacity;
}
.psoo-slides-overlay--editor.is-open .psoo-slides-modal--editor {
    transform: none;
    opacity: 1;
}
.psoo-slides-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.psoo-slides-modal-title { font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.psoo-slides-modal-close {
    background: transparent;
    border: 0;
    color: #94a3b8;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.psoo-slides-modal-close:hover { color: #fff; }
/* Editor: no header bar — a sticky circular close button in the top-right. */
.psoo-slides-modal-close--float {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 6;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    background: rgba(14,19,32,0.9);
    border: 1px solid rgba(255,255,255,0.16);
    color: #cbd5e1;
    font-size: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.psoo-slides-modal-close--float:hover { color: #fff; border-color: #6366f1; background: #0e1320; }
.psoo-slides-modal-body { padding: 18px; overflow: auto; flex: 1 1 auto; }
.psoo-slides-modal--editor .psoo-slides-modal-body { padding: 0; position: relative; height: 100%; }
.psoo-slides-iframe { width: 100%; height: 100%; border: 0; display: block; background: #0e1320; opacity: 0; transition: opacity .2s ease; }
.psoo-slides-modal--editor.is-loaded .psoo-slides-iframe { opacity: 1; }

/* Branded loader shown while the editor iframe loads (instead of blank white) */
.psoo-slides-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #0e1320;
    color: #94a3b8;
    font-size: 13px;
}
.psoo-slides-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.12);
    border-top-color: #8b5cf6;
    animation: psoo-slides-spin .8s linear infinite;
}
@keyframes psoo-slides-spin { to { transform: rotate(360deg); } }

/* ── Picker ── */
.psoo-slides-picker-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.psoo-slides-or { color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.psoo-slides-search {
    flex: 1 1 200px;
    background: #060a13;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 9px;
    padding: 9px 12px;
    color: #e2e8f0;
    font-size: 13px;
}
.psoo-slides-search:focus { outline: none; border-color: #6366f1; }
.psoo-slides-results { display: flex; flex-direction: column; gap: 8px; }
.psoo-slides-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 11px 14px;
    color: #e2e8f0;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.psoo-slides-result:hover { border-color: #6366f1; background: rgba(99,102,241,0.08); }
.psoo-slides-result-title { font-size: 13px; font-weight: 600; }
.psoo-slides-result-meta { font-size: 11px; color: #94a3b8; white-space: nowrap; }
.psoo-slides-empty { color: #94a3b8; font-size: 13px; margin: 6px 0; text-align: center; }

@media (max-width: 720px) {
    .psoo-slides-modal--editor { height: 92vh; }
}
