/* ═══════════════════════════════════════════════════════
   SIMS - botão flutuante WhatsApp + modal de captação
   ═══════════════════════════════════════════════════════ */

.wa-fab {
  touch-action: manipulation;
  position: fixed; z-index: 60; right: 22px; bottom: 22px;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: #25D366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6), 0 4px 12px rgba(0, 0, 0, .2);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.wa-fab svg { width: 32px; height: 32px; position: relative; z-index: 2; }
.wa-fab:hover { transform: scale(1.08); box-shadow: 0 16px 36px -8px rgba(37, 211, 102, .7); }
.wa-fab__pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: #25D366; opacity: .5;
  animation: waPulse 2.4s ease-out infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: .5; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}

/* ── Modal ── */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; overscroll-behavior: contain; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(31, 7, 24, .68);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s ease;
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__panel {
  position: relative; z-index: 2;
  width: min(920px, 100%); max-height: min(92vh, 780px);
  display: grid; grid-template-columns: .82fr 1.18fr;
  background: var(--paper); border-radius: 26px; overflow: hidden;
  box-shadow: 0 40px 90px -20px rgba(31, 7, 24, .6);
  transform: translateY(24px) scale(.97); opacity: 0;
  transition: transform .38s cubic-bezier(.22, 1.2, .36, 1), opacity .3s ease;
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); opacity: 1; }
.modal__x {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(51, 16, 40, .08); color: var(--ink);
  font-size: 24px; line-height: 1; display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.modal__x:hover { background: rgba(51, 16, 40, .16); transform: rotate(90deg); }

/* coluna de prova social */
.modal__aside {
  background: linear-gradient(165deg, var(--plum-900), var(--plum-800) 55%, var(--pink-ink));
  color: var(--paper); padding: 34px 30px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative; overflow: hidden;
}
.modal__aside::after {
  content: ''; position: absolute; right: -70px; bottom: -70px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255, 164, 2, .2); filter: blur(52px);
}
.modal__logo { height: 40px; width: auto; background: var(--paper); padding: 7px 11px; border-radius: 11px; align-self: flex-start; }
.modal__aside-title {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  line-height: 1.22; letter-spacing: -.02em; position: relative; z-index: 1;
}
.modal__perks { list-style: none; display: flex; flex-direction: column; gap: 11px; position: relative; z-index: 1; }
.modal__perks li {
  font-size: 14px; color: rgba(251, 244, 235, .82);
  padding-left: 24px; position: relative; line-height: 1.4;
}
.modal__perks li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--orange); font-weight: 800;
}
.modal__proof {
  margin-top: auto; display: flex; gap: 18px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid rgba(251, 244, 235, .16);
  position: relative; z-index: 1;
}
.modal__proof strong {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: 20px; color: var(--orange); line-height: 1.1;
}
.modal__proof span { font-size: 11.5px; color: rgba(251, 244, 235, .65); }

