/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    min-width: auto;
    justify-content: center;
    font-weight: 500;
    box-shadow: none;
    text-shadow: none;
}

.language-btn:hover {
    background: rgba(55, 65, 81, 0.1);
    color: #2196f3;
    transform: none;
    box-shadow: none;
}

.language-btn i {
    font-size: 1.1rem;
    color: inherit;
    text-shadow: none;
    filter: none;
}

.language-btn:hover i {
    color: inherit;
    text-shadow: none;
}

.lang-text {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: #f9fafb;
    color: #2e7d32;
}

.language-option.active {
    background: #e8f5e8;
    color: #2e7d32;
    font-weight: 600;
}

.language-option.active::after {
    content: '✓';
    margin-left: auto;
    color: #2e7d32;
    font-weight: bold;
}

.flag {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Dark theme support */
[data-theme="dark"] .language-btn {
    color: #d1d5db;
    background: transparent;
    border: none;
    box-shadow: none;
}

[data-theme="dark"] .language-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #42a5f5;
    box-shadow: none;
}

[data-theme="dark"] .language-dropdown {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .language-option {
    color: #d1d5db;
    border-color: #374151;
}

[data-theme="dark"] .language-option:hover {
    background: #374151;
    color: #42a5f5;
}

[data-theme="dark"] .language-option.active {
    background: #4b5563;
    color: #42a5f5;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .language-btn {
        padding: 0.4rem 0.6rem;
        min-width: 50px;
    }
    
    .lang-text {
        font-size: 0.7rem;
    }
    
    .language-dropdown {
        right: -10px;
        min-width: 140px;
    }
    
    .language-option {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Animation for language change */
.language-change-animation {
    animation: languageChange 0.5s ease-in-out;
}

@keyframes languageChange {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0.7;
        transform: translateX(-5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bangla font support */
.language-option[href*="lang=bn"],
.lang-text {
    font-family: 'Noto Sans Bengali', 'SolaimanLipi', 'Kalpurush', Arial, sans-serif;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .language-btn {
        border-color: #000;
        color: #000;
    }
    
    .language-dropdown {
        border-color: #000;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    
    .language-option {
        border-color: #ccc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .language-dropdown,
    .language-btn,
    .language-option {
        transition: none;
    }
    
    .language-change-animation {
        animation: none;
    }
}
