/* LOADOUT PAGE LAYOUT */

/* Increased specificity to override .dossier-only display:block */
[data-theme="dossier"] .dossier-main-layout,
.dossier-main-layout {
    margin-top: 80px;
    display: grid !important;
    gap: 24px;
    grid-template-columns: 320px 1fr 320px;
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 60px;
}

/* Remove fixed-height trap from components */
.layout-cols-3 {
    height: auto;
    overflow: visible;
}

/* Panels */
[data-theme="dossier"] .dossier-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(108, 92, 231, 0.35);
    clip-path: var(--cut-corner);
    box-shadow: var(--shadow-base);
    position: relative;
    overflow: hidden;
}

[data-theme="dossier"] .dossier-panel::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    clip-path: var(--cut-corner-sm);
    pointer-events: none;
}

/* Center stage */
.dossier-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 640px;
}

.dossier-stage .stage-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(0, 0, 0, 0.18) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.25;
}

/* arrows */
.stage-arrows {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 3;
}

.stage-arrow-btn {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.06);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

/* character image */
#dossier-char-img {
    max-height: 60vh;
    max-width: 90%;
    z-index: 2;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));
}

/* Stats grid (use existing dossier-stat-box but tighten) */
[data-theme="dossier"] #dossier-stats-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

[data-theme="dossier"] .dossier-stat-box {
    height: 76px;
    clip-path: var(--cut-corner-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* slots */
[data-theme="dossier"] #dossier-slots-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

[data-theme="dossier"] .dossier-slot-card {
    clip-path: var(--cut-corner-sm);
    border-left: 3px solid rgba(108, 92, 231, 0.25);
}

[data-theme="dossier"] .dossier-slot-card:hover {
    border-left-color: var(--accent-secondary);
}

/* progress bar */
.dossier-progress-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.12);
    margin-top: 8px;
    width: 100%;
}

.dossier-progress-fill {
    height: 100%;
    width: 10%;
    background: var(--accent-secondary);
}

/* footer rail */
.dossier-rail {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    justify-content: space-between;
    z-index: 50;
}

/* responsive */
@media (max-width: 1100px) {

    [data-theme="dossier"] .dossier-main-layout,
    .dossier-main-layout {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        margin-top: 80px;
        padding-bottom: 100px;
        /* prevent rail overlap */
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .dossier-panel {
        width: 95%;
        /* Prevent touching edges */
        max-width: 600px;
        margin-bottom: 20px;
    }

    .dossier-stage {
        order: -1;
        min-height: 400px;
    }

    #dossier-char-img {
        max-height: 400px;
    }

    /* Fix double scrollbar by ensuring body doesn't overflow */
    body {
        overflow-x: hidden;
    }
}