/* corpo do formulário */
.modal__main { padding: 34px 34px 26px; overflow-y: auto; display: flex; }
.fw { width: 100%; display: flex; flex-direction: column; }
.fw__bar { height: 5px; border-radius: 99px; background: rgba(51, 16, 40, .1); overflow: hidden; }
.fw__bar i {
  display: block; height: 100%; width: 33%; border-radius: 99px;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  transition: width .45s cubic-bezier(.22, 1, .36, 1);
}
.fw__count { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.fw form { display: flex; flex-direction: column; flex: 1; }

.fw__step { display: none; padding-top: 22px; flex: 1; }
.fw__step.is-active { display: block; animation: fwIn .42s cubic-bezier(.22, 1.1, .36, 1); }
@keyframes fwIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
.fw__q {
  font-family: var(--font-display); font-weight: 800;
  font-size: 24px; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 6px;
}
.fw__q--sm { font-size: 17px; margin-bottom: 10px; }
.fw__hint { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 18px; }

/* chips de escolha */
.fw__choices { display: flex; flex-wrap: wrap; gap: 9px; }
.fw__choices--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.fw__choices--stack { flex-direction: column; }
.chip {
  touch-action: manipulation;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 13px 18px; border-radius: 14px; cursor: pointer; text-align: left;
  background: #fff; color: var(--ink);
  border: 1.6px solid rgba(51, 16, 40, .14);
  transition: border-color .2s ease, background .2s ease, transform .2s cubic-bezier(.34, 1.56, .64, 1), color .2s ease;
  min-height: 46px;
}
.chip:hover { border-color: var(--pink); transform: translateY(-2px); }
.chip.is-on {
  background: var(--pink-deep); border-color: var(--pink-deep); color: #fff;
  box-shadow: 0 8px 20px -8px rgba(142, 58, 98, .5);
}
.chip--wide { width: 100%; }
.fw__block { margin-top: 24px; display: none; }
.fw__block.is-show { display: block; animation: fwIn .38s ease; }

/* campos */
.fw__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld--full { grid-column: span 2; }
.fld > span { font-size: 13px; font-weight: 700; color: var(--ink); }
.fld input {
  font-family: var(--font-body); font-size: 15.5px; color: var(--ink);
  padding: 13px 15px; border-radius: 13px;
  background: #fff; border: 1.6px solid rgba(51, 16, 40, .14);
  transition: border-color .2s ease, box-shadow .2s ease;
  min-height: 48px;
}
.fld input::placeholder { color: rgba(107, 80, 96, .5); }
.fld input:focus-visible {
  outline: 2px solid var(--pink); outline-offset: 2px;
  border-color: var(--pink);
}
.fld input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(180, 81, 126, .12); }
.fld.is-bad input { border-color: #D9483B; }
.fld.is-ok input { border-color: #17A673; }
.fld__err { font-size: 12px; color: #D9483B; font-style: normal; min-height: 14px; }
.fw__privacy { margin-top: 16px; font-size: 12.5px; color: var(--ink-soft); }
/* honeypot: fora da tela, sem display:none (bots ignoram campos escondidos assim) */
.fld__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* sucesso */
.fw__done { text-align: center; padding-top: 30px; }
.fw__check {
  width: 74px; height: 74px; margin: 0 auto 20px;
  border-radius: 50%; background: #E9FBF2; color: #17A673;
  display: grid; place-items: center;
  animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1);
}
.fw__check svg { width: 38px; height: 38px; }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* navegação */
.fw__nav { display: flex; align-items: center; gap: 14px; padding-top: 18px; margin-top: auto; }
.fw__back {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px; color: var(--ink-soft);
  padding: 12px 4px; min-height: 44px;
}
.fw__back:hover { color: var(--pink-deep); }
.fw__next { margin-left: auto; }

@media (max-width: 780px) {
  .modal { padding: 0; place-items: stretch; }
  .modal__panel {
    grid-template-columns: 1fr; width: 100%; max-height: 100vh; height: 100%;
    border-radius: 0; grid-template-rows: auto 1fr;
  }
  .modal__aside { padding: 20px 22px 18px; gap: 12px; }
  .modal__logo { height: 32px; }
  .modal__aside-title { font-size: 17px; }
  .modal__perks, .modal__proof { display: none; }
  .modal__main { padding: 22px 20px 20px; }
  .fw__q { font-size: 21px; }
  .fw__fields { grid-template-columns: 1fr; }
  .fld--full { grid-column: span 1; }
  .wa-fab { right: 16px; bottom: 20px; width: 56px; height: 56px; }
  .wa-fab svg { width: 29px; height: 29px; }
  /* rodapé do form fica colado embaixo, com o CTA sempre alcançável pelo polegar */
  .fw__nav {
    position: sticky; bottom: 0; margin-top: 14px;
    padding: 12px 0 calc(6px + env(safe-area-inset-bottom));
    background: linear-gradient(rgba(251, 244, 235, 0), var(--paper) 38%);
  }
  .fw__next { font-size: 15.5px; padding: 15px 22px; }
  .fw__back { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-fab__pulse { animation: none; }
  .fw__step.is-active, .fw__check { animation: none; }
}
