/* ==========================================================================
   L4D Platform â€” Base Core Layout Stylesheet (Theme Agnostic)
   ========================================================================== */

:root {
    --l4d-sidebar-width: 280px;
    --l4d-header-height: 80px;
    --l4d-radius: 12px;
}

body.l4d-platform {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* â”€â”€ Container Layout & Spacing â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.l4d-platform__container {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    padding-left: var(--l4d-sidebar-width);
}

.l4d-platform__content {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.l4d-platform__view-wrapper {
    display: block;
    min-width: 0;
}

.l4d-platform__chrome {
    min-width: 0;
}

.l4d-platform__chrome--toolbar {
    position: sticky;
    top: 0;
    z-index: 40;
}


.l4d-platform__chrome--pagination {
    position: sticky;
    bottom: 16px;
    z-index: 30;
    padding-top: 8px;
}

.l4d-platform__chrome--pagination:empty {
    display: none;
}

.l4d-platform__chrome--pagination .l4d-admin__pagination {
    margin-top: 0;
}

/* â”€â”€ Floating Sidebar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.l4d-platform__rail {
    width: var(--l4d-sidebar-width);
    display: flex;
    flex-direction: column;
    z-index: 100;
    position: fixed;
    inset: 0 auto 0 0;
    min-height: 100dvh;
    overflow: hidden;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.l4d-platform__rail-header {
    padding: 28px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.l4d-platform__rail-logo {
    max-height: 60px;
    max-width: 170px;
    object-fit: contain;
}

.l4d-platform__rail-nav {
    flex-grow: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.l4d-platform__rail-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.l4d-platform__rail-item:hover {
    transform: translateX(4px);
}

.l4d-platform__rail-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Collapsible Dropdown Nav Rail Components */
.l4d-platform__rail-dropdown-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.l4d-platform__rail-item--dropdown {
    justify-content: flex-start;
}

.l4d-platform__rail-chevron {
    margin-left: auto;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.l4d-platform__rail-chevron svg {
    width: 14px;
    height: 14px;
    display: block;
}

.l4d-platform__rail-subnav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 28px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.l4d-platform__rail-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.l4d-platform__rail-subitem:hover {
    transform: translateX(4px);
}

.l4d-platform__rail-subitem-bullet {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.5;
    flex-shrink: 0;
}

.l4d-platform__rail-footer {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.l4d-platform__logout-btn {
    background: transparent !important;
    border: none !important;
    padding: 12px 18px !important;
    width: 100% !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
}

.l4d-platform__logout-btn:hover {
    transform: translateX(4px) !important;
}

/* â”€â”€ Header Area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.l4d-platform__page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    min-height: var(--l4d-header-height);
    padding-bottom: 16px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.l4d-platform__page-heading {
    min-width: 0;
    flex: 1;
}

.l4d-platform__page-eyebrow {
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.l4d-platform__page-title {
    font-size: 28px;
    margin: 0;
}

.l4d-platform__page-subtitle {
    font-size: 12px;
    opacity: 0.7;
    margin: 2px 0 0 0;
}

.l4d-platform__page-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.l4d-platform__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.78;
    flex-wrap: wrap;
}

.l4d-platform__breadcrumb-link {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.l4d-platform__breadcrumb-link:hover {
    opacity: 1;
}

.l4d-platform__breadcrumb-separator {
    opacity: 0.5;
}

/* â”€â”€ Section Sub Navigation (Tabs Bar) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.l4d-platform__subnav {
    margin-top: -16px;
    margin-bottom: 8px;
}

.l4d-platform__subnav-inner {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scrollbar-width: none;
}

.l4d-platform__subnav-inner::-webkit-scrollbar {
    display: none;
}

.l4d-platform__subnav-link {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 14px 4px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    font-weight: 600;
    white-space: nowrap;
}

/* â”€â”€ Mobile Responsive Rules â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.l4d-platform__mobile-header {
    display: none !important;
}

@media (max-width: 900px) {
    .l4d-platform__mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 56px;
        padding: 0 20px;
        position: sticky;
        top: 0;
        z-index: 900;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .l4d-platform__hamburger {
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        padding: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

    .l4d-platform__mobile-brand {
        font-size: 16px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        margin-left: 10px;
    }

    .l4d-platform__mobile-spacer {
        display: none;
    }

    .l4d-platform__view-site-link {
        font-size: 12px;
        text-transform: uppercase;
        text-decoration: none;
        font-weight: 600;
    }

    .l4d-platform__rail-backdrop {
        position: fixed;
        inset: 0;
        background: var(--l4d-overlay);
        backdrop-filter: blur(2px);
        z-index: 990;
    }

    .l4d-platform__container {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        padding-left: 0 !important;
    }

    .l4d-platform__content {
        padding: 20px 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
        display: block !important;
    }

    .l4d-platform__chrome--toolbar {
        top: 68px;
    }

    .l4d-platform__chrome--pagination {
        bottom: 12px;
    }

    .l4d-platform__page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .l4d-platform__page-actions {
        justify-content: flex-start;
    }

    .l4d-platform__page-header {
        height: auto !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
        padding-bottom: 20px !important;
    }

    .l4d-platform__page-actions {
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .l4d-platform__rail {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--l4d-sidebar-width);
        min-height: 100vh;
        height: 100vh;
        height: 100dvh;
        inset: 0 auto 0 0;
        overflow: visible;
        transform: translateX(-100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.3s ease, visibility 0s linear 0.3s;
        z-index: 1000;
    }

    .l4d-platform__rail.is-mobile-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }
}
