/* --- WM-COCKPIT: SEITENFENSTER DESKTOP + STICKY MOBILE FUSSLEISTE --- */
/* Eigene Datei. Greift keine bestehenden Kacheln, Header, Cemal-Positionen oder Kaffee-Duell-Styles an. */

.wm-cockpit-root {
    pointer-events: none;
    position: relative;
    z-index: 4200;
}

.wm-cockpit-side-panel {
    position: fixed;
    top: 124px;
    bottom: 124px;
    width: var(--wm-cockpit-side-width, 280px);
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    box-sizing: border-box;
    border: 2px solid rgba(213, 0, 28, 0.85);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(12, 12, 16, 0.88), rgba(6, 8, 12, 0.92)),
        radial-gradient(circle at 20% 10%, rgba(213, 0, 28, 0.18), transparent 32%),
        radial-gradient(circle at 85% 20%, rgba(255, 215, 0, 0.10), transparent 28%);
    box-shadow:
        0 0 24px rgba(213, 0, 28, 0.22),
        inset 0 0 18px rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(6px);
    pointer-events: auto;
    overflow: hidden;
}

.wm-cockpit-left {
    left: clamp(12px, calc(50vw - 800px), 260px);
}

.wm-cockpit-right {
    right: clamp(12px, calc(50vw - 800px), 260px);
}

body.wm-cockpit-dashboard-active.wm-cockpit-desktop-panels-enabled .wm-cockpit-side-panel {
    display: flex;
}

.wm-cockpit-panel-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(213, 0, 28, 0.55);
}

.wm-cockpit-panel-head span {
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 0.7px;
    font-size: 0.98rem;
    text-transform: uppercase;
}

.wm-cockpit-panel-head small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.wm-cockpit-panel-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 4px;
}

.wm-cockpit-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid var(--porsche-red);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.34);
    padding: 11px 12px;
    box-sizing: border-box;
}

.wm-cockpit-card strong {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 5px;
}

.wm-cockpit-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.wm-cockpit-card em {
    color: var(--gold);
    font-style: normal;
    font-weight: 800;
}

.wm-cockpit-mobile-toggle,
.wm-cockpit-mobile-drawer {
    display: none;
}

@media (max-width: 900px) {
    .wm-cockpit-side-panel {
        display: none !important;
    }

    body.wm-cockpit-dashboard-active {
        padding-bottom: 74px !important;
    }

    body.wm-cockpit-dashboard-active .wm-cockpit-mobile-toggle {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 7000;
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        border: 2px solid rgba(213, 0, 28, 0.92);
        border-radius: 16px;
        background:
            linear-gradient(135deg, rgba(20, 20, 24, 0.96), rgba(8, 8, 12, 0.96)),
            radial-gradient(circle at 15% 20%, rgba(213, 0, 28, 0.25), transparent 35%),
            radial-gradient(circle at 88% 35%, rgba(255, 215, 0, 0.16), transparent 30%);
        color: var(--text-light);
        box-shadow:
            0 0 22px rgba(213, 0, 28, 0.30),
            0 10px 20px rgba(0,0,0,0.55);
        pointer-events: auto;
        cursor: pointer;
    }

    .wm-cockpit-mobile-toggle span {
        color: var(--gold);
        font-weight: 900;
        letter-spacing: 0.4px;
        font-size: 0.95rem;
    }

    .wm-cockpit-mobile-toggle strong {
        color: var(--text-muted);
        font-size: 0.74rem;
        font-weight: 700;
        text-align: right;
    }

    .wm-cockpit-mobile-drawer {
        position: fixed;
        left: 8px;
        right: 8px;
        top: var(--wm-cockpit-mobile-safe-top, 128px);
        bottom: 76px;
        z-index: 7010;
        max-height: none;
        display: flex;
        flex-direction: column;
        transform: translateY(calc(100% + 96px));
        opacity: 0;
        pointer-events: none;
        border: 2px solid rgba(213, 0, 28, 0.92);
        border-radius: 18px;
        background:
            linear-gradient(180deg, rgba(16, 16, 20, 0.98), rgba(7, 8, 12, 0.98)),
            radial-gradient(circle at 20% 5%, rgba(213, 0, 28, 0.23), transparent 38%);
        box-shadow:
            0 0 28px rgba(213, 0, 28, 0.35),
            0 14px 28px rgba(0,0,0,0.75);
        overflow: hidden;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    body.wm-cockpit-drawer-open .wm-cockpit-mobile-drawer {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .wm-cockpit-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 15px;
        border-bottom: 1px solid rgba(213, 0, 28, 0.55);
    }

    .wm-cockpit-drawer-head strong {
        display: block;
        color: var(--gold);
        font-size: 1rem;
        line-height: 1.2;
    }

    .wm-cockpit-drawer-head span {
        display: block;
        color: var(--text-muted);
        font-size: 0.75rem;
        margin-top: 2px;
    }

    #wm-cockpit-mobile-close {
        width: 34px;
        height: 34px;
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 50%;
        background: rgba(0,0,0,0.35);
        color: var(--text-light);
        font-size: 1.35rem;
        line-height: 1;
        cursor: pointer;
    }

    .wm-cockpit-mobile-content {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow-y: auto;
        padding: 12px;
        -webkit-overflow-scrolling: touch;
    }
}
