/* Desktop styles */
.menu-container {
    transition: width 0.3s ease-in-out, min-width 0.3s ease-in-out;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.menu-container.collapsed {
    min-width: 60px;
    width: 60px !important;
}

.menu-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
}

.menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.menu-toggle-text {
    margin-left: 8px;
    font-weight: 500;
}

.nav-menu-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.nav-menu-scrollable::-webkit-scrollbar {
    width: 4px;
}

.nav-menu-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu-scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.nav-menu-scrollable::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Mobile styles - Bottom navigation */
@media (max-width: 640px) {
    .menu-container {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        height: auto !important;
        max-height: 70vh;
        background: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        transform: translateY(calc(100% - 60px));
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .menu-container.mobile-expanded {
        transform: translateY(0);
    }

    .mobile-menu-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 60px;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 20px 20px 0 0;
        position: relative;
    }

    .mobile-menu-handle::before {
        content: '';
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 2px;
        margin-bottom: 8px;
    }

    .nav-menu-scrollable {
        max-height: calc(70vh - 60px);
        overflow-y: auto;
        padding-bottom: 20px;
    }

    .mobile-menu-title {
        color: white;
        text-align: center;
        font-weight: 600;
        font-size: 16px;
        margin: 10px 0;
    }

    /* Hide desktop search on mobile */
    .menu-search {
        display: none;
    }

    /* Compact mobile navigation items */
    .mud-nav-group {
        margin-bottom: 8px;
    }

    .mud-nav-link {
        padding: 8px 16px;
        border-radius: 8px;
        margin: 2px 8px;
        color: rgba(255, 255, 255, 0.9);
    }

    .mud-nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .mud-nav-link.active {
        background: rgba(255, 255, 255, 0.2);
        color: white;
    }
    .mud-dialog-width-sm{
        min-width:100vw !important;
        max-width:100vw !important;
        max-height:100vh !important;
    }
}

/* Hide mobile handle on desktop */
@media (min-width: 641px) {
    .mobile-menu-handle {
        display: none;
    }
}

.menu-search {
    margin-bottom: 8px;
}

.menu-item-hidden {
    display: none !important;
}

.search-input {
    font-size: 0.875rem;
}
