/* Sidebar Menu Styles - Magic Pass Design */

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Panel */
.sidebar-menu {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100vh !important;
    z-index: 11000;
    background: #1e3a5f !important;
    color: white;
    overflow-y: auto;
    transform: translateX(-100%) !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    visibility: hidden;
}

.sidebar-menu.active {
    transform: translateX(0) !important;
    visibility: visible;
}

/* Desktop subnav panel */
#sidebar-subnav {
    z-index: 11001;
    transition: opacity 0.3s ease !important;
}

#sidebar-subnav.subnav-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.subnav-group {
    transition: opacity 0.2s ease;
}

.subnav-group.subnav-active {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Active menu item */
[data-subnav].submenu-active {
    border-bottom-color: white !important;
}

/* Close Button reset */
.sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Collapse Submenu (mobile) */
.sidebar-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-collapse.show {
    max-height: 1000px;
}

/* Font for nav items */
.font-agrandir {
    font-family: 'Agrandir-GrandHeavy', sans-serif;
}

/* Font for subnav items */
.font-tomato {
    font-family: 'Tomato Grotesk', sans-serif;
}

/* Body scroll lock when menu is open */
body.sidebar-open {
    overflow: hidden !important;
    touch-action: none;
}

/* Prevent layout shift */
body {
    overflow-x: hidden;
}

/* Hide main header when sidebar is open */
body.sidebar-open header {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header-left {
    flex: 1;
}

.sidebar-logo {
    display: inline-block;
    height: 35px;
}

.sidebar-logo img {
    height: 100%;
    width: auto;
    display: block;
}

.sidebar-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-close svg {
    width: 24px;
    height: 24px;
    color: white;
    fill: white;
    stroke: white;
}

.sidebar-close svg use {
    stroke: white;
    fill: white;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav-link {
    padding: 16px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.sidebar-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-submenu {
    padding: 8px 0;
}

.sidebar-submenu a {
    display: block;
    padding: 12px 32px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}
