/**
 * mobile-menu.css - Mobile Menu 2x2 Grid Styles
 * Fullscreen overlay menu for mobile devices matched to Desktop Sidebar Identity
 */

/* Container - Fullscreen overlay */
.mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000001;
    /* Above Eva (99999) */
    opacity: 0;
    visibility: hidden;
    transition: none;
    isolation: isolate;
    pointer-events: auto;
}

.mobile-menu-container.active {
    opacity: 1;
    visibility: visible;
}

/* Backdrop */
.mobile-menu-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* Content panel */
.mobile-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Match Desktop Sidebar Drawer Background */
    background: #121212;
    display: flex;
    flex-direction: column;
    transform: none;
    transition: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    z-index: 1;
    pointer-events: auto !important;
    touch-action: manipulation;
}

.mobile-menu-container.active .mobile-menu-content {
    transform: none;
}

/* Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: transparent;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.mobile-menu-logo {
    height: 32px;
    width: auto;
    /* Force white logo like sidebar */
    filter: brightness(0) invert(1);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-menu-close:hover,
.mobile-menu-close:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Categories container */
.mobile-menu-categories {
    flex: 1;
    padding: 0 20px;
    overflow-y: auto;
}

/* Category section */
.mobile-menu-category {
    margin-bottom: 30px;
    opacity: 1;
    transform: translateY(0);
}

/* Animations removed to avoid menu/logo "jumping" on open */

.mobile-menu-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px 12px 4px;
    margin-bottom: 12px;
    color: #ffffff;
    /* Match Desktop Drawer Title */
    font-size: 13px;
    /* Slightly larger like desktop */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Inter', sans-serif;
}

.mobile-menu-category-header i {
    font-size: 14px;
    color: inherit;
    /* White */
    opacity: 1;
}

/* 2x2 Grid layout */
.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Menu item card - Match Desktop Rail Item Style but Expanded */
.mobile-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 12px;

    /* Default state: Transparent */
    background: rgba(255, 255, 255, 0.05);
    /* Slightly more visible background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;

    color: #ffffff;
    /* Pure white for better contrast */
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 100px;
    pointer-events: auto;
    touch-action: manipulation;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background: rgba(255, 255, 255, 0.1);
    /* Brighter hover */
    color: #fff;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-item.active {
    /* Match Desktop Rail Active State EXACTLY but ensuring visibility */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.mobile-menu-item i {
    font-size: 24px;
    color: #ffffff;
    /* Pure white icon */
    margin-bottom: 4px;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    /* Better legibility */
}

.mobile-menu-item:hover i {
    transform: scale(1.1);
}

.mobile-menu-item.active i {
    /* No special color, just white (inherited) */
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.mobile-menu-item span {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    font-family: 'Inter', sans-serif;
    color: #ffffff !important;
    /* Force white color override */
}

/* Footer */
.mobile-menu-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 24px;
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    /* Force white */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
    font-family: 'Inter', sans-serif;
    pointer-events: auto;
    touch-action: manipulation;
}

.mobile-menu-footer-btn:hover,
.mobile-menu-footer-btn:active {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-footer-btn.logout {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.mobile-menu-footer-btn.logout:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-footer-btn i {
    font-size: 16px;
}

/* Empty state */
.mobile-menu-empty {
    padding: 32px 20px;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Body class when menu is open */
body.mobile-menu-active {
    overflow: hidden !important;
}

/* Responsive adjustments */
@media (max-width: 380px) {
    .mobile-menu-grid {
        gap: 10px;
    }

    .mobile-menu-item {
        padding: 16px 8px;
        min-height: 90px;
    }

    .mobile-menu-item i {
        font-size: 20px;
    }

    .mobile-menu-item span {
        font-size: 12px;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .mobile-menu-container {
        display: none !important;
    }
}
