#lpt-language-popup,
#lpt-language-popup *,
#lpt-language-toggle,
#lpt-language-toggle * {
    box-sizing: border-box;
}

#lpt-language-popup.lpt-popup {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100dvh;
    background: rgba(8, 15, 28, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 18px;
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
}

#lpt-language-popup.lpt-show {
    display: flex;
    animation: lptFadeIn 0.22s ease forwards;
}

#lpt-language-popup .lpt-card {
    position: relative;
    width: min(420px, 100%);
    background: linear-gradient(145deg, #ffffff, #f7fbff);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 34px 26px 24px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    transform-origin: center;
    animation: lptPopIn 0.28s cubic-bezier(.2, .85, .3, 1.2) forwards;
}

#lpt-language-popup .lpt-close {
    position: absolute;
    top: 12px;
    left: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #eef3f8;
    color: #334155;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

#lpt-language-popup .lpt-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #edf6ff;
    font-size: 30px;
}

#lpt-language-popup h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.5;
}

#lpt-language-popup p {
    margin: 0 0 22px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.8;
}

#lpt-language-popup .lpt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#lpt-language-popup .lpt-btn {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

#lpt-language-popup .lpt-btn:hover,
#lpt-language-popup .lpt-never:hover,
#lpt-language-popup .lpt-close:hover,
#lpt-language-toggle:hover {
    transform: translateY(-2px);
}

#lpt-language-popup .lpt-fa {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.26);
}

#lpt-language-popup .lpt-en {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.26);
}

#lpt-language-popup .lpt-never {
    margin-top: 14px;
    width: 100%;
    min-height: 44px;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

#lpt-language-toggle.lpt-toggle {
    position: fixed;
    right: 88px;
    bottom: 25px;
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #6763eb, #0689d4);
    color: #000;
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.36);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999998;
    font-size: 25px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#lpt-language-toggle.lpt-toggle-show {
    display: flex;
}

@media (max-width: 480px) {
    #lpt-language-popup.lpt-popup {
        padding: 14px;
        align-items: center;
    }

    #lpt-language-popup .lpt-card {
        border-radius: 22px;
        padding: 30px 18px 20px;
    }

    #lpt-language-popup h3 {
        font-size: 20px;
    }

    #lpt-language-popup p {
        font-size: 14px;
    }

    #lpt-language-popup .lpt-actions {
        grid-template-columns: 1fr;
    }

    #lpt-language-popup .lpt-btn {
        min-height: 48px;
        font-size: 15px;
    }

    #lpt-language-toggle.lpt-toggle {
        right: 14px;
        bottom: 16px;
        width: 52px;
        height: 52px;
        font-size: 23px;
    }
}

@keyframes lptFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lptPopIn {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
