.vfi-wrapper,
.vfi-wrapper * {
    box-sizing: border-box;
}

html.vfi-modal-open {
    overflow: hidden;
}

.vfi-wrapper {
    --vfi-bg: #111735;
    --vfi-text: #ffffff;
    --vfi-field-bg: #ffffff;
    --vfi-field-text: #253263;
    --vfi-field-border: #d7b865;
    --vfi-field-radius: 14px;
    --vfi-field-pad: 13px;
    --vfi-btn-bg: #5fbd62;
    --vfi-btn-text: #ffffff;
    --vfi-btn-radius: 10px;
    --vfi-popup-width: 680px;
    display: block;
    width: 100%;
}


.vfi-open-popup,
.vfi-submit {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--vfi-btn-bg);
    color: var(--vfi-btn-text);
    border-radius: var(--vfi-btn-radius);
    padding: 15px 30px;
    min-height: 58px;
    font-size: clamp(18px, 2vw, 25px);
    font-weight: 800;
    cursor: pointer;
    line-height: 1.18;
    letter-spacing: .01em;
    text-align: center;
    text-decoration: none;
    white-space: normal;
    box-shadow: 0 0 8px rgba(95, 189, 98, .68), 0 12px 30px rgba(95, 189, 98, .34);
    transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease, filter .2s ease;
}

.vfi-open-popup:hover,
.vfi-submit:hover {
    transform: translateY(-1px);
    opacity: .97;
    filter: brightness(1.04);
    box-shadow: 0 0 12px rgba(95, 189, 98, .78), 0 18px 38px rgba(95, 189, 98, .42);
}

.vfi-open-popup:focus-visible,
.vfi-submit:focus-visible,
.vfi-field input:focus-visible,
.vfi-field textarea:focus-visible,
.vfi-field select:focus-visible {
    outline: 3px solid rgba(215, 184, 101, .42);
    outline-offset: 2px;
}

.vfi-button-full .vfi-open-popup,
.vfi-button-full .vfi-submit {
    width: 100%;
}

.vfi-button-auto .vfi-open-popup,
.vfi-button-auto .vfi-submit {
    width: auto;
}

.vfi-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.vfi-popup[hidden],
.vfi-popup:not(.is-open) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.vfi-popup.is-open {
    display: flex;
    visibility: visible !important;
    pointer-events: auto !important;
}

.vfi-popup-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(37, 50, 99, .78), rgba(5, 8, 22, .84));
    backdrop-filter: blur(4px);
}

