/**
 * Language Switcher Styles
 * VPATH AI - Internationalization UI
 */

/* Language Switcher Container */
.language-switcher-item {
    margin-left: auto;
    margin-right: 1rem;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Language Buttons */
.lang-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 1rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.lang-btn.active {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.15);
    font-weight: 600;
}

/* Divider */
.language-switcher .divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    user-select: none;
}

/* Header scrolled state */
.header.scrolled .language-switcher {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 212, 255, 0.3);
}

.header.scrolled .lang-btn {
    color: rgba(0, 0, 0, 0.7);
}

.header.scrolled .lang-btn:hover {
    color: #0099cc;
    background: rgba(0, 212, 255, 0.1);
}

.header.scrolled .lang-btn.active {
    color: #0099cc;
    background: rgba(0, 212, 255, 0.15);
}

.header.scrolled .language-switcher .divider {
    color: rgba(0, 0, 0, 0.3);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .language-switcher-item {
        margin: 0;
        width: 100%;
        padding: 0.5rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .language-switcher {
        justify-content: center;
        width: fit-content;
        margin: 0 auto;
        padding: 0.375rem 0.75rem;
    }
    
    .lang-btn {
        font-size: 0.938rem;
        padding: 0.375rem 0.75rem;
    }
    
    /* Mobile menu active state */
    .nav__menu.active .language-switcher {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(0, 212, 255, 0.3);
    }
    
    .nav__menu.active .lang-btn {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .nav__menu.active .lang-btn.active {
        color: #00d4ff;
        background: rgba(0, 212, 255, 0.2);
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .language-switcher-item {
        margin-left: 1rem;
        margin-right: 0.5rem;
    }
    
    .language-switcher {
        padding: 0.25rem 0.375rem;
    }
    
    .lang-btn {
        font-size: 0.813rem;
        padding: 0.25rem 0.375rem;
    }
}

/* Animation for language switch */
@keyframes languageSwitch {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.lang-btn.switching {
    animation: languageSwitch 0.3s ease;
}

/* Accessibility */
.lang-btn:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

.lang-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Dark mode compatibility (if implemented in future) */
@media (prefers-color-scheme: dark) {
    .language-switcher {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Loading state */
.language-switcher.loading .lang-btn {
    opacity: 0.5;
    cursor: not-allowed;
}

.language-switcher.loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}