/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
    --primary-color: #1a2f42; /* Theme primary color */
    --secondary-color: #D4AF37; /* Theme secondary color */
    --primary-light: #f4f6f9;
    --primary-dark: #0f1c28;
    --border-color: #e5e7eb;
    --text-gray: #6b7280;
    --text-dark: #1f2937;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.language-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px;
    color: #374151 !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.language-button:hover {
    background: #f8fafc !important;
    border-color: #1a2f42 !important;
    transform: translateY(-1px);
    color: #1a2f42 !important;
    box-shadow: 0 4px 12px rgba(26, 47, 66, 0.15);
}

.language-button:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 47, 66, 0.1);
}

.language-button .flag {
    font-size: 16px;
    line-height: 1;
}

.language-button .name {
    flex: 1;
    text-align: left;
}

.language-button .dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.language-button .dropdown-icon.rotate-180 {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    margin-top: 6px;
    background: #ffffff !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
    min-width: 200px;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: transparent !important;
    border: none;
    color: #374151 !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.language-option:hover {
    background: #f8fafc !important;
    color: #1a2f42 !important;
}

.language-option.active {
    background: #3b82f6 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.language-option .flag {
    font-size: 18px;
    line-height: 1;
}

.language-option .names {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.language-option .native {
    font-weight: 500;
    line-height: 1.2;
    color: inherit;
}

.language-option .english {
    font-size: 12px;
    color: #6b7280 !important;
    line-height: 1.2;
}

.language-option.active .english {
    color: rgba(255, 255, 255, 0.8) !important;
}

.language-option .check-icon {
    width: 16px;
    height: 16px;
    color: #1a2f42;
}

.language-option.active .check-icon {
    color: #ffffff !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .language-button,
    .language-dropdown {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .language-button:hover {
        background: #374151;
    }
    
    .language-option:hover {
        background: #374151;
    }
    
    .language-option.active {
        background: #1e3a8a;
        color: #60a5fa;
    }
    
    .language-option .english {
        color: #9ca3af;
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .language-button {
        min-width: 100px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .language-dropdown {
        min-width: 180px;
    }
    
    .language-option {
        padding: 10px 14px;
    }
}

/* Navigation integration styles */
.header-language-switcher .language-button {
    background: white;
    border: 2px solid #f1f5f9;
    color: #6b7280;
}

.header-language-switcher .language-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Mobile sidebar integration */
.mobile-sidebar-language-switcher .language-switcher {
    --primary-color: inherit;
}

.mobile-sidebar-language-switcher .language-button {
    width: 100%;
    min-width: auto;
    justify-content: space-between;
    background: var(--white);
    border: 2px solid var(--border-color);
    font-size: 13px;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
}

.mobile-sidebar-language-switcher .language-dropdown {
    position: relative;
    margin-top: 0.5rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
    border-radius: 10px;
}

.mobile-sidebar-language-switcher .language-option {
    padding: 12px 16px;
}

/* Smooth transitions */
.language-switcher * {
    transition: all 0.2s ease;
}

/* Focus states for accessibility */
.language-option:focus {
    outline: none;
    background: #eff6ff;
    color: var(--primary-color, #3b82f6);
}

/* Loading state */
.language-switcher.loading .language-button {
    opacity: 0.6;
    cursor: not-allowed;
}

.language-switcher.loading .language-option {
    pointer-events: none;
}
