/* Language Switch Loading Overlay */
.language-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.85);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    animation: fadeInOverlay 0.3s ease-out;
}

.language-loading-overlay.show {
    display: flex;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.language-loading-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: slideUpIn 0.4s ease-out;
}

@keyframes slideUpIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.language-loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    position: relative;
}

.language-loading-spinner::before {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color, #1e3c72);
    border-radius: 50%;
    animation: spinLanguage 1s linear infinite;
}

@keyframes spinLanguage {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.language-loading-text {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    margin-bottom: 10px;
}

.language-loading-subtext {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.language-flag-transition {
    font-size: 32px;
    margin: 15px 0;
    animation: flagBounce 2s ease-in-out infinite;
}

@keyframes flagBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Language Switch Modal */
.language-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 8888;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.language-confirm-modal.show {
    display: flex;
}

.language-confirm-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 90%;
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.language-confirm-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.language-confirm-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.language-confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.language-confirm-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.language-confirm-btn.confirm {
    background: var(--primary-color, #1e3c72);
    color: white;
}

.language-confirm-btn.confirm:hover {
    background: #2a4d8d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

.language-confirm-btn.cancel {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
}

.language-confirm-btn.cancel:hover {
    background: #e9e9e9;
    border-color: #ccc;
    transform: translateY(-1px);
}

/* Language dropdown enhancements */
.language-switch-btn.active {
    background: var(--primary-color, #1e3c72);
    color: white;
    font-weight: 600;
}

.language-switch-btn.active::before {
    content: '✓';
    margin-right: 8px;
    font-weight: bold;
}

.language-switch-btn {
    transition: all 0.2s ease;
}

.language-switch-btn:hover:not(.active) {
    background: #f0f8ff;
    color: var(--primary-color, #1e3c72);
}

/* Responsive */
@media (max-width: 768px) {
    .language-loading-content,
    .language-confirm-content {
        padding: 25px;
        margin: 20px;
    }
    
    .language-loading-text {
        font-size: 16px;
    }
    
    .language-confirm-title {
        font-size: 20px;
    }
    
    .language-confirm-buttons {
        flex-direction: column;
    }
    
    .language-confirm-btn {
        width: 100%;
    }
}