/* ==========================================
   JELODA — Lead Capture Popup (assets/css/lead-popup.css)
   Estilos para el popup de captura de email (exit-intent + scroll trigger)
   ========================================== */

.lead-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lead-popup-overlay[hidden] { display: none; }
.lead-popup-overlay.lead-popup--visible { opacity: 1; }

.lead-popup-card {
    position: relative;
    background: #fff;
    color: #111;
    border-radius: 24px;
    padding: 40px 36px 32px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lead-popup-overlay.lead-popup--visible .lead-popup-card {
    transform: scale(1) translateY(0);
}

.lead-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
}
.lead-popup-close:hover { background: rgba(0, 0, 0, 0.06); }

.lead-popup-badge {
    display: inline-block;
    background: linear-gradient(135deg, #651fff, #7c4dff);
    color: #fff;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(101, 31, 255, 0.25);
}

.lead-popup-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 10px;
    color: #1a1a1a;
    line-height: 1.2;
}

.lead-popup-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin: 0 0 20px;
}

.lead-popup-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lead-popup-input {
    height: 48px;
    padding: 0 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fafafa;
    color: #111;
}
.lead-popup-input:focus {
    outline: none;
    border-color: #25D366;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}
.lead-popup-input--error {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.15) !important;
    animation: leadPopupShake 0.4s;
}
@keyframes leadPopupShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.lead-popup-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.lead-popup-btn {
    height: 52px;
    border: none;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    border-radius: 14px;
    font-size: 1.02rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    font-family: inherit;
}
.lead-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.lead-popup-small {
    font-size: 0.75rem;
    color: #888;
    margin: 14px 0 0;
}

/* Estado de éxito */
.lead-popup-success {
    padding: 10px 0;
}
.lead-popup-success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    margin: 0 auto 18px;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}
.lead-popup-close-text {
    margin-top: 12px;
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
}

/* Mobile */
@media (max-width: 599px) {
    .lead-popup-card {
        padding: 32px 24px 24px;
        border-radius: 20px;
    }
    .lead-popup-title { font-size: 1.25rem; }
    .lead-popup-desc { font-size: 0.88rem; }
    .lead-popup-input { height: 44px; }
    .lead-popup-btn { height: 48px; font-size: 0.95rem; }
}

/* iOS: disable backdrop-filter (degrada performance) */
@supports (-webkit-touch-callout: none) {
    .lead-popup-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 0, 0, 0.85);
    }
}
