/**
 * Header User Dropdown Styles
 * 
 * @package SociAir
 * @since 1.0.0
 */

/* User Menu Wrapper */
.user-menu-wrapper {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-toggle:hover {
    border-color: var(--color-brand);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* User Avatar Circle */
.user-avatar-circle {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.user-avatar-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse-status 2s ease-in-out infinite;
}

/* User Info */
.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.95rem;
}

.user-plan {
    font-size: 0.75rem;
    color: var(--color-brand);
    font-weight: 600;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.dropdown-arrow {
    color: var(--color-text-secondary);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-menu-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: auto;
    width: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.user-menu-wrapper:hover .user-dropdown,
.user-menu-toggle[aria-expanded="true"] + .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Arrow */
.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

/* Dropdown Header */
.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-brand);
}

.dropdown-user-name {
    font-weight: 700;
    color: var(--color-text-primary);
    font-size: 1rem;
    margin-bottom: 2px;
}

.dropdown-user-email {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Dropdown Body */
.dropdown-body {
    padding: 8px;
}

/* Dropdown Item */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-brand);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.dropdown-item:hover {
    background: #f9fafb;
}

.dropdown-item:hover::before {
    transform: scaleY(1);
}

.dropdown-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.dropdown-item:hover .dropdown-item-icon {
    transform: scale(1.1);
}

.dropdown-item-content {
    flex: 1;
}

.dropdown-item-title {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.dropdown-item-desc {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* Dropdown Footer */
.dropdown-footer {
    padding: 8px;
    border-top: 1px solid #f3f4f6;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* Text Danger */
.text-danger .dropdown-item-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.text-danger .dropdown-item-title {
    color: #ef4444;
}

/* Animations */
@keyframes pulse-status {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .user-menu-toggle {
        padding: 6px 12px;
    }
    
    .user-info {
        display: none;
    }
    
    .user-dropdown {
        width: 280px;
        right: -20px;
    }
    
    .user-dropdown::before {
        right: 32px;
    }
}

@media (max-width: 480px) {
    .user-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .user-dropdown::before {
        display: none;
    }
    
    .user-menu-wrapper:hover .user-dropdown,
    .user-menu-toggle[aria-expanded="true"] + .user-dropdown {
        transform: translateY(0);
    }
}
