/* Language Switcher Styling */

.language-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-lg);
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
    cursor: pointer;
    overflow: hidden;
}

.language-switcher:hover {
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.language-switcher:active {
    transform: translateY(1px);
}

.language-switcher.is-focused {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.language-switcher label {
    display: none;
}

.language-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    position: relative;
    width: 44px;
    height: 44px;
}

.language-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.language-icon svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    stroke: currentColor;
    animation: none;
    transform-origin: center center;
}

.globe-ring {
    opacity: 0.9;
}

.globe-meridian,
.globe-parallel {
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.8;
}

.globe-continent {
    opacity: 0.9;
    stroke-width: 2.4;
}

.globe-ring,
.globe-meridian,
.globe-parallel {
    animation: none;
    transform-origin: center;
}

.language-switcher:hover .language-icon svg,
.language-switcher:focus-visible .language-icon svg {
    animation: moonRotateScale 2s linear infinite !important;
    will-change: transform;
}

.language-switcher:active .language-icon svg {
    animation: moonRotateScale 1.4s linear infinite !important;
}

.language-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    opacity: 0.75;
}

.language-switcher--enhanced {
    position: relative;
}

.language-switcher--enhanced .language-native-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.language-native-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

@keyframes globePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes globeSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .language-switcher {
        min-width: 44px;
        width: 44px;
        flex-shrink: 0;
        padding: 0;
    }

    .language-label {
        font-size: var(--font-size-sm);
    }
}
