@import "mobile-system.css";

/* ==========================================================================
   CLIENT NAVBAR & PROFILE DROPDOWN STYLES
   ========================================================================== */

:root {
    --gold-primary: #D4AF37;
    --gold-secondary: #C5A028;
    --gold-light: #F8F0D5;
    --gold-soft: #E8D6A0;
    --gold-dark: #9E7B1F;
    --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #B8942B 100%);
    --black-rich: #0A0A0A;
    --black-primary: #1A1A1A;
    --black-soft: #2C2C2C;
    --white-pure: #FFFFFF;
    --white-soft: #FAFAFA;
    --gold-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
    --transition: all 0.3s ease;
}

/* Header container - Theme aware */
header {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.22);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--gold-soft);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gold-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black-rich);
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: var(--gold-shadow);
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(5deg) scale(1.05);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.logo-text span {
    background: none;
    -webkit-text-fill-color: #FFFFFF;
    color: #FFFFFF;
    font-weight: 600;
}

[data-theme="light"] .logo-text span {
    -webkit-text-fill-color: var(--black-primary);
    color: var(--black-primary);
}

/* Main Navigation */
#mainNav {
    display: flex;
    align-items: center;
}

/* Mobile navigation drawer elements - strictly hidden on desktop */
.mobile-nav-backdrop,
.mobile-nav-header,
.mobile-nav-close-btn,
.mobile-nav-header-btn,
.mobile-nav-brand,
.mobile-nav-actions {
    display: none !important;
}

@media (min-width: 993px) {
    .mobile-nav-backdrop,
    .mobile-nav-header,
    .mobile-nav-close-btn,
    .mobile-nav-header-btn,
    .mobile-nav-brand,
    .mobile-nav-actions {
        display: none !important;
    }
}

@media (max-width: 992px) {
    #mainNav.active .mobile-nav-header,
    #mainNav.active .mobile-nav-actions,
    #mainNav.active .mobile-nav-close-btn,
    #mainNav.active .mobile-nav-header-btn {
        display: flex !important;
    }
    #mainNav.active .mobile-nav-brand {
        display: flex !important;
    }
    #mainNav.active .mobile-nav-backdrop {
        display: block !important;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 100px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    margin: 0;
}

[data-theme="light"] .nav-menu {
    background: var(--white-soft);
    border: 1px solid var(--gold-soft);
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    color: #E8E8EA;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 100px;
    transition: var(--transition);
    white-space: nowrap;
}

[data-theme="light"] .nav-link {
    color: var(--black-soft);
}

.nav-link i {
    font-size: 0.95rem;
    color: var(--gold-primary);
    opacity: 0.75;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.08);
}

.nav-link:hover i {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-link.active {
    background: var(--gold-gradient);
    color: var(--black-rich);
    font-weight: 600;
    box-shadow: var(--gold-shadow);
}

.nav-link.active i {
    color: var(--black-rich);
    opacity: 1;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Sign In / Sign Up Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-signin, .btn-signup {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-signin {
    background: transparent;
    color: var(--black-primary);
    border: 1px solid var(--gold-soft);
}

.btn-signin:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-dark);
}

.btn-signup {
    background: var(--gold-gradient);
    color: var(--black-rich);
    box-shadow: var(--gold-shadow);
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.35);
}

/* Notification Bell Wrapper */
.notification-wrapper {
    position: relative;
    display: inline-block;
}

.notification-bell {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #181818;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

[data-theme="light"] .notification-bell {
    background: var(--white-soft);
    border: 1px solid var(--gold-soft);
    color: var(--black-soft);
}

.notification-bell i {
    font-size: 1.1rem;
    color: var(--gold-primary);
    transition: var(--transition);
}

.notification-bell:hover {
    background: rgba(212, 175, 55, 0.18);
    border-color: var(--gold-primary);
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #ffffff;
}

.notification-badge.hidden {
    display: none;
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    background: #181818;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 1050;
    overflow: hidden;
    color: #FFFFFF;
}

[data-theme="light"] .notification-dropdown {
    background: #ffffff;
    border: 1px solid var(--gold-soft);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    color: #1A1A1A;
}

.notification-dropdown.show {
    display: block;
    animation: navDropdownFade 0.25s ease forwards;
}

/* Profile Wrapper & Button Trigger */
.profile-wrapper {
    position: relative;
    display: inline-block;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    background: #181818;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 100px;
    cursor: pointer;
    transition: var(--transition);
    color: #FFFFFF;
    font-weight: 500;
    font-size: 0.9rem;
    outline: none;
}

[data-theme="light"] .profile-btn {
    background: var(--white-soft);
    border: 1px solid var(--gold-soft);
    color: var(--black-soft);
}

.profile-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.profile-avatar-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--black-rich);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: #FFFFFF;
}

[data-theme="light"] .profile-name {
    color: var(--black-primary);
}

.profile-arrow {
    font-size: 0.75rem;
    color: var(--gold-primary);
    transition: transform 0.25s ease;
}

.profile-wrapper.active .profile-arrow,
.profile-dropdown.show ~ .profile-btn .profile-arrow {
    transform: rotate(180deg);
}

/* Profile Dropdown Menu */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 250px;
    background: #181818;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 1050;
    overflow: hidden;
    color: #FFFFFF;
}

[data-theme="light"] .profile-dropdown {
    background: #ffffff;
    border: 1px solid var(--gold-soft);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    color: #1A1A1A;
}

.profile-dropdown.show {
    display: block;
    animation: navDropdownFade 0.25s ease forwards;
}

@keyframes navDropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown-header {
    padding: 16px;
    background: var(--white-soft);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.profile-dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--black-rich);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.25);
    flex-shrink: 0;
}

.profile-dropdown-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-dropdown-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--black-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown-role {
    font-size: 0.75rem;
    color: var(--gold-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-dropdown-menu {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.profile-dropdown-menu li {
    margin: 0;
    padding: 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--black-soft);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.profile-dropdown-item i {
    font-size: 1rem;
    color: var(--gold-primary);
    width: 18px;
    text-align: center;
    transition: var(--transition);
}

.profile-dropdown-item:hover {
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-dark);
    padding-left: 22px;
}

.profile-dropdown-item:hover i {
    transform: scale(1.15);
}

.profile-dropdown-divider {
    height: 1px;
    background: rgba(212, 175, 55, 0.15);
    margin: 4px 0;
}

.profile-dropdown-item.logout-item {
    color: #dc2626;
}

.profile-dropdown-item.logout-item i {
    color: #dc2626;
}

.profile-dropdown-item.logout-item:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

/* Mobile Menu Button - FAR RIGHT */
.mobile-menu-btn {
    display: none;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    background: var(--white-soft);
    border: 1.5px solid var(--gold-soft);
    border-radius: 12px;
    cursor: pointer;
    padding: 10px 8px;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    z-index: 1001;
    order: 99;
    margin-left: 4px;
    transition: var(--transition);
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--black-primary);
    border-radius: 4px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--gold-primary);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 16px;
    }
    
    .nav-link {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .profile-name {
        display: none;
    }
    
    .profile-btn {
        padding: 4px 8px;
    }
}

@media (max-width: 992px) {
    .header-container {
        height: 70px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Mobile navigation overlay is managed via mobile-system.css */
    #mainNav:not(.active) {
        display: none !important;
    }

    .profile-dropdown {
        right: -10px;
        width: calc(100vw - 32px);
        max-width: 320px;
    }
}
