/* Botao flutuante do WhatsApp + mini-formulario (public/whatsapp-flutuante.js). Escopo: #az-wa */
#az-wa { --az-wa: #25D366; --az-wa-escuro: #1DA851; }

.az-wa-btn { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 2147483000;
  display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--az-wa); color: #FFFFFF; box-shadow: 0 6px 18px rgba(0,0,0,.24), 0 2px 4px rgba(0,0,0,.14);
  transition: transform 180ms cubic-bezier(.22,.61,.36,1), opacity 180ms, bottom 220ms cubic-bezier(.22,.61,.36,1), background 140ms; }
.az-wa-btn::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(37,211,102,.55); animation: az-wa-pulso 2.6s ease-out infinite; pointer-events: none; }
.az-wa-btn:hover { background: var(--az-wa-escuro); transform: scale(1.05); }
.az-wa-btn:focus-visible { outline: 3px solid #051148; outline-offset: 3px; }
#az-wa.is-oculto .az-wa-btn { opacity: 0; transform: scale(.6); pointer-events: none; }
html.az-wa-aberto .az-wa-btn { opacity: 0; pointer-events: none; }
@keyframes az-wa-pulso { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }

/* celular: menor e acima da barra fixa de orcamento */
@media (max-width: 860px) {
  .az-wa-btn { width: 56px; height: 56px; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
  html.az-bar-on .az-wa-btn { bottom: calc(88px + env(safe-area-inset-bottom)); }
  /* no /form o formulario e a pagina: espaco para o botao nao cobrir o "Continuar" */
  .az-orc--solo { padding-bottom: 96px !important; }
}

/* modal */
.az-wa-fundo { position: fixed; inset: 0; z-index: 2147483001; display: grid; place-items: center; padding: 16px; background: rgba(5,17,72,.55); }
.az-wa-fundo[hidden] { display: none; }
.az-wa-caixa { position: relative; width: min(100%, 400px); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px 24px 24px; background: #FFFFFF; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3); font-family: "Exo 2", sans-serif; color: #101010; animation: az-wa-entra 220ms cubic-bezier(.22,.61,.36,1); }
@keyframes az-wa-entra { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.az-wa-caixa h2 { margin: 0 36px 6px 0; font: 800 20px/1.2 Unbounded, sans-serif; text-transform: uppercase; letter-spacing: -.01em; color: #051148; }
.az-wa-sub { margin: 0 0 18px; font: 400 15px/1.5 "Exo 2", sans-serif; color: #545454; }
.az-wa-fechar { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #F4F4F4; cursor: pointer; font: 400 16px/1 "Exo 2", sans-serif; color: #545454; }
.az-wa-fechar:hover { background: #E4E4E4; color: #101010; }
.az-wa-form { display: flex; flex-direction: column; gap: 6px; }
.az-wa-form label { margin-top: 8px; font: 600 11px/1.3 "Exo 2", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #051148; }
.az-wa-form input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid #A8A8A8; border-radius: 10px; background: #FFFFFF;
  font: 600 17px/1 "Exo 2", sans-serif; color: #101010; box-sizing: border-box; }
.az-wa-form input:focus { outline: none; border-color: #2438CE; box-shadow: 0 0 0 3px rgba(36,56,206,.18); }
.az-wa-form input[aria-invalid="true"] { border-color: #C62828; }
.az-wa-erro { min-height: 0; font: 600 13px/1.4 "Exo 2", sans-serif; color: #C62828; }
.az-wa-erro:empty { display: none; }
.az-wa-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.az-wa-enviar { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; border: 0; border-radius: 10px; cursor: pointer;
  background: #25D366; color: #FFFFFF; font: 700 16px/1.2 "Exo 2", sans-serif; transition: background 140ms; }
.az-wa-enviar svg { width: 24px; height: 24px; flex: none; }
.az-wa-enviar:hover { background: #1DA851; }
.az-wa-enviar:disabled { opacity: .75; cursor: progress; }
.az-wa-enviar:focus-visible, .az-wa-fechar:focus-visible { outline: 3px solid #051148; outline-offset: 2px; }
.az-wa-nota { margin: 10px 0 0; text-align: center; font: 600 13px/1.4 "Exo 2", sans-serif; color: #545454; }

/* telas pequenas: modal em tela cheia */
@media (max-width: 560px) {
  .az-wa-fundo { padding: 0; place-items: stretch; }
  .az-wa-caixa { width: 100%; max-height: none; min-height: 100dvh; border-radius: 0; padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .az-wa-btn::after, .az-wa-caixa { animation: none; }
  .az-wa-btn { transition: none; }
}
