/* Version 0 Layout CSS - Minimal container layout for left navigation + main area */
:root {
    --complex-font-base: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --complex-font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;
}

body,
.main-layout,
.left-navigation,
.main-content,
.content-area,
.project-page,
.create-project-page,
.thread-page,
button,
input,
select,
textarea,
label {
    font-family: var(--font-base, var(--complex-font-base));
}

code,
pre,
.code-font {
    font-family: var(--font-mono, var(--complex-font-mono));
}

.main-layout {
    display: flex;
    height: 100vh;
    width: 100%;
    position: relative;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left 0.2s ease;
}

.left-navigation + .main-content {
    margin-left: var(--nav-expanded-width);
}

.left-navigation.collapsed + .main-content {
    margin-left: var(--nav-collapsed-width);
}

.main-content header {
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.panel-collapse-toggle {
    border: 1px solid #cbd5ff;
    background-color: #e0e7ff;
    color: #1d4ed8;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.panel-collapse-toggle:hover {
    background-color: #c7d2fe;
    color: #1e3a8a;
}

.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    border: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    cursor: pointer;
    display: none;
}

body.nav-drawer-open .mobile-drawer-overlay,
body.inspector-drawer-open .mobile-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
    display: block;
}

body.nav-drawer-open,
body.inspector-drawer-open {
    overflow: hidden;
}

/* Responsive Design for Mobile/Tablet */
@media (max-width: 1024px) {
    .main-layout {
        height: 100dvh;
    }

    .left-navigation,
    .left-navigation.collapsed {
        width: min(90vw, var(--nav-expanded-width));
        max-width: min(90vw, var(--nav-expanded-width));
    }

    .left-navigation {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: none;
        z-index: 1200;
    }

    body.nav-drawer-open .left-navigation {
        transform: translateX(0);
        box-shadow: 0 25px 60px rgba(15, 23, 42, 0.3);
    }

    .left-navigation + .main-content,
    .left-navigation.collapsed + .main-content {
        margin-left: 0;
    }

    .nav-chrome .collapse-toggle {
        display: none;
    }
}
