/* =========================================
   MODAIS DE FUNIL (Captura de Lead + Saída)
   ========================================= */

.funnel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.funnel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.funnel-modal {
    width: 100%;
    max-width: 440px;
    background: #0a0a0a;
    border: 1px solid #1f1f1f;
    border-radius: 12px;
    padding: 40px 36px;
    position: relative;
    text-align: center;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.funnel-overlay.active .funnel-modal {
    transform: translateY(0) scale(1);
}

.funnel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #222;
    background: transparent;
    color: #666;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.funnel-close:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.funnel-logo {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 24px;
}

.funnel-logo span {
    color: var(--gold);
}

.funnel-modal h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: #fff;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 10px;
}

.funnel-modal h3 span {
    color: var(--gold);
    font-style: italic;
}

.funnel-modal p.funnel-sub {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 28px;
    font-family: var(--font-body);
    font-weight: 300;
}

/* Campos do formulário */
.funnel-field {
    margin-bottom: 14px;
    text-align: left;
}

.funnel-field input {
    width: 100%;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 15px 16px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.funnel-field input::placeholder {
    color: #666;
}

.funnel-field input:focus {
    border-color: var(--gold);
    background: #1a1a1a;
}

.funnel-field input.field-error {
    border-color: #c0453f;
}

.funnel-phone-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 0 16px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.funnel-phone-row:focus-within {
    border-color: var(--gold);
    background: #1a1a1a;
}

.funnel-ddi {
    color: #999;
    font-size: 0.95rem;
    font-family: var(--font-body);
    flex-shrink: 0;
    padding: 15px 0;
    border-right: 1px solid #2a2a2a;
    padding-right: 12px;
}

.funnel-phone-row input {
    border: none;
    background: transparent;
    padding: 15px 0;
}

.funnel-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 22px;
    text-align: left;
}

.funnel-consent input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--gold);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.funnel-consent label {
    color: #888;
    font-size: 0.8rem;
    line-height: 1.5;
    font-family: var(--font-body);
}

.funnel-submit {
    width: 100%;
    background: var(--gold);
    color: #000;
    border: none;
    border-radius: 50px;
    padding: 16px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.funnel-submit:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

.funnel-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.funnel-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #666;
    font-size: 0.78rem;
    margin-top: 16px;
    font-family: var(--font-body);
}

.funnel-secure i { color: var(--gold); }

.funnel-error-msg {
    color: #e0817b;
    font-size: 0.8rem;
    text-align: left;
    margin-top: -8px;
    margin-bottom: 12px;
    display: none;
}

.funnel-error-msg.show { display: block; }

/* ----- Variante: Popup de saída (urgência) ----- */
.funnel-modal.exit-variant {
    max-width: 400px;
    padding: 44px 34px 36px;
}

.exit-variant .funnel-eyebrow {
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 14px;
    font-family: var(--font-body);
    font-weight: 600;
}

.exit-variant .funnel-secondary-link {
    display: inline-block;
    margin-top: 18px;
    color: #666;
    font-size: 0.85rem;
    font-family: var(--font-body);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.exit-variant .funnel-secondary-link:hover {
    color: #999;
}

@media (max-width: 500px) {
    .funnel-modal {
        padding: 34px 24px;
    }
    .funnel-modal h3 { font-size: 1.35rem; }
}
