/* ==========================================================
   Popup "Agendar uma visita" + formulário de lead
   Cores da marca: #1a1111 (marrom), #f2ebdc (creme),
   #ffbd1f (amarelo), #f46154 (coral), #93e0cc (verde-água)
   ========================================================== */

html {
    scroll-behavior: smooth;
}

body.lead-aberto {
    overflow: hidden;
}

.lead-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
    font-family: "Poppins", sans-serif;
}

.lead-modal.is-aberto {
    opacity: 1;
    visibility: visible;
}

.lead-modal__fundo {
    position: absolute;
    inset: 0;
    background: rgba(26, 17, 17, .78);
}

.lead-modal__caixa {
    position: relative;
    width: 100%;
    max-width: 508px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
    background: #fff;
    color: #1a1111;
    border-radius: 3px;
    padding: 42px 36px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    transform: translateY(12px);
    transition: transform .2s ease;
}

.lead-modal.is-aberto .lead-modal__caixa {
    transform: none;
}

.lead-modal__fechar {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    color: #1a1111;
    cursor: pointer;
    border-radius: 50%;
}

.lead-modal__fechar:hover,
.lead-modal__fechar:focus-visible {
    background: rgba(26, 17, 17, .08);
    outline: none;
}

.lead-modal__logo {
    display: block;
    width: 72px;
    height: auto;
    margin: 0 auto 8px;
}

.lead-modal__titulo {
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 1.4;
    text-align: center;
    margin: 0 0 20px;
}

.lead-modal__sub {
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
    margin: 0 0 34px;
    color: #4a3d3d;
}

.lead-campo {
    display: block;
    margin-bottom: 14px;
}

.lead-campo > span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.lead-campo em {
    font-style: normal;
    font-weight: 400;
    color: #7a6b6b;
}

#lead-form {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.lead-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.lead-campo input {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 16px; /* 16px evita o zoom automático do iPhone */
    color: #5e6c7b;
    background: #fff;
    border: 1px solid #a3bac6;
    border-radius: 2px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s ease;
}

.lead-campo input::placeholder {
    color: #5e6c7b;
    opacity: .7;
}

.lead-campo input:focus {
    outline: none;
    border-color: #ffbd1f;
}

.lead-modalidades {
    min-width: 0;
    margin: 20px 0 24px;
    padding: 0;
    border: 0;
    color: #5e6c7b;
    font-size: 16px;
}

.lead-modalidades legend {
    padding: 0;
    margin-bottom: 10px;
    font-weight: 400;
}

.lead-opcao {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    cursor: pointer;
}

.lead-opcao input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #28a20f;
}

.lead-opcao input:focus-visible {
    outline: 2px solid #1565c0;
    outline-offset: 3px;
}

.lead-modalidades.tem-erro legend {
    color: #d93a2b;
}

.lead-campo.tem-erro input {
    border-color: #d93a2b;
}

.lead-erro {
    display: block;
    min-height: 0;
    font-size: 12px;
    color: #d93a2b;
    margin-top: 4px;
}

.lead-erro:empty {
    display: none;
}

.lead-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.lead-botao {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    margin-top: 6px;
    padding: 0 16px;
    border: 0;
    border-radius: 3px;
    background: #28a20f;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, opacity .2s ease;
    box-sizing: border-box;
}

.lead-botao:hover,
.lead-botao:focus-visible {
    background: #1565c0;
    color: #fff;
    outline: none;
    text-decoration: none;
}

.lead-botao[disabled] {
    opacity: .7;
    cursor: wait;
}

.lead-botao--whats {
    background: #25d366;
    color: #fff;
}

.lead-botao--whats:hover,
.lead-botao--whats:focus-visible {
    background: #1ebe5a;
    color: #fff;
}

.lead-aviso {
    font-size: 13px;
    line-height: 1.4;
    color: #d93a2b;
    text-align: center;
    margin: 10px 0 0;
}

.lead-aviso:empty {
    display: none;
}

.lead-aviso a {
    color: inherit;
    font-weight: 600;
}

.lead-lgpd {
    font-size: 11px;
    line-height: 1.4;
    color: #7a6b6b;
    text-align: center;
    margin: 12px 0 0;
}

.lead-ok-icone {
    width: 64px;
    height: 64px;
    margin: 4px auto 16px;
    border-radius: 50%;
    background: #93e0cc;
    color: #1a1111;
    font-size: 32px;
    line-height: 64px;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 540px) {
    .lead-modal__caixa {
        max-width: 340px;
        padding: 40px 20px 24px;
    }

    .lead-modal__titulo {
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .lead-modal,
    .lead-modal__caixa {
        transition: none;
    }
}
