/**
 * css/layout.css
 * SupportFlux Layout Structures
 */

/* ==========================================================================
   Public Pages (Auth)
   ========================================================================== */
.l-auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background-color: var(--color-bg-elevated);
}

.l-auth-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    animation: fadeUp var(--transition-slow);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Authenticated App Shell
   ========================================================================== */
.l-app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.l-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: var(--color-bg-surface);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: width 300ms ease;
}

html[data-sidebar-collapsed="true"] .l-sidebar {
    width: var(--sidebar-width-collapsed);
}

html[data-sidebar-collapsed="true"] .l-sidebar .sidebar-label {
    display: none;
}

html[data-sidebar-collapsed="true"] .l-sidebar .nav-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

html[data-sidebar-collapsed="true"] .l-sidebar .nav-item .nav-icon {
    margin: 0;
}

html[data-sidebar-collapsed="true"] .l-sidebar .l-sidebar__header {
    justify-content: center;
    padding: 0;
}

html[data-sidebar-collapsed="true"] .l-sidebar .sidebar-logo-text {
    display: none;
}

html[data-sidebar-collapsed="true"] .l-sidebar .l-sidebar__footer {
    align-items: center;
    justify-content: center;
}

html[data-sidebar-collapsed="true"] .l-sidebar .l-sidebar__footer .btn {
    padding: var(--space-2);
    justify-content: center;
}

html[data-sidebar-collapsed="true"] .l-sidebar .l-sidebar__footer .sidebar-label {
    display: none;
}

.l-sidebar__header {
    height: var(--header-height);
    padding: 0 var(--space-4);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-3);
}

.l-sidebar__nav {
    flex: 1;
    padding: var(--space-4) 0;
    overflow-y: auto;
}

.l-sidebar__nav-divider {
    height: 1px;
    background-color: var(--color-border);
    margin: var(--space-3) var(--space-4);
}

.l-sidebar__footer {
    padding: var(--space-4);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* Main Content Area */
.l-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-base);
    min-width: 0;
}

.l-header {
    height: var(--header-height);
    padding: 0 var(--space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-surface);
    z-index: 5;
}

.l-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-8);
    position: relative;
}

/* ==========================================================================
   Split-Pane Layout (Inbox)
   ========================================================================== */
.l-split {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    height: 100%;
    overflow: hidden;
}

.l-split__list {
    width: 40%;
    min-width: 320px;
    max-width: 500px;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--color-bg-surface);
}

.l-split__detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--color-bg-base);
}

.l-split__scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    position: relative;
}
