/* WhatsApp Lead Form · cores vêm das configurações (--wlf-header e --wlf-button) */
.wlf { --wlf-header: #075E54; --wlf-button: #25D366; position: fixed; z-index: 99999; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); font-family: inherit; }
.wlf--right { right: calc(20px + env(safe-area-inset-right, 0px)); }
.wlf--left { left: calc(20px + env(safe-area-inset-left, 0px)); }
.wlf *, .wlf *::before, .wlf *::after { box-sizing: border-box; }

.wlf-botao { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--wlf-button); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.wlf-botao svg { width: 32px; height: 32px; }
.wlf-botao::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--wlf-button); opacity: .5; animation: wlf-onda 2.2s infinite; z-index: -1; }
.wlf-botao:hover { transform: scale(1.08); }
.wlf-botao:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.wlf-aberto .wlf-botao::before { animation: none; opacity: 0; }
@keyframes wlf-onda { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.7); opacity: 0; } }

.wlf-chat { position: absolute; bottom: 76px; width: 360px; max-width: calc(100vw - 40px); max-height: calc(100vh - 120px); overflow: auto; border-radius: 18px; background: #ECE5DD;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); opacity: 0; visibility: hidden; transform: translateY(16px) scale(.97); transform-origin: bottom right;
  transition: opacity .3s, transform .35s cubic-bezier(.2,.7,.2,1), visibility 0s .35s; }
.wlf--right .wlf-chat { right: 0; }
.wlf--left .wlf-chat { left: 0; transform-origin: bottom left; }
.wlf-aberto .wlf-chat { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .35s cubic-bezier(.2,.7,.2,1); }

.wlf-topo { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--wlf-header); color: #fff; }
.wlf-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(255,255,255,.15); }
.wlf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wlf-avatar svg { width: 24px; height: 24px; }
.wlf-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.wlf-info b { font-size: 15px; }
.wlf-info span { font-size: 12px; opacity: .85; }
.wlf-fechar { margin-left: auto; background: none; border: 0; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .85; }
.wlf-fechar:hover { opacity: 1; }

.wlf-corpo { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.wlf-balao { position: relative; align-self: flex-start; max-width: 90%; background: #fff; color: #111; border-radius: 0 10px 10px 10px; padding: 10px 12px 18px; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wlf-balao p { margin: 0; display: none; }
.wlf-balao time { position: absolute; right: 10px; bottom: 4px; font-size: 11px; color: #888; display: none; }
.wlf-digitou .wlf-balao p, .wlf-digitou .wlf-balao time { display: block; }
.wlf-digitou .wlf-digitando { display: none; }
.wlf-digitando { display: flex; gap: 4px; padding: 4px 2px 0; }
.wlf-digitando i { width: 7px; height: 7px; border-radius: 50%; background: #9aa; animation: wlf-pulo 1.2s infinite; }
.wlf-digitando i:nth-child(2) { animation-delay: .15s; }
.wlf-digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes wlf-pulo { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.wlf-form { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 12px; padding: 14px; }
.wlf-rotulo { font-size: 12px; font-weight: 600; color: #333; margin-top: 4px; }
.wlf-rotulo span { font-weight: 400; color: #888; }
.wlf-form input, .wlf-form select, .wlf-form textarea { width: 100%; font: inherit; font-size: 15px; color: #111; background: #f6f6f6; border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; }
.wlf-form input:focus, .wlf-form select:focus, .wlf-form textarea:focus { outline: none; border-color: var(--wlf-button); background: #fff; }
.wlf-armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wlf-erro { margin: 4px 0 0; font-size: 13px; color: #b3261e; }
.wlf-enviar { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 30px; padding: 12px 16px; cursor: pointer;
  background: var(--wlf-button); color: #fff; font: inherit; font-size: 15px; font-weight: 600; transition: filter .2s, transform .2s; }
.wlf-enviar svg { width: 20px; height: 20px; }
.wlf-enviar:hover { filter: brightness(1.05); transform: translateY(-1px); }
.wlf-enviar:disabled { opacity: .6; cursor: wait; }
.wlf-lgpd { margin: 6px 0 0; font-size: 11px; color: #888; text-align: center; }

.wlf-shortcode { cursor: pointer; }

@media (max-width: 600px) {
  .wlf-chat { position: fixed; left: 10px; right: 10px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wlf-botao::before, .wlf-digitando i { animation: none; }
  .wlf-chat, .wlf-botao { transition: none; }
}