.vfi-popup-card,
.vfi-inline-card {
    width: min(100%, var(--vfi-popup-width));
    max-height: 92vh;
    overflow: auto;
    position: relative;
    background:
        radial-gradient(circle at 16% 0%, rgba(215, 184, 101, .18), transparent 30%),
        var(--vfi-bg);
    color: var(--vfi-text);
    border: 1px solid rgba(215, 184, 101, .38);
    border-radius: 24px;
    padding: clamp(24px, 4vw, 38px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
}

.vfi-inline-card {
    max-height: none;
    box-shadow: 0 16px 42px rgba(17, 23, 53, .14);
}

.vfi-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(215, 184, 101, .32);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: var(--vfi-text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.vfi-form-title {
    margin: 0 42px 20px 0;
    color: var(--vfi-text);
    text-align: var(--vfi-title-align, left);
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.12;
    font-weight: 800;
}

.vfi-fields-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.vfi-layout-two .vfi-fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vfi-field label {
    display: block;
    margin: 0 0 7px;
    font-weight: 700;
    color: var(--vfi-text);
}

.vfi-labels-hidden .vfi-field > label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.vfi-field input[type="text"],
.vfi-field input[type="email"],
.vfi-field input[type="tel"],
.vfi-field input[type="number"],
.vfi-field input[type="date"],
.vfi-field textarea,
.vfi-field select {
    width: 100%;
    min-height: 48px;
    background: var(--vfi-field-bg);
    color: var(--vfi-field-text);
    border: 1px solid var(--vfi-field-border);
    border-radius: var(--vfi-field-radius);
    padding: var(--vfi-field-pad);
    outline: none;
    box-shadow: none;
}

.vfi-field textarea {
    min-height: 110px;
    resize: vertical;
}

.vfi-choice-list {
    display: grid;
    gap: 9px;
    padding: 10px 0 2px;
}

.vfi-choice {
    display: flex !important;
    align-items: center;
    gap: 9px;
    font-weight: 600 !important;
    color: var(--vfi-text) !important;
}

.vfi-choice input {
    accent-color: var(--vfi-btn-bg);
}

.vfi-message {
    display: none;
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(215, 184, 101, .14);
    color: var(--vfi-text);
}

.vfi-message.is-visible {
    display: block;
}

.vfi-message.is-error {
    background: rgba(180, 34, 34, .16);
    color: #ffdddd;
}

.vfi-submit {
    margin-top: 18px;
}

.vfi-submit-loading {
    display: none;
}

.vfi-form.is-loading .vfi-submit-label {
    display: none;
}

.vfi-form.is-loading .vfi-submit-loading {
    display: inline;
}

.vfi-form.is-loading .vfi-submit {
    opacity: .72;
    cursor: wait;
}

.vfi-elementor-placeholder {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(215, 184, 101, .14);
    color: var(--vfi-text);
    font-size: 13px;
}

@media (max-width: 680px) {
    .vfi-layout-two .vfi-fields-grid {
        grid-template-columns: 1fr;
    }

    .vfi-popup {
        align-items: flex-end;
        padding: 10px;
    }

    .vfi-popup-card {
        max-height: 88vh;
        border-radius: 22px 22px 14px 14px;
    }

    .vfi-form-title {
        font-size: 24px;
    }
}


/* Correções de compatibilidade com Elementor/temas que aplicam transform, overflow ou estilos globais em botões. */
body .vfi-popup {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483000 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    margin: 0 !important;
    overflow: hidden !important;
}

body .vfi-popup:not(.is-open),
body .vfi-popup[hidden] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body .vfi-popup.is-open {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

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

body .vfi-popup .vfi-popup-backdrop {
    z-index: 1 !important;
}

body .vfi-popup .vfi-popup-card {
    position: relative !important;
    z-index: 2 !important;
    flex: 0 1 var(--vfi-popup-width) !important;
    width: min(100%, var(--vfi-popup-width)) !important;
    max-width: calc(100vw - 48px) !important;
    margin: auto !important;
    float: none !important;
}

.vfi-form {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.vfi-form .vfi-submit {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: inline-flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 0 !important;
    float: none !important;
    clear: both !important;
}

.vfi-form .vfi-submit:hover {
    transform: none !important;
}

.vfi-editor-preview {
    margin-top: 18px;
}

.vfi-editor-preview-label {
    display: inline-flex;
    margin: 0 0 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(95, 189, 98, .16);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

.vfi-editor-preview .vfi-inline-card {
    opacity: .96;
}

@media (max-width: 680px) {
    body .vfi-popup {
        align-items: center !important;
        padding: 12px !important;
    }

    body .vfi-popup .vfi-popup-card {
        max-width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 24px) !important;
    }
}

.vfi-form-header {
    display: grid;
    gap: 10px;
    margin: 0 0 22px;
}

.vfi-form-logo-wrap {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 0 12px;
}

.vfi-form-logo {
    display: inline-block;
    max-width: 180px;
    max-height: 82px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.vfi-form-header .vfi-form-title {
    margin: 0 42px 0 0;
}

.vfi-form-description {
    color: color-mix(in srgb, var(--vfi-text) 86%, transparent);
    text-align: var(--vfi-description-align, left);
    font-size: 15px;
    line-height: 1.55;
}

.vfi-consent-intro {
    margin-top: 4px;
    text-align: var(--vfi-consent-intro-align, left);
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(215, 184, 101, .12);
    border: 1px solid rgba(215, 184, 101, .22);
    color: var(--vfi-text);
    opacity: .9;
    font-size: 14px;
    line-height: 1.5;
}

.vfi-consent-box {
    margin-top: 16px;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(215, 184, 101, .22);
}

.vfi-consent-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin: 0 !important;
    color: var(--vfi-text) !important;
    font-weight: 500 !important;
    font-size: 13.5px;
    line-height: 1.45;
}

.vfi-consent-check input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 1px;
    accent-color: var(--vfi-btn-bg);
}

.vfi-consent-check a {
    color: inherit;
    text-decoration: underline;
}

@supports not (color: color-mix(in srgb, #fff 50%, transparent)) {
    .vfi-form-description,
    .vfi-consent-intro {
        color: var(--vfi-text);
    }
}

@media (max-width: 640px) {
    .vfi-form-header .vfi-form-title {
        margin-right: 36px;
    }

    .vfi-form-logo {
        max-width: 150px;
        max-height: 68px;
    }
}

.vfi-consent-terms-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid rgba(215, 184, 101, .42);
    color: var(--vfi-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    background: rgba(215, 184, 101, .10);
}

.vfi-consent-terms-link:hover,
.vfi-consent-terms-link:focus {
    color: var(--vfi-text);
    text-decoration: none;
    filter: brightness(1.08);
}

.vfi-flow {
    position: relative;
    overflow: hidden;
}

.vfi-form.is-success {
    display: none !important;
}

.vfi-thankyou[hidden] {
    display: none !important;
}

.vfi-thankyou.is-visible {
    display: block;
    animation: vfiThankYouSlideIn .36s ease both;
}

@keyframes vfiThankYouSlideIn {
    from {
        opacity: 0;
        transform: translateX(28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.vfi-thankyou-inner {
    display: grid;
    gap: 18px;
    color: var(--vfi-text);
}

.vfi-thankyou-title {
    margin: 0;
    text-align: var(--vfi-thankyou-title-align, center);
    color: var(--vfi-text);
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.12;
    font-weight: 850;
}

.vfi-thankyou-text {
    color: var(--vfi-text);
    text-align: var(--vfi-thankyou-text-align, center);
    opacity: .9;
    font-size: 16px;
    line-height: 1.58;
}

.vfi-thankyou-media {
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(215, 184, 101, .22);
}

.vfi-thankyou-media img,
.vfi-thankyou-media video,
.vfi-thankyou-media audio {
    display: block;
    width: 100%;
    max-width: 100%;
}

.vfi-thankyou-media audio {
    padding: 14px;
}

.vfi-thankyou-media.is-embed {
    aspect-ratio: 16 / 9;
}

.vfi-thankyou-media.is-embed iframe {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.vfi-thankyou-button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 0;
    background: var(--vfi-btn-bg);
    color: var(--vfi-btn-text) !important;
    border-radius: var(--vfi-btn-radius);
    padding: 15px 30px;
    min-height: 58px;
    font-size: clamp(18px, 2vw, 25px);
    font-weight: 800;
    cursor: pointer;
    line-height: 1.18;
    letter-spacing: .01em;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 0 8px rgba(95, 189, 98, .68), 0 12px 30px rgba(95, 189, 98, .34);
    transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease, filter .2s ease;
}

.vfi-thankyou-button:hover,
.vfi-thankyou-button:focus {
    color: var(--vfi-btn-text) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    opacity: .97;
    filter: brightness(1.04);
}


/* v1.0.13 — Correção de rolagem mobile do pop-up.
   No celular, a própria janela do pop-up vira a área rolável. Isso evita que
   o botão de envio fique preso abaixo da dobra em Safari/Chrome mobile, PWA e Elementor. */
:root {
    --vfi-viewport-height: 100vh;
}

@supports (height: 100dvh) {
    :root {
        --vfi-viewport-height: 100dvh;
    }
}

body .vfi-popup .vfi-popup-card {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain;
}

@media (max-width: 680px) {
    html.vfi-modal-open,
    body.vfi-modal-open {
        width: 100% !important;
        min-height: 100% !important;
        overflow: hidden !important;
        touch-action: none;
    }

    body .vfi-popup:not(.is-open),
    body .vfi-popup[hidden] {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body .vfi-popup.is-open {
        display: block !important;
        width: 100vw !important;
        height: var(--vfi-viewport-height) !important;
        min-height: var(--vfi-viewport-height) !important;
        max-height: var(--vfi-viewport-height) !important;
        padding: max(12px, env(safe-area-inset-top)) 12px max(22px, env(safe-area-inset-bottom)) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        align-items: initial !important;
        justify-content: initial !important;
        touch-action: pan-y;
    }

    body .vfi-popup .vfi-popup-backdrop {
        position: fixed !important;
        inset: 0 !important;
    }

    body .vfi-popup .vfi-popup-card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        min-height: auto !important;
        margin: 0 auto max(22px, env(safe-area-inset-bottom)) !important;
        padding: 22px 16px max(34px, calc(24px + env(safe-area-inset-bottom))) !important;
        overflow: visible !important;
        border-radius: 20px !important;
        transform: none !important;
    }

    body .vfi-popup .vfi-flow {
        overflow: visible !important;
    }

    body .vfi-popup .vfi-form-header {
        margin-bottom: 16px !important;
    }

    body .vfi-popup .vfi-fields-grid {
        gap: 12px !important;
    }

    body .vfi-popup .vfi-field input[type="text"],
    body .vfi-popup .vfi-field input[type="email"],
    body .vfi-popup .vfi-field input[type="tel"],
    body .vfi-popup .vfi-field input[type="number"],
    body .vfi-popup .vfi-field input[type="date"],
    body .vfi-popup .vfi-field textarea,
    body .vfi-popup .vfi-field select {
        min-height: 46px !important;
    }

    body .vfi-popup .vfi-consent-box {
        margin-top: 14px !important;
    }

    body .vfi-popup .vfi-form .vfi-submit {
        position: static !important;
        margin-top: 18px !important;
        margin-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    }

    body .vfi-popup .vfi-popup-close {
        position: sticky !important;
        top: 6px !important;
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
    }
}


/* v1.0.18 — Correção: pop-up não abre automaticamente no mobile.
   Mantém a janela fechada por padrão com hidden/.is-open e evita conflito com CSS mobile. */
