﻿/* Language Popup Styles */
.language-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-popup.open {
    display: flex;
    opacity: 1;
}

.language-popup-content {  
    background: #fff;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.language-popup .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .language-popup .btn-close:hover {
        background: #f1f5f9;
        color: #0f172a;
    }

.language-popup .title {
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 0 1.5rem;
    color: #0f172a;
    text-align: center;
}

.language-grid {
    margin-top: 1.5rem;
}

.language-switcher {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

    .language-switcher li {
        margin: 0;
    }

    .language-switcher .lang-link,
    .language-switcher .lang-disabled {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        border-radius: 10px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        text-decoration: none;
        color: #334155;
        font-weight: 600;
        font-size: 0.95rem;
        transition: all 0.3s ease;
        position: relative;
    }

        .language-switcher .lang-link:hover {
            background: #ffffff;
            border-color: #4f46e5;
            color: #4f46e5;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
        }

    .language-switcher li.active .lang-link {
        background: linear-gradient(135deg, #4f46e5, #06b6d4);
        border-color: transparent;
        color: #ffffff;
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    }

    .language-switcher li.disabled .lang-disabled {
        opacity: 0.4;
        cursor: not-allowed;
        background: #f1f5f9;
    }

.lang-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-name {
    flex: 1;
}

.lang-check {
    color: #ffffff;
    font-size: 0.875rem;
}

.lang-unavailable {
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
}

body.popup-open {
    overflow: hidden !important;
}

@media (max-width: 576px) {
    .language-popup-content {
        width: 95%;
        padding: 1.5rem;
    }

    .language-switcher {
        grid-template-columns: 1fr;
    }

    .language-popup .title {
        font-size: 1.25rem;
    }
}
