/**
 * MATRIX NAVIGATION - COMPACT MINIMALISTIC DESIGN
 * Clean, efficient, mobile-first approach
 */

/* === CORE NAVIGATION CONTAINER === */
.nav-matrix-unified {
    background: #000;
    border-bottom: 1px solid #00ff41;
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-matrix-unified .container-matrix {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 12px;
    max-width: 100%;
}

/* === LOGO === */
.nav-logo-unified {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.nav-logo-unified:hover {
    color: #00ff41;
    text-shadow: 0 0 4px #00ff41;
}

.nav-logo-unified img {
    width: 14px;
    height: 14px;
    filter: hue-rotate(90deg) brightness(1.3);
}

/* === HAMBURGER MENU === */
.nav-mobile-toggle-unified {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #00ff41;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    order: 999;
}

.nav-mobile-toggle-unified:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 4px rgba(0, 255, 65, 0.3);
}

/* === NAVIGATION MENU === */
.nav-menu-unified {
    display: none; /* Hidden by default on mobile */
}

/* Desktop Navigation */
@media (min-width: 769px) {
    .nav-mobile-toggle-unified {
        display: none;
    }
    
    .nav-menu-unified {
        display: flex;
        align-items: center;
        gap: 4px;
        height: 48px;
    }
}

/* === NAVIGATION LINKS === */
.nav-link-unified {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    height: 32px;
    color: rgba(0, 255, 65, 0.8);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link-unified:hover {
    color: #00ff41;
    background: rgba(0, 255, 65, 0.05);
    border-color: rgba(0, 255, 65, 0.3);
}

.nav-link-unified.active {
    color: #000;
    background: #00ff41;
    border-color: #00ff41;
}

/* === USER SECTION === */
.nav-user-unified {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 48px;
    flex-shrink: 0;
}

.nav-user-info-unified {
    color: rgba(0, 255, 65, 0.8);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 8px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 2px;
    background: rgba(0, 255, 65, 0.05);
    height: 32px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-user-info-unified:hover {
    color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.5);
}

.nav-logout-unified {
    background: transparent;
    color: rgba(255, 120, 120, 0.9);
    border: 1px solid rgba(255, 120, 120, 0.4);
    padding: 6px 8px;
    font-size: 10px;
    font-weight: 600;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    border-radius: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav-logout-unified:hover {
    color: #ff6464;
    background: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 100, 100, 0.5);
}

/* === DROPDOWN STYLING === */
.nav-dropdown-unified {
    position: relative;
}

.nav-dropdown-menu-unified {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 160px;
    background: #000;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
    z-index: 1001;
    padding: 4px 0;
    display: none;
    flex-direction: column;
}

.nav-dropdown-menu-unified.nav-visible {
    display: flex;
}

.nav-dropdown-item-unified {
    display: block;
    width: 100%;
    padding: 6px 12px;
    color: rgba(0, 255, 65, 0.8);
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
}

.nav-dropdown-item-unified:hover {
    color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
}

/* === MOBILE MENU OVERLAY === */
@media (max-width: 768px) {
    .nav-menu-unified.mobile-open {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.98);
        border-top: 2px solid #00ff41;
        z-index: 9999;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 80px 24px 24px 24px;
        gap: 16px;
        overflow-y: auto;
    }
    
    /* Mobile navigation links */
    .nav-menu-unified.mobile-open .nav-link-unified {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        height: auto;
        min-height: 44px;
        font-size: 12px;
        border: 1px solid rgba(0, 255, 65, 0.2);
        border-radius: 4px;
        background: rgba(0, 0, 0, 0.5);
        margin-bottom: 4px;
    }
    
    /* Hide desktop user section on mobile */
    .nav-user-desktop {
        display: none;
    }
    
    /* Show mobile menu user section */
    .nav-user-mobile-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
        width: 100%;
        border-top: 2px solid rgba(0, 255, 65, 0.3);
        margin-top: 16px;
        background: rgba(0, 255, 65, 0.05);
        border-radius: 4px;
    }
    
    /* Mobile user info */
    .nav-user-mobile-menu .nav-user-info-unified {
        font-size: 12px;
        padding: 12px 16px;
        height: 44px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        text-decoration: none;
        border: 2px solid rgba(0, 255, 65, 0.4);
        background: rgba(0, 255, 65, 0.1);
        border-radius: 4px;
        font-weight: 700;
        letter-spacing: 0.05em;
        transition: all 0.2s ease;
        text-transform: uppercase;
    }
    
    /* Mobile logout button */
    .nav-user-mobile-menu .nav-logout-unified {
        font-size: 12px;
        padding: 12px 16px;
        height: 44px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        border: 2px solid rgba(255, 120, 120, 0.5);
        background: rgba(255, 120, 120, 0.08);
        color: rgba(255, 140, 140, 1);
        border-radius: 4px;
        font-weight: 700;
        letter-spacing: 0.05em;
        transition: all 0.2s ease;
        text-transform: uppercase;
        cursor: pointer;
    }
    
    /* Mobile dropdown adjustments */
    .nav-dropdown-unified {
        width: 100%;
    }
    
    .nav-dropdown-menu-unified {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        border-left: 2px solid rgba(0, 255, 65, 0.3);
        margin-left: 16px;
        background: rgba(0, 255, 65, 0.05);
        padding: 8px;
    }
    
    .nav-dropdown-item-unified {
        padding: 8px 12px;
        font-size: 10px;
        min-height: 36px;
        display: flex;
        align-items: center;
    }
}

/* === UTILITY CLASSES === */
.nav-hidden {
    display: none !important;
}

.nav-visible {
    display: flex !important;
}

/* Desktop behavior */
@media (min-width: 769px) {
    .nav-user-mobile-menu {
        display: none !important;
    }
    
    .nav-user-desktop {
        display: flex !important;
    }
}