/* Side Menu Container */
/* Using tokens from theme.css */
/* We bind these to the container directly so they inherit from body.light if applicable */
#side-menu-container {
    --side-menu-bg: var(--bg-surface);
    --side-menu-text: var(--txt-primary);
    --side-menu-hover: var(--bg-surface-hover);
    --side-menu-active: var(--bg-surface-active);
    --side-menu-accent: var(--accent);
}

/* Main Container Styles */
#side-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background-color: var(--glass-material);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-subtle);
    color: var(--side-menu-text);
    z-index: 99999;
    /* Very high to be over everything */
    padding: 20px;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

#side-menu-container.side-menu-open {
    transform: translateX(0);
}

/* Overlay */
#side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-overlay);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

#side-menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Toggle Button (Floating) */
#side-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 99900;
    /* Below menu but above content */
    background: var(--bg-surface);
    color: var(--txt-primary);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    transition: background 0.2s;
}

#side-menu-toggle:hover {
    background: var(--side-menu-hover);
}

/* Header */
.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-subtle);
}

.side-menu-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

#side-menu-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
}

/* List */
.side-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.side-menu-list li {
    margin-bottom: 5px;
}

.side-menu-list a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    font-size: 0.95em;
}

.side-menu-list a:hover {
    background-color: var(--side-menu-hover);
}

.side-menu-list a.active {
    background-color: var(--side-menu-active);
    color: var(--side-menu-accent);
    font-weight: 600;
}

.side-menu-list a i {
    width: 25px;
    text-align: center;
    margin-right: 15px;
    font-size: 1.1em;
}

/* Scrollbar for menu */
.side-menu-list::-webkit-scrollbar {
    width: 6px;
}

.side-menu-list::-webkit-scrollbar-track {
    background: transparent;
}

.side-menu-list::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 3px;
}