/**
 * DleJDocumentation Reader Template Styles
 * Full-viewport documentation reader layout
 */

/* ===== RESET AND BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body.dlej-documentation-standalone {
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== MAIN WRAPPER ===== */
.dlej-documentation-reader {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Override any component container restrictions */
.dlej-documentation-reader .dlejdocumentation-view-documentations,
.dlej-documentation-reader .dlejdocumentation {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Force the responsive layout to use full width and height */
.dlej-documentation-reader .responsive-documentation-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    max-width: none !important;
}

/* ===== SIDEBAR - ARCHBEE STYLE ===== */
.dlej-documentation-reader .documentation-sidebar {
	position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: var(--dlej-reader-sidebar-width, 280px) !important;
    min-width: var(--dlej-reader-sidebar-width, 280px) !important;
    height: 100vh !important;
    max-height: 98.5vh !important;
    margin: 7px;
    border-radius: 5px !important;
    border-left: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border: 1px solid color-mix(in srgb, var(--dlej-primary), transparent 80%) !important;
    box-shadow: none !important;
    overflow-y: auto;
    background: #fafbfc;
    z-index: 100;
}

/* Dark mode sidebar */
[data-theme="dark"] .dlej-documentation-reader .documentation-sidebar {
    background: var(--dlej-secondary-dark, #383838) !important;
    border-right: 1px solid color-mix(in srgb, var(--dlej-primary), transparent 80%) !important;
}

/* No wrapper needed in standalone mode */
.dlej-documentation-reader .sidebar-wrapper {
    display: contents !important;
}

/* ===== CONTENT AREA ===== */
.dlej-documentation-reader .documentation-content-area {
    flex: 1;
    margin-left: var(--dlej-reader-sidebar-width, 280px);
    min-height: 100vh;
}
.dlej-reader-header {
    position: fixed;
    top: 0;
    left: calc(var(--dlej-reader-sidebar-width, 280px) - 2px);
    right: 0;
    height: 30px;
    z-index: 999;
    background: #fafbfc;
    border-bottom: 1px solid color-mix(in srgb, var(--dlej-primary), transparent 80%);
}
.dlej-documentation-reader .main-content {
    min-height: calc(100vh - 60px);
    padding: 10px 40px;
    max-width: var(--dlej-reader-content-max-width, none);
}

/* ===== THEME TOGGLE ===== IN STYLE
.dlej-documentation-reader .dlej-theme-toggle {
    position: fixed;
    top: 45%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1000;
} */

/* ===== MOBILE MENU TOGGLE ===== */
.dlej-documentation-reader .mobile-menu-toggle {
    display: none;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .dlej-documentation-reader .documentation-sidebar {
        left: -300px !important;
        transition: left 0.3s ease;
    }
    
    .dlej-documentation-reader .documentation-sidebar.active {
        left: 0 !important;
    }
    
    .dlej-documentation-reader .documentation-content-area {
        margin-left: 0;
        width: 100%;
    }
    
    .dlej-documentation-reader .main-content {
        padding: 15px;
    }
    
    .dlej-documentation-reader .mobile-menu-toggle {
        display: block !important;
        position: fixed;
        top: 25%;
        right: 0px;
        z-index: 99;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .dlej-documentation-reader .documentation-sidebar,
    .dlej-documentation-reader .sidebar-wrapper,
    .dlej-documentation-reader .mobile-menu-toggle,
    .dlej-documentation-reader .dlej-theme-toggle,
    .dlej-documentation-reader .sidebar-overlay {
        display: none !important;
    }
    
    .dlej-documentation-reader .documentation-content-area {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .dlej-documentation-reader .main-content {
        max-width: none;
    }
}
