/**
 * UI Components CSS
 * 
 * Styles for reusable components
 */

/* =============================================
   Language Selector
   ============================================= */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-hover, #f5f5f5);
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: var(--bg-tertiary, #e9e5df);
    transform: scale(1.05);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.12));
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary, #191919);
    text-decoration: none;
    transition: background 0.2s ease;
}

.lang-option:hover {
    background: var(--bg-hover, #f5f5f5);
}

.lang-option.active {
    background: var(--color-primary-light, #e8f4fd);
    color: var(--color-primary, #0a66c2);
}

.lang-option span:first-child {
    font-size: 18px;
}

/* =============================================
   Theme Toggle
   ============================================= */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-hover, #f5f5f5);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary, #e9e5df);
}

.theme-toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-icon i {
    font-size: 14px;
    color: var(--text-tertiary, #999);
    transition: all 0.3s ease;
}

/* Sun icon active in light mode */
[data-theme="light"] .theme-toggle .fa-sun,
:root:not([data-theme]) .theme-toggle .fa-sun {
    color: var(--color-primary, #0a66c2);
}

/* Moon icon active in dark mode */
[data-theme="dark"] .theme-toggle .fa-moon {
    color: var(--color-primary, #70b5f9);
}

/* Rotate animation */
.theme-toggle:active .theme-toggle-icon {
    transform: rotate(180deg);
}

/* =============================================
   Nav Auth Area Styling
   ============================================= */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-auth .theme-toggle,
.nav-auth .lang-selector,
.nav-auth .notification-bell {
    flex-shrink: 0;
}

/* =============================================
   User Menu Enhancements
   ============================================= */
.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #004182 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
}

.user-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary, #191919);
    text-decoration: none;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-hover, #f5f5f5);
}

.dropdown-item i {
    width: 20px;
    color: var(--text-secondary, #666);
}

.dropdown-item.logout {
    color: var(--color-error, #cc1016);
}

.dropdown-item.logout i {
    color: var(--color-error, #cc1016);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .theme-toggle {
        padding: 8px;
    }
    
    .theme-toggle-icon:last-child {
        display: none;
    }
    
    .lang-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .notification-bell {
        padding: 6px;
    }
    
    .nav-auth {
        gap: 8px;
    }
}

