/*
==============================================
PROFESSIONAL HEADER MENU STYLES
==============================================
*/

/* Enhanced Header with Glass Morphism */
body > header:first-of-type {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

/* Scrolled state - more prominent shadow */
body > header:first-of-type.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 1);
}

/* Enhanced Navigation Container */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

/* Professional Logo Styling */
.logo a {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.logo a:hover {
    color: #3b82f6;
    transform: translateY(-1px);
}

.logo-text {
    color: #1e3a8a;
    font-weight: 700;
}

.logo-dot {
    color: #3b82f6;
    font-weight: 700;
}

/* Desktop Navigation Links */
@media (min-width: 992px) {
    .nav-links {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-links a {
        color: #475569;
        font-weight: 500;
        font-size: 0.9375rem;
        padding: 0.625rem 1rem;
        border-radius: 8px;
        transition: all 0.2s ease;
        position: relative;
    }

    .nav-links a:hover {
        color: #3b82f6;
        background: #f1f5f9;
    }

    .nav-links a.active {
        color: #3b82f6;
        background: #dbeafe;
        font-weight: 600;
    }

    /* Subtle underline animation */
    .nav-links a::after {
        content: '';
        position: absolute;
        bottom: 0.5rem;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 80%;
        height: 2px;
        background: #3b82f6;
        border-radius: 2px;
        transition: transform 0.2s ease;
    }

    .nav-links a:hover::after,
    .nav-links a.active::after {
        transform: translateX(-50%) scaleX(1);
    }
}

/* Notification Bell Container */
.notification-bell-container {
    position: relative;
}

.notification-bell {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.notification-bell:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.notification-bell svg {
    width: 20px;
    height: 20px;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.notification-badge.guest-badge {
    background: #10b981;
}

/* Profile & Auth Dropdown Buttons */
.profile-btn,
.auth-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: #475569;
}

.profile-btn:hover,
.auth-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.profile-btn.active,
.auth-btn.active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #3b82f6;
}

.profile-btn svg,
.auth-btn svg {
    transition: transform 0.2s ease;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
}

.profile-btn.active .dropdown-arrow,
.auth-btn.active svg:last-child {
    transform: rotate(180deg);
}

/* Professional Dropdown Menus */
.profile-dropdown-menu,
.auth-dropdown-menu,
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.08);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    z-index: 1000;
}

.profile-dropdown-menu.show,
.auth-dropdown-menu.show,
.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Notification Dropdown Specific */
.notification-dropdown {
    min-width: 360px;
    max-width: 400px;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.notification-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mark-all-read:hover {
    background: #dbeafe;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #eff6ff;
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.notification-message {
    color: #64748b;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.notification-time {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.notification-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.view-all-link {
    color: #3b82f6;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: #2563eb;
}

/* Profile Dropdown */
.profile-header {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-email {
    color: #64748b;
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.25rem 0;
}

.profile-dropdown-item,
.auth-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #475569;
    transition: all 0.2s ease;
    text-decoration: none;
}

.profile-dropdown-item:hover,
.auth-dropdown-item:hover {
    background: #f8fafc;
}

.profile-item-icon,
.auth-item-icon {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.profile-dropdown-item:hover .profile-item-icon,
.auth-dropdown-item:hover .auth-item-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.profile-item-content,
.auth-item-content {
    flex: 1;
}

.profile-item-main,
.auth-item-main {
    font-weight: 500;
    color: #1e293b;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.profile-item-desc,
.auth-item-desc {
    color: #64748b;
    font-size: 0.75rem;
}

/* Logout Item Special Styling */
.profile-logout:hover {
    background: #fef2f2;
}

.profile-logout:hover .profile-item-icon {
    background: #fee2e2;
    color: #ef4444;
}

.profile-logout:hover .profile-item-main {
    color: #ef4444;
}

/* Auth Dropdown Highlight */
.auth-highlight {
    background: #eff6ff;
}

.auth-highlight:hover {
    background: #dbeafe;
}

.auth-highlight .auth-item-main {
    color: #3b82f6;
    font-weight: 600;
}

/* Auth Divider */
.auth-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.25rem 0;
}

/* Mobile Menu Enhancements */
@media (max-width: 991px) {
    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 9998;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: 80px;
        overflow-y: auto;
    }

    .mobile-menu.show {
        transform: translateX(0);
    }

    .mobile-menu nav {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .mobile-menu a {
        color: #475569;
        font-size: 1rem;
        font-weight: 500;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f1f5f9;
        transition: all 0.2s ease;
    }

    .mobile-menu a:hover {
        background: #f8fafc;
        color: #3b82f6;
    }

    .mobile-auth-primary,
    .mobile-auth-secondary {
        margin: 0.5rem 1.5rem;
        padding: 0.875rem;
        border-radius: 8px;
        text-align: center;
        font-weight: 600;
    }

    .mobile-auth-primary {
        background: #3b82f6;
        color: white !important;
        border: none;
    }

    .mobile-auth-secondary {
        background: white;
        color: #3b82f6 !important;
        border: 2px solid #3b82f6;
    }
}

/* Loading States */
.notification-loading,
.notification-empty,
.notification-error {
    padding: 2rem;
    text-align: center;
    color: #64748b;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.75rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.notification-empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .nav-links {
        display: none;
    }

    .notification-dropdown {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: calc(100vw - 2rem);
        max-width: 360px;
    }

    .notification-dropdown.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* Smooth Transitions for All Interactive Elements */
* {
    -webkit-tap-highlight-color: transparent;
}

button,
a,
.notification-item,
.profile-dropdown-item,
.auth-dropdown-item {
    -webkit-touch-callout: none;
    user-select: none;
}
