/**
 * Lead capture — "Free Aphasia Flashcards" box + exit-intent modal.
 *
 * Aphasia-friendly: large text, one field, one button, ≥48px targets.
 * Everything is scoped under .as-lead-capture / .as-lead-modal; buttons
 * declare their own box metrics so the Elementor kit can't inflate them,
 * and text-transform/white-space are reset against kit inheritance.
 */

.as-lead-capture {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    padding: 28px 24px;
    margin: 32px 0;
    font-family: inherit;
    color: #1e293b;
    text-align: center;
}

.as-lead-capture .as-lead-title {
    margin: 0 0 8px;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.3;
    color: #185fa5;
}

.as-lead-capture .as-lead-sub {
    margin: 0 0 18px;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #334155;
}

.as-lead-capture .as-lead-label {
    display: block;
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
}

.as-lead-capture .as-lead-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.as-lead-capture .as-lead-input {
    flex: 1 1 240px;
    max-width: 340px;
    min-height: 52px;
    padding: 12px 16px;
    font-size: 1.15rem;
    color: #1e293b;
    background: #ffffff;
    border: 2px solid #94a3b8;
    border-radius: 12px;
}

.as-lead-capture .as-lead-input:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
    border-color: #2563eb;
}

.as-lead-capture .as-lead-button {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 52px;
    padding: 12px 22px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
    text-transform: none;
    color: #ffffff;
    background: #2563eb;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.as-lead-capture .as-lead-button:hover {
    background: #1d4ed8;
}

.as-lead-capture .as-lead-button:focus-visible {
    outline: 3px solid #1e293b;
    outline-offset: 2px;
}

.as-lead-capture .as-lead-button:disabled {
    background: #93c5fd;
    cursor: default;
}

.as-lead-capture .as-lead-note {
    margin: 14px 0 0;
    font-size: 0.95rem;
    color: #64748b;
}

.as-lead-capture .as-lead-status {
    margin: 10px 0 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #b91c1c;
    min-height: 1.4em;
}

.as-lead-capture .as-lead-status.as-ok {
    color: #15803d;
}

.as-lead-capture .as-lead-success {
    margin: 8px 0;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.5;
    color: #15803d;
}

/* Honeypot: parked far off-canvas (not display:none — cruder bots skip
   those), never focusable, invisible to real visitors. */
.as-lead-capture .as-lead-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------- Exit-intent modal ---------------- */

.as-lead-modal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.as-lead-modal[hidden] {
    display: none;
}

.as-lead-modal .as-lead-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.as-lead-modal .as-lead-modal-card {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 24px 8px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
    opacity: 1;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.as-lead-modal.as-entering .as-lead-modal-card {
    opacity: 0;
    transform: translateY(14px);
}

.as-lead-modal .as-lead-modal-card > .as-lead-title {
    margin: 0 8px 4px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
    color: #185fa5;
    text-align: center;
}

.as-lead-modal .as-lead-capture {
    margin: 12px 0 16px;
    border: 0;
    background: transparent;
    padding: 0 4px 12px;
}

.as-lead-modal .as-lead-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
    min-width: 0;
    padding: 0;
    font-size: 1.3rem;
    line-height: 1;
    color: #475569;
    background: #f1f5f9;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.as-lead-modal .as-lead-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.as-lead-modal .as-lead-modal-close:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

@media (max-width: 560px) {
    .as-lead-capture .as-lead-row {
        flex-direction: column;
        align-items: stretch;
    }

    .as-lead-capture .as-lead-input {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .as-lead-modal .as-lead-modal-card {
        transition: none;
    }
}
