/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.language-current {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    min-width: 80px;
}

.language-current:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
}

.language-flag {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    border-radius: 2px;
    display: inline-block;
    background-size: cover;
    background-position: center;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-switcher.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #f8f9fa;
    color: #007bff;
    text-decoration: none;
}

.language-option.active {
    background-color: #007bff;
    color: white;
}

.language-name {
    font-size: 14px;
    font-weight: 500;
}

/* Flag icons using CSS sprites or background images */
.flag-en { background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 30"><rect width="60" height="30" fill="%23B22234"/><g fill="%23FFF"><rect y="0" width="60" height="2.3"/><rect y="4.6" width="60" height="2.3"/><rect y="9.2" width="60" height="2.3"/><rect y="13.8" width="60" height="2.3"/><rect y="18.4" width="60" height="2.3"/><rect y="23" width="60" height="2.3"/><rect y="27.6" width="60" height="2.3"/></g><rect width="24" height="16" fill="%233C3B6E"/><g fill="%23FFF"><circle cx="4" cy="2.5" r="0.5"/><circle cx="8" cy="2.5" r="0.5"/><circle cx="12" cy="2.5" r="0.5"/><circle cx="16" cy="2.5" r="0.5"/><circle cx="20" cy="2.5" r="0.5"/><circle cx="6" cy="4.5" r="0.5"/><circle cx="10" cy="4.5" r="0.5"/><circle cx="14" cy="4.5" r="0.5"/><circle cx="18" cy="4.5" r="0.5"/></g></svg>'); }

.flag-zh-cn { background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="40" fill="%23DE2910"/><g fill="%23FFDE00"><polygon points="12,6 14.5,12.5 21,10 16.5,15.5 20,8"/><polygon points="24,4 25,6.5 27.5,6 26,8 28,5.5"/><polygon points="24,12 25,14.5 27.5,14 26,16 28,13.5"/><polygon points="24,20 25,22.5 27.5,22 26,24 28,21.5"/><polygon points="16,24 17,26.5 19.5,26 18,28 20,25.5"/></g></svg>'); }

.flag-zh-tw { background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="40" fill="%23DE2910"/><g fill="%23FFDE00"><polygon points="12,6 14.5,12.5 21,10 16.5,15.5 20,8"/><polygon points="24,4 25,6.5 27.5,6 26,8 28,5.5"/><polygon points="24,12 25,14.5 27.5,14 26,16 28,13.5"/><polygon points="24,20 25,22.5 27.5,22 26,24 28,21.5"/><polygon points="16,24 17,26.5 19.5,26 18,28 20,25.5"/></g></svg>'); }

.flag-de { background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="13.33" fill="%23000"/><rect width="60" height="13.33" y="13.33" fill="%23DD0000"/><rect width="60" height="13.33" y="26.67" fill="%23FFCE00"/></svg>'); }

.flag-ru { background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 40"><rect width="60" height="13.33" fill="%23FFF"/><rect width="60" height="13.33" y="13.33" fill="%23D52B1E"/><rect width="60" height="13.33" y="26.67" fill="%230039A6"/></svg>'); }

/* Mobile responsive */
@media (max-width: 768px) {
    .language-switcher {
        margin-left: 10px;
    }
    
    .language-current {
        padding: 6px 10px;
        min-width: 70px;
    }
    
    .language-flag {
        width: 18px;
        height: 13px;
        margin-right: 6px;
    }
    
    .language-dropdown {
        min-width: 140px;
    }
    
    .language-option {
        padding: 8px 12px;
    }
    
    .language-name {
        font-size: 13px;
    }
}

/* Loading state */
.i18n-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Fade transition for content changes */
.i18n-fade-out {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.i18n-fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}