/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    user-select: none;
}

.language-switcher-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 14px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-switcher-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-icon {
    margin-right: 6px;
    font-size: 16px;
}

.current-language {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.dropdown-arrow {
    margin-left: 6px;
    font-size: 10px;
    transition: transform 0.2s ease;
    display: none !important; /* hide caret/arrow icon */
}

/* Dropdown menu */
.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-top: 8px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform: translateY(-5px);
    z-index: 100;
    min-width: 120px;
}

.language-switcher.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-switcher.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-option {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

.language-option:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.language-option.active {
    background-color: rgba(61, 126, 255, 0.1);
    color: var(--color-blue);
}

/* RTL Support for Hebrew */
html[dir="rtl"] .language-icon {
    margin-right: 0;
    margin-left: 6px;
}

html[dir="rtl"] .dropdown-arrow {
    margin-left: 0;
    margin-right: 6px;
}

/* Glow effect for current language */
.language-switcher-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 95, 11, 0.4) 0%, rgba(61, 126, 255, 0.4) 100%);
    filter: blur(8px);
}

.language-switcher-toggle:hover::before {
    opacity: 0.6;
}

/* Language option check icon */
.check-icon {
    margin-left: auto;
    margin-inline-start: auto; /* keep at logical end in both LTR/RTL */
    color: #22c55e; /* green */
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: none !important; /* hide indicator entirely */
}

.language-option.active .check-icon {
    opacity: 1;
}

html[dir="rtl"] .check-icon { margin-left: auto; margin-right: 0; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
    }
    
    .language-switcher-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .language-dropdown {
        width: 100%;
    }
} 