/* ===================================
   DarkSmog AI - Authentication Header Styles
   CSS for profile dropdown and auth-related header components
   =================================== */

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-primary, #1f2937);
}

.profile-btn:hover {
    background-color: var(--bg-secondary, #f3f4f6);
}

.profile-btn:focus {
    outline: 2px solid var(--accent-primary, #00d4ff);
    outline-offset: 2px;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-primary, #00d4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
}

.profile-arrow {
    color: var(--text-secondary, #6b7280);
    transition: transform 0.2s;
}

.profile-btn[aria-expanded="true"] .profile-arrow {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #161616 !important;
    border: 1px solid var(--border-primary, #e5e7eb);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-info {
    padding: 1rem;
    border-bottom: 1px solid var(--border-primary, #e5e7eb);
}

.profile-name {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.profile-email {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b7280);
}

.profile-divider {
    margin: 0;
    border: none;
    border-top: 1px solid var(--border-primary, #e5e7eb);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-primary, #1f2937);
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.profile-menu-item:hover {
    background-color: var(--bg-secondary, #f3f4f6);
}

.profile-menu-item:focus {
    background-color: var(--bg-secondary, #f3f4f6);
    outline: none;
}

.profile-menu-item:first-of-type {
    border-radius: 0;
}

.profile-menu-item:last-of-type {
    border-radius: 0;
}

.profile-menu-item svg {
    color: var(--text-secondary, #6b7280);
    flex-shrink: 0;
}

/* Notification styles */
.auth-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Animation keyframes */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .profile-menu {
        background: var(--bg-primary, #111827);
        border-color: var(--border-primary, #374151);
    }
    
    .profile-btn:hover {
        background-color: var(--bg-secondary, #374151);
    }
    
    .profile-menu-item:hover,
    .profile-menu-item:focus {
        background-color: var(--bg-secondary, #374151);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .profile-dropdown {
        display: none; /* Hide on mobile - use mobile menu instead */
    }
}

/* Enhanced accessibility */
.profile-menu-item:focus-visible {
    outline: 2px solid var(--accent-primary, #00d4ff);
    outline-offset: -2px;
}

/* Loading state for nav actions */
.nav-actions.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mobile-menu-actions.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth transitions for header updates */
.nav-actions,
.mobile-menu-actions {
    transition: opacity 0.3s ease;
}

/* My Home link styling in navigation */
.my-home-link {
    color: var(--accent-primary, #00d4ff) !important;
    font-weight: 500;
}

.my-home-link:hover {
    color: var(--accent-secondary, #0ea5e9) !important;
}