/* ═══════════════════════════════════════════════════════════════════════════
   SLIDE & SQUEEZE PANEL COMPONENT
   
   File: slide-squeeze.css
   Version: 1.0.0
   Date: 2026-02-06
   
   A panel that slides in from the right while squeezing the main content.
   Uses Softex design tokens exclusively — NO hardcoded colors.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   1. OVERLAY BACKDROP
───────────────────────────────────────────────────────────────────────── */
.slide-squeeze-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: var(--softex-z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--softex-transition-normal),
                visibility var(--softex-transition-normal);
}

.slide-squeeze-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ─────────────────────────────────────────────────────────────────────────
   2. PANEL
───────────────────────────────────────────────────────────────────────── */
.slide-squeeze-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--softex-panel-width);
    height: 100vh;
    background: var(--softex-bg-card);
    box-shadow: var(--softex-shadow-xl);
    z-index: var(--softex-z-modal);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.slide-squeeze-panel.open {
    transform: translateX(0);
}

/* ─────────────────────────────────────────────────────────────────────────
   3. PANEL HEADER
───────────────────────────────────────────────────────────────────────── */
.slide-squeeze-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--softex-space-4) var(--softex-space-6);
    border-bottom: 1px solid var(--softex-border);
    background: var(--softex-bg-card);
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: var(--softex-header-height);
}

.slide-squeeze-header h2 {
    font-family: var(--softex-font-heading);
    font-size: var(--softex-text-xl);
    font-weight: var(--softex-font-bold);
    color: var(--softex-text-primary);
    margin: 0;
}

.slide-squeeze-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--softex-radius-full);
    color: var(--softex-text-secondary);
    cursor: pointer;
    transition: background var(--softex-transition-fast),
                color var(--softex-transition-fast);
}

.slide-squeeze-close:hover {
    background: var(--softex-primary-alpha-10);
    color: var(--softex-primary);
}

.slide-squeeze-close .material-symbols-outlined {
    font-size: 20px;
}

/* ─────────────────────────────────────────────────────────────────────────
   4. PANEL BODY
───────────────────────────────────────────────────────────────────────── */
.slide-squeeze-body {
    flex: 1;
    padding: var(--softex-space-6);
    overflow-y: auto;
}

/* ─────────────────────────────────────────────────────────────────────────
   5. PANEL FOOTER
───────────────────────────────────────────────────────────────────────── */
.slide-squeeze-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--softex-space-3);
    padding: var(--softex-space-4) var(--softex-space-6);
    border-top: 1px solid var(--softex-border);
    background: var(--softex-bg-card);
    position: sticky;
    bottom: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   6. MAIN CONTENT SQUEEZE EFFECT
───────────────────────────────────────────────────────────────────────── */
.main-content-area {
    transition: margin-right 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content-area.squeezed {
    margin-right: var(--softex-panel-width);
}

/* ─────────────────────────────────────────────────────────────────────────
   7. RESPONSIVE — Panel goes full-width on small screens
───────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .slide-squeeze-panel {
        width: 100vw;
    }

    .main-content-area.squeezed {
        margin-right: 0;
    }
}

@media (max-width: 1200px) and (min-width: 769px) {
    .slide-squeeze-panel {
        width: min(var(--softex-panel-width), 60vw);
    }

    .main-content-area.squeezed {
        margin-right: min(var(--softex-panel-width), 60vw);
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   8. LOADING STATE
───────────────────────────────────────────────────────────────────────── */
.slide-squeeze-panel.loading .slide-squeeze-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-squeeze-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--softex-border);
    border-top-color: var(--softex-primary);
    border-radius: 50%;
    animation: squeeze-spin 0.7s linear infinite;
}

@keyframes squeeze-spin {
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────────────────
   9. DARK MODE
───────────────────────────────────────────────────────────────────────── */
.dark .slide-squeeze-panel {
    background: var(--softex-bg-card);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.dark .slide-squeeze-overlay {
    background: rgba(0, 0, 0, 0.5);
}
