/* Modal do botão flutuante de WhatsApp (template-parts/template-part-whatsapp-modal.php). */

html.whatsapp-modal-travado,
html.whatsapp-modal-travado body {
    overflow: hidden;
}

.whatsapp-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: opacity .25s ease, visibility 0s linear .25s;
    font-family: "Montserrat", sans-serif;
}

.whatsapp-modal--aberto {
    visibility: visible;
    opacity: 1;
    transition: opacity .25s ease;
}

.whatsapp-modal__fundo {
    position: fixed;
    inset: 0;
    background: rgba(37, 34, 29, .75);
}

.whatsapp-modal__caixa {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin: auto;
    background: #FFFFFF;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    transform: translateY(16px);
    transition: transform .25s ease;
}

.whatsapp-modal--aberto .whatsapp-modal__caixa {
    transform: none;
}

.whatsapp-modal__fechar {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #292929;
    cursor: pointer;
    transition: color .2s;
}

.whatsapp-modal__fechar:hover,
.whatsapp-modal__fechar:focus-visible {
    color: #E04F39;
}

.whatsapp-modal__corpo {
    padding: 40px 36px 28px;
}

.whatsapp-modal__titulo {
    margin: 0 30px 12px 0;
    font-family: "Montserrat", sans-serif;
    font-weight: 300;
    font-size: 26px;
    line-height: 1.25;
    color: #292929;
}

.whatsapp-modal__titulo strong {
    font-weight: 700;
    color: #168F43;
}

.whatsapp-modal__subtitulo {
    margin: 0 0 24px;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.5;
    color: #555555;
}

/* Formulário padrão dentro do modal */
#ffid-formWhatsapp .form--group {
    margin-bottom: 14px;
}

#ffid-formWhatsapp .form--group p,
#ffid-formWhatsapp .mb-4 p {
    margin: 0;
}

#ffid-formWhatsapp label {
    font-size: 14px;
    color: #292929;
}

#ffid-formWhatsapp .input--text,
#ffid-formWhatsapp .input-default {
    width: 100%;
    height: 42px;
    padding: 0 10px;
    border: 1px solid #CFCFCF;
    border-radius: 0;
    background: #FFFFFF;
    font-family: "Montserrat", sans-serif;
    font-size: 15px;
    color: #292929;
}

#ffid-formWhatsapp .input--text:focus,
#ffid-formWhatsapp .input-default:focus {
    outline: none;
    border-color: #168F43;
    box-shadow: 0 0 0 2px rgba(22, 143, 67, .2);
}

#ffid-formWhatsapp .iti {
    display: block;
    width: 100%;
}

#ffid-formWhatsapp .iti__country-list,
#ffid-formWhatsapp .iti__country-list * {
    color: #212529;
}

/* Lista de países do telefone (no mobile abre em tela cheia, fora do modal) */
.iti--container {
    z-index: 10001;
}

/* Texto legal */
#ffid-formWhatsapp .wpcf7-list-item {
    margin: 4px 0 18px;
}

#ffid-formWhatsapp .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #555555;
    cursor: pointer;
}

#ffid-formWhatsapp .wpcf7-list-item input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: #168F43;
}

#ffid-formWhatsapp .wpcf7-list-item-label a {
    font-weight: 700;
    color: #E04F39;
    text-decoration: underline;
}

/* Botão principal */
.ffid-submit--whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 0 20px;
    border: 0;
    background: #168F43;
    color: #FFFFFF;
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .5px;
    cursor: pointer;
    transition: background-color .3s;
}

.ffid-submit--whatsapp:hover,
.ffid-submit--whatsapp:focus-visible {
    background: #117536;
}

.ffid-submit--whatsapp:disabled {
    opacity: .8;
    cursor: wait;
}

.ffid-submit--whatsapp .ffid-submit__icone {
    flex: 0 0 auto;
}

/* Spinner substitui o ícone durante o envio */
.ffid-submit--whatsapp:disabled .ffid-submit__icone {
    display: none;
}

/* Assinatura */
.whatsapp-modal__assinatura {
    display: flex;
    justify-content: center;
    padding: 18px 20px;
    background: #25221D;
}

.whatsapp-modal__assinatura img {
    max-height: 38px;
    width: auto;
}

@media (max-width: 575px) {
    .whatsapp-modal {
        padding: 12px;
    }

    .whatsapp-modal__corpo {
        padding: 36px 22px 22px;
    }

    .whatsapp-modal__titulo {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-modal,
    .whatsapp-modal__caixa {
        transition: none;
    }
}
