/* Side Menu Layout Fixes */

/* Reset HTML and Body */
html {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    position: relative;
}

/* Ensure sidebar stays fixed */
.sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    margin: 0;
    padding: 0;
}

/* Main content should scroll independently */
.main-content {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: var(--sidebar-width);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-color);
    transition: left var(--transition-speed) ease;
    /* Remove any margins or padding that create gaps */
    margin: 0 !important;
    padding: 0;
}

.main-content.expanded {
    left: var(--sidebar-collapsed-width);
}

/* Fix for scan types page specifically */
.scantypes-container,
.container,
.scan-types-container {
    padding: 2rem;
    max-width: 100%;
    margin: 0 auto;
}

/* Ensure no gaps between sidebar and content */
#sidemenu-container {
    margin: 0;
    padding: 0;
}

.sidebar + .main-content {
    margin-left: 0 !important;
}

/* Remove any default margins that might cause gaps */
* {
    box-sizing: border-box;
}

/* Ensure content inside main-content scrolls properly */
.main-content > * {
    position: relative;
    z-index: 1;
}

/* Hide the old header completely */
.header {
    display: none !important;
}

/* Remove any top padding that was for the old header */
.hero-section,
.page-header,
.content-section {
    padding-top: 2rem !important;
}

/* Fix background animation to not interfere with scrolling */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    body {
        display: block;
    }
    
    .main-content {
        position: relative;
        left: 0 !important;
        margin-left: 0 !important;
        height: 100vh;
        width: 100%;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-speed) ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
}