/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.language-switcher-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.language-switcher-btn .flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    vertical-align: middle;
}

.language-switcher-btn .flag-fallback {
    font-size: 16px;
    display: inline-block;
}

.language-switcher-btn .arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}

.language-switcher-btn:hover .arrow {
    transform: translateY(2px);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    color: #111827;
}

.language-dropdown.show {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #E5E7EB;
    color: #111827 !important;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: #F3F4F6;
    color: #111827 !important;
}

.lang-option.active {
    background: #2563EB;
    color: white !important;
}

.lang-option.active:hover {
    background: #1D4ED8;
    color: white !important;
}

.lang-option .flag-icon {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid #E5E7EB;
    display: inline-block;
    vertical-align: middle;
}

.lang-option .flag-fallback {
    font-size: 18px;
    display: inline-block;
}

.lang-option .name {
    font-size: 14px;
    font-weight: 500;
    color: inherit !important;
}

/* Ensure text is always visible - override any conflicting styles */
.language-dropdown .lang-option {
    color: #111827 !important;
}

.language-dropdown .lang-option .name {
    color: #111827 !important;
}

.language-dropdown .lang-option.active {
    color: white !important;
}

.language-dropdown .lang-option.active .name {
    color: white !important;
}

/* RTL Support */
[dir="rtl"] .language-switcher {
    direction: rtl;
}

[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}
