/* ============================================================
   JANELA DO WHATSAPP (lead antes de abrir a conversa)
   Fica fora do .pagina (sem o zoom de escala): medidas reais.
   ============================================================ */
.leadwa {
  /* Canto inferior direito, logo acima do botão flutuante do WhatsApp
     (pedido do cliente: como um chat, não no meio da tela). */
  position: fixed;
  inset: auto 24px 100px auto;
  width: min(400px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 124px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  overflow: auto;
  font-family: var(--fonte-corpo);
  letter-spacing: normal;
}

.leadwa::backdrop {
  background: rgba(5, 14, 26, 0.28);
}

.leadwa[open] {
  transform-origin: 100% 100%;
  animation: leadwa-entra 260ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes leadwa-entra {
  from { opacity: 0; transform: translateY(16px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

.leadwa__caixa {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.55);
}

.leadwa__topo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: linear-gradient(120deg, #00082C 0%, #152E44 60%, #1B4567 100%);
  color: #fff;
}

.leadwa__avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
}

.leadwa__avatar img {
  width: 34px;
  height: 34px;
}

.leadwa__quem {
  flex: 1;
  min-width: 0;
}

.leadwa__nome {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
}

.leadwa__status {
  margin: 2px 0 0;
  font-size: 13px;
  opacity: .85;
}

.leadwa__status::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #3FD46B;
  vertical-align: 1px;
}

.leadwa__fechar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.leadwa__fechar:hover,
.leadwa__fechar:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.leadwa__corpo {
  padding: 18px 18px 16px;
  background: #EFEAE2 url("/imagens/popup-whatsapp-fundo.webp") repeat center / 371px auto;
}

.leadwa__balao {
  position: relative;
  max-width: 92%;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 0 12px 12px 12px;
  background: #fff;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.13);
  font-size: 15px;
  line-height: 1.5;
  color: #1F2C38;
}

.leadwa__form {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.leadwa__campo {
  width: 88%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid transparent;
  border-radius: 10px 0 10px 10px;
  background: #E2F7CB;
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.13);
  font: inherit;
  font-size: 15px;
  color: #1F2C38;
}

.leadwa__campo::placeholder {
  color: #5B6B7E;
}

.leadwa__campo:focus {
  outline: none;
  border-color: #16B841;
  background: #fff;
}

.leadwa__campo[aria-invalid="true"] {
  border-color: #D93B3B;
}

.leadwa__erro {
  width: 88%;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #B42318;
  text-align: right;
}

.leadwa__enviar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 88%;
  height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 999px;
  background: #16B841;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color 160ms linear, transform 160ms ease;
}

.leadwa__enviar:hover {
  background: #129C37;
}

.leadwa__enviar:active {
  transform: scale(.98);
}

.leadwa__enviar[disabled] {
  opacity: .7;
  cursor: progress;
}

.leadwa__legal {
  width: 88%;
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: #4A5868;
  text-align: right;
}

.leadwa__legal a {
  color: inherit;
  text-decoration: underline;
}

.leadwa__armadilha {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* O selo flutuante do reCAPTCHA cobriria o botão de WhatsApp; o aviso
   exigido pelo Google está escrito na janela e no formulário de contato. */
.grecaptcha-badge {
  visibility: hidden;
}

@media (max-width: 480px) {
  .leadwa {
    inset: auto 12px 84px 12px;
    width: auto;
    max-height: calc(100dvh - 100px);
  }

  .leadwa__campo,
  .leadwa__erro,
  .leadwa__enviar,
  .leadwa__legal {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leadwa[open] {
    animation: none;
  }
}

/* Aviso do reCAPTCHA no formulário de contato */
.contato-form__legal {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--cor-texto-corpo);
}

.contato-form__legal a {
  color: inherit;
  text-decoration: underline;
}
