/* Enhanced Evernode - Unified Navigation System */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Enhanced Navigation Styles */
.enhanced-nav {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid rgba(0, 255, 136, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ff88;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nav-brand:hover {
    color: #00cc6a;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.nav-link.active {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: #00ff88;
    border-radius: 1px;
}

/* Special nav link styles */
.nav-link[href*="premium"] {
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
}

.nav-link[href*="premium"]:hover {
    color: #ffffff;
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Navigation actions (buttons) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Role-based visibility */
.admin-only {
    display: none;
}

.tenant-only {
    display: block;
}

.demo-only {
    display: none;
}

/* Body styles when nav is present */
body.has-nav {
    margin-top: 70px;
}

/* Role indicator styles */
.role-indicator {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* Admin mode indicator */
.role-indicator.admin-mode {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.3);
}

.role-indicator.demo-mode {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
}

/* Mobile Navigation */
@media (max-width: 1024px) {
    .nav-links {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-brand {
        font-size: 1.3rem;
    }
    
    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 5px 10px;
    }
    
    .enhanced-nav {
        height: auto;
        min-height: 70px;
        padding: 10px 0;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .nav-links {
        justify-content: center;
        text-align: center;
    }
    
    .nav-link {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .nav-actions {
        gap: 10px;
    }
    
    .nav-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Smooth transitions for role changes */
.nav-link.admin-only,
.nav-link.tenant-only,
.nav-link.demo-only {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Focus states for accessibility */
.nav-link:focus,
.nav-btn:focus {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
}

/* Loading states */
.nav-loading {
    opacity: 0.6;
}

.nav-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: nav-spin 1s linear infinite;
    margin-left: 5px;
}

@keyframes nav-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Active page highlighting */
.nav-link[data-page="dashboard"].active,
.nav-link[href="/"].active {
    background: linear-gradient(45deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
}

.nav-link[data-page="discovery"].active,
.nav-link[href*="discovery"].active {
    background: linear-gradient(45deg, rgba(103, 126, 234, 0.2), rgba(103, 126, 234, 0.1));
}

.nav-link[data-page="monitoring"].active,
.nav-link[href*="monitoring"].active {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
}

.nav-link[data-page="earnings"].active,
.nav-link[href*="earnings"].active {
    background: linear-gradient(45deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
}

/* Notification badges */
.nav-link .badge {
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    min-width: 16px;
    text-align: center;
    font-weight: 600;
}

.nav-link .badge.success {
    background: #10b981;
}

.nav-link .badge.warning {
    background: #f59e0b;
}

/* Dropdown support for future use */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 8px 16px;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}
