/* Custom styles for SNOWPLUS SERVICES app */
body {
    padding-top: 56px; /* Adjust for fixed navbar */
}
/* You can add more styles here as needed */
/*
 * General layout and sidebar base styles
 */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Arial', sans-serif; /* Example font */
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

#sidebar {
    min-width: 250px; /* Default width when expanded */
    max-width: 250px;
    background: #343a40; /* Dark background for sidebar */
    color: #fff; /* White text color */
    transition: all 0.3s; /* Smooth transition for width change */
    position: sticky; /* Keep sidebar visible when scrolling content */
    top: 0;
    height: 100vh; /* Full viewport height */
    z-index: 1000; /* Ensure it's above other content */
    overflow-y: auto; /* Enable scrolling for long content */
}

/* Collapsed state (when 'active' class is added by JS) */
#sidebar.active {
    margin-left: -250px; /* Hides the sidebar by moving it off-screen */
}

/* Styling for sidebar header */
#sidebar .sidebar-header {
    padding: 20px;
    background: #212529; /* Slightly darker background for header */
    text-align: center;
    border-bottom: 1px solid #495057;
}

#sidebar .sidebar-header h3 {
    margin-bottom: 0;
    color: #fff;
    font-size: 1.5rem;
}

/* Styling for navigation links */
#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li a {
    padding: 10px;
    font-size: 1.1em;
    display: block;
    color: #e0e0e0; /* Lighter grey for links */
    text-decoration: none;
    transition: all 0.3s;
}

#sidebar ul li a:hover {
    color: #343a40; /* Dark text on hover */
    background: #fff; /* White background on hover */
}

#sidebar ul li.active > a, /* Active parent item */
#sidebar ul li a[aria-expanded="true"] { /* Expanded dropdown parent */
    color: #fff;
    background: #495057; /* Slightly lighter dark background for active/expanded */
}

/* Styling for dropdown submenus */
#sidebar ul ul a {
    font-size: 0.9em !important;
    padding-left: 30px !important;
    background: #495057; /* Background for sub-items */
}

/* Icons within sidebar links */
#sidebar ul li a i {
    margin-right: 10px;
}


/*
 * Content area styles
 */
#content {
    width: 100%; /* Full width initially */
    min-height: 100vh;
    transition: all 0.3s;
    /* When sidebar is not active, it will push content right */
    /* Adjusted by JS on toggle using 'active' class */
    padding: 20px; /* Padding for content inside */
}

/* Adjust content when sidebar is not collapsed (default state) */
.wrapper.active #content {
    width: calc(100% - 250px); /* Content takes remaining width */
}

/* Adjust content when sidebar IS collapsed (active class on sidebar) */
#content.active {
    width: 100%; /* Take full width when sidebar is hidden */
}

/*
 * Toggle button for sidebar (in the navbar)
 */
#sidebarCollapse {
    background: #6c757d; /* Bootstrap secondary color */
    border: none;
    outline: none;
    color: #fff;
    border-radius: 0.25rem; /* Bootstrap border-radius */
    padding: 0.375rem 0.75rem; /* Bootstrap button padding */
    line-height: 1.5;
    font-size: 1rem;
    cursor: pointer;
}

#sidebarCollapse i {
    margin-right: 5px; /* Space between icon and text */
}

/*
 * Media queries for responsiveness
 * (Sidebar hidden by default on small screens)
 */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px; /* Hide sidebar by default on small screens */
    }
    #sidebar.active {
        margin-left: 0; /* Show sidebar when 'active' class is toggled */
    }
    #content {
        width: 100%; /* Content always full width on small screens */
    }
    #sidebarCollapse span {
        display: inline-block; /* Show 'Toggle Sidebar' text on smaller screens */
        margin-left: 5px;
    }
}

/* --- Responsive Sidebar & Hamburger Menu --- */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background: #343a40;
    color: #fff;
    z-index: 2000;
    transition: transform 0.3s ease;
    transform: translateX(0);
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}
#sidebar.sidebar-hidden {
    transform: translateX(-100%);
}
#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    z-index: 1999;
}
#sidebar.active ~ #sidebar-overlay {
    display: block;
}
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(-100%) !important;
        margin-left: 0 !important;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 250px;
        z-index: 2000;
        background: #343a40;
        transition: transform 0.3s ease;
    }
    #sidebar.active {
        transform: translateX(0) !important;
    }
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.4);
        z-index: 1999;
    }
    #sidebar.active ~ #sidebar-overlay {
        display: block;
    }
    .wrapper, #content {
        width: 100% !important;
        margin-left: 0 !important;
    }
}
/* Hamburger button style */
#sidebarToggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    margin-right: 10px;
    z-index: 2100;
}
#sidebarToggle:focus {
    outline: none;
}
/* Responsive images */
img, video {
    max-width: 100%;
    height: auto;
}
/* Responsive tables */
table {
    width: 100%;
    border-collapse: collapse;
}
@media (max-width: 767.98px) {
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 600px;
    }
}
/* Responsive forms */
input, select, textarea, button {
    max-width: 100%;
    box-sizing: border-box;
}
/* Responsive font sizes */
body, html {
    font-size: 16px;
}
@media (max-width: 575.98px) {
    body, html {
        font-size: 15px;
    }
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
}