/**
 * User Profile Header Component Styles
 * Modern design system compatible styles for user profile header
 */

.user-profile-header {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.user-profile-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Login Button (when not authenticated) */
.user-login-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(33, 150, 243, 1);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-login-button:hover {
    background: rgba(25, 118, 210, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* User Avatar and Info (when authenticated) */
.user-info-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-info-button:hover .user-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    border: 2px solid white;
}

.user-details {
    display: none;
}

.user-name {
    display: none;
}

.user-email {
    display: none;
}

.dropdown-arrow {
    display: none;
}

/* Dropdown Menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 10000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dropdown-user-name {
    font-size: 16px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.87);
    margin-bottom: 4px;
}

.dropdown-user-email {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
}

.dropdown-menu {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(0, 0, 0, 0.87);
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.dropdown-item.danger {
    color: #d32f2f;
}

.dropdown-item.danger:hover {
    background: rgba(211, 47, 47, 0.04);
}

.dropdown-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .user-avatar {
        border-color: rgba(41, 45, 62, 1);
    }
    
    .user-dropdown {
        background: rgba(41, 45, 62, 1);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-header {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-user-name {
        color: rgba(255, 255, 255, 0.87);
    }
    
    .dropdown-user-email {
        color: rgba(255, 255, 255, 0.6);
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.87);
    }
    
    .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.04);
    }
    
    .dropdown-item.danger:hover {
        background: rgba(211, 47, 47, 0.04);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .user-profile-header {
        top: 12px;
        right: 12px;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .user-dropdown {
        min-width: 200px;
        right: 0;
    }
}

/* Animation for smooth transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown.show {
    animation: fadeInUp 0.2s ease;
}
