/* Simple Flag Language Switcher */

.lang-flags {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.lang-flags::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(223, 120, 17, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.lang-flags:hover::before {
    opacity: 1;
}

.lang-flag-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 32px;
    opacity: 0.7;
}

.lang-flag-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.lang-flag-btn:hover::before {
    left: 100%;
}

.lang-flag-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.lang-flag-btn.active {
    opacity: 1;
    background: rgba(223, 120, 17, 0.2);
    border: 1px solid rgba(223, 120, 17, 0.3);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(223, 120, 17, 0.3);
}

.lang-flag-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.lang-flag-btn:disabled {
    cursor: default;
}

.lang-flag-btn:disabled:hover {
    transform: scale(1.05);
    background: rgba(223, 120, 17, 0.2);
}

.flag-svg {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
    transition: all var(--transition-fast);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-flag-btn:hover .flag-svg {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-flag-btn.active .flag-svg {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(223, 120, 17, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lang-flags {
        display: none; /* Hide on mobile, use mobile switcher instead */
    }
}

/* Animation effects */
@keyframes flagPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.lang-flag-btn.switching {
    animation: flagPulse 0.3s ease-out;
}

/* Loading state */
.lang-flag-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}

.lang-flag-btn.loading .flag-svg {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Focus states for accessibility */
.lang-flag-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lang-flags {
        border-width: 2px;
    }
    
    .lang-flag-btn {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .lang-flag-btn.active {
        border-width: 2px;
    }
}