/* Left Sidebar Styles */
.left-sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding-top: 70px; /* Space for navbar */
}

.left-sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, var(--theme-gradient-start, #667eea) 0%, var(--theme-gradient-end, #764ba2) 100%);
}

.sidebar-header h5 {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--module-color, #ffffff);
    border-left-color: var(--module-color, rgba(255, 255, 255, 0.8));
    text-decoration: none;
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-left-color: var(--module-color, #ffffff);
    font-weight: 600;
}

/* Locked/Disabled menu items */
.sidebar-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-item.locked .sidebar-text::after {
    content: '\f023'; /* Font Awesome lock icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 8px;
    font-size: 0.85rem;
}

.sidebar-item i {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

.sidebar-text {
    flex: 1;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    left: 15px;
    top: 90px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1045;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    left: 18px; /* Move 3px right without transform */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.sidebar-toggle:active {
    left: 18px; /* Move 3px right without transform */
    filter: brightness(0.95); /* Scale effect replacement */
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-toggle.active {
    left: 295px;
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-toggle.active i {
    transform: rotate(180deg);
}

/* Overlay when sidebar is open */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Adjust content when sidebar is open (optional) */
body.sidebar-open {
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .left-sidebar {
        width: 250px;
        left: -250px;
    }
    
    .sidebar-toggle {
        top: 70px;
        left: 10px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .sidebar-toggle.active {
        left: 265px;
    }
}

/* Scrollbar styling for sidebar */
.left-sidebar::-webkit-scrollbar {
    width: 6px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
