/* =========================================================
   Widget flutuante do WhatsApp — captura de lead antes do redirecionamento.
   Verde do WhatsApp mantido no botao (reconhecimento imediato do usuario),
   painel do formulario segue a paleta escura do restante do site.
   ========================================================= */

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.wa-widget {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--ff-body);
}

.wa-floating {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 999998;
}

.wa-widget[data-open="true"] .wa-floating__text { display: none; }

.wa-floating__text {
    padding: 9px 18px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-soft);
}
.wa-floating__text b { color: var(--ember-gold); }

.wa-trigger {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 999px;
    background: #25d366;
    box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 0 0 rgba(37,211,102,.5);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform .25s ease, box-shadow .25s ease;
    animation: wa-pulse 2.6s ease-in-out infinite;
}
.wa-trigger:hover { transform: scale(1.06); }
.wa-trigger svg { width: 30px; height: 30px; display: block; }

@keyframes wa-pulse {
    0%, 100% { box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 0 0 rgba(37,211,102,.45); }
    50% { box-shadow: 0 10px 28px rgba(0,0,0,.4), 0 0 0 10px rgba(37,211,102,0); }
}

.wa-panel {
    width: min(380px, calc(100vw - 24px));
    margin: 0 0 78px auto;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.wa-panel__header {
    position: relative;
    padding: 18px 50px 16px 20px;
    background: linear-gradient(120deg, #1c3f30, #0f2118);
    border-bottom: 1px solid var(--border);
}
.wa-panel__header p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.4;
    color: var(--text);
    font-weight: 600;
}
.wa-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--text-dim);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 6px;
}
.wa-close:hover { color: var(--text); }

.wa-form { padding: 20px 18px 22px; display: flex; flex-direction: column; gap: 10px; }

.wa-form input,
.wa-form select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 0 14px;
    background: var(--bg-alt);
    color: var(--text);
    font-family: var(--ff-body);
    font-size: .92rem;
    box-sizing: border-box;
    appearance: none;
}
.wa-form select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7l5 6 5-6' stroke='%23c3b6a7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.wa-form input:focus, .wa-form select:focus {
    outline: none;
    border-color: #25d366;
    box-shadow: 0 0 0 4px rgba(37,211,102,.15);
}

.wa-phone { display: grid; grid-template-columns: 64px 1fr; gap: 0; }
.wa-phone__prefix {
    display: flex; align-items: center; justify-content: center;
    height: 44px;
    border: 1px solid var(--border-strong);
    border-right: 0;
    border-radius: 10px 0 0 10px;
    background: var(--bg-alt);
    color: var(--text-dim);
    font-size: .88rem;
    font-weight: 700;
}
.wa-phone input { border-radius: 0 10px 10px 0; }

.wa-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: .8rem;
    color: var(--text-dim);
    cursor: pointer;
    line-height: 1.4;
}
.wa-consent input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    flex: none;
    margin: 2px 0 0;
    padding: 0;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    background: var(--bg-alt);
    cursor: pointer;
    position: relative;
    transition: background .15s ease, border-color .15s ease;
}
.wa-consent input[type="checkbox"]:checked {
    background: #25d366;
    border-color: #25d366;
}
.wa-consent input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #06210f;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.wa-consent input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--ember-gold);
    outline-offset: 2px;
}

.wa-privacy { margin: 0; color: var(--text-mute); font-size: .74rem; line-height: 1.5; }
.wa-feedback { min-height: 16px; margin: 0; color: #ff8686; font-size: .78rem; font-weight: 600; }

.wa-submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: #25d366;
    color: #06210f;
    font-size: .95rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: .01em;
    transition: background .2s ease, transform .2s ease;
}
.wa-submit:hover { background: #2fe578; }
.wa-submit[disabled] { opacity: .65; cursor: wait; }

.hp-field-wa { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

@media (max-width: 600px) {
    .wa-widget, .wa-floating { right: 14px; bottom: 14px; }
    .wa-floating__text { max-width: calc(100vw - 96px); white-space: normal; font-size: .76rem; }
    .wa-panel { width: calc(100vw - 24px); margin-bottom: 74px; }
}
