/* Top Navigation Bar Styles */

nav.top-nav {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

nav.top-nav .top-nav-container {
    max-width: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav.top-nav .top-nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

nav.top-nav .top-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Inactive navigation links - use inactive blue */
.nav-link,
nav.top-nav .nav-link {
    background-color: rgb(100, 170, 235);
    color: white !important;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-weight: 500;
    border-bottom: none;
    font-size: 14px;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
}

/* Hover state for inactive links */
.nav-link:hover,
nav.top-nav .nav-link:hover {
    background-color: var(--button-primary);
    color: white;
    text-decoration: none;
}

/* Active navigation link - use active blue */
.nav-link.active,
nav.top-nav .nav-link.active {
    background-color: var(--button-primary);
    color: white;
    border-bottom: none;
}

/* Active link hover state */
.nav-link.active:hover,
nav.top-nav .nav-link.active:hover {
    background-color: var(--button-primary);
    color: white;
    text-decoration: none;
}

nav.top-nav .nav-username {
    font-weight: 600;
}

/* Logout button styling */
nav.top-nav .logout-btn {
    background-color: rgb(100, 170, 235);
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

nav.top-nav .logout-btn:hover {
    background-color: var(--button-primary);
    color: white;
    text-decoration: none;
}

/* Notification indicator for news */
.notification-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ff4444;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: top;
    margin-top: 2px;
    box-shadow: 0 0 3px rgba(255, 68, 68, 0.5);
}

/* Responsive visibility classes */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    nav.top-nav .top-nav-container {
        padding: 0 15px;
        justify-content: flex-start; /* Align mobile nav to the left */
    }
    
    /* Mobile navigation layout - completely separate from desktop */
    nav.top-nav .top-nav-mobile {
        display: flex !important;
        align-items: center;
        gap: 15px;
        justify-content: flex-start; /* Left-aligned */
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        flex-direction: row; /* Force horizontal layout */
    }
    
    /* Override any inherited flex properties for mobile nav items */
    nav.top-nav .top-nav-mobile .nav-link,
    nav.top-nav .top-nav-mobile .logout-btn {
        padding: 6px 10px;
        font-size: 13px;
        flex-shrink: 0;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    nav.top-nav .top-nav-container {
        padding: 0 10px;
    }
    
    nav.top-nav .top-nav-mobile {
        gap: 10px;
    }
    
    nav.top-nav .top-nav-mobile .nav-link,
    nav.top-nav .top-nav-mobile .logout-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
}

