/* Pop-up de diagnóstico (captação de leads) — fundo branco, CTA amarelo Legacy, fonte Poppins.
   4 etapas: contato -> objetivo -> problemas -> agradecimento. Tratamento de dados conforme a LGPD. */
.lm-overlay {
  --lm-yellow: #FEB704; --lm-yellow-dark: #E8A600; --lm-yellow-soft: #FFF6DA;
  --lm-ink: #0B0B0B; --lm-text: #2B2B2B; --lm-muted: #6B7280; --lm-line: #E5E7EB; --lm-danger: #DC2626; --lm-ok: #16A34A;
  display: none; position: fixed; inset: 0; z-index: 9999;
  align-items: center; justify-content: center; padding: 16px;
  background: rgba(15, 15, 15, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lm-overlay, .lm-overlay * { box-sizing: border-box; font-family: 'Poppins', system-ui, sans-serif; }
.lm-overlay.open { display: flex; animation: lmFade .25s ease; }
@keyframes lmFade { from { opacity: 0; } to { opacity: 1; } }

.lm-modal {
  position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto; background: #fff; color: var(--lm-text); border-radius: 22px;
  padding: 28px 28px 22px; box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
  animation: lmUp .32s cubic-bezier(.2, .8, .2, 1);
}
@keyframes lmUp { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

.lm-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #F3F4F6; color: var(--lm-ink); font-size: 16px; line-height: 1; cursor: pointer; transition: background .15s;
}
.lm-close:hover { background: #E5E7EB; }

/* selo LGPD sempre visível no topo */
.lm-lgpd {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 5px 11px 5px 8px;
  border-radius: 999px; background: #ECFDF3; border: 1px solid #BBF7D0; color: #166534; font-size: 12px; font-weight: 600;
}
.lm-lgpd svg { width: 15px; height: 15px; flex: none; }

/* progresso: uma barra só, com o degradê da hero, que vai revelando conforme avança */
.lm-progress { --p: 25%; position: relative; height: 6px; margin: 0 40px 22px 0; border-radius: 99px; overflow: hidden;
  background: linear-gradient(117.5deg, #FFB703 5%, #ED8B00 45%, #FFD51D 100%); }
.lm-progress::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; left: var(--p); background: #EEF0F3; transition: left .45s cubic-bezier(.4, 0, .2, 1); }

.lm-step[hidden] { display: none; }
.lm-step { animation: lmStep .3s ease; }
@keyframes lmStep { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.lm-title { margin: 0 0 6px; font-size: 22px; line-height: 1.25; font-weight: 700; color: var(--lm-ink); letter-spacing: -.3px; }
.lm-title:focus { outline: none; }
.lm-sub { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--lm-muted); }

.lm-field { margin-bottom: 14px; }
.lm-field label, .lm-legend { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--lm-ink); }
.lm-field input[type=text], .lm-field input[type=tel], .lm-field textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--lm-line); border-radius: 12px; background: #fff;
  font-size: 15px; color: var(--lm-ink); transition: border-color .15s, box-shadow .15s;
}
.lm-field textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.lm-field input::placeholder, .lm-field textarea::placeholder { color: #9CA3AF; }
.lm-field input:focus, .lm-field textarea:focus { outline: none; border-color: var(--lm-yellow); box-shadow: 0 0 0 4px rgba(254, 183, 4, .22); }
.lm-field.err input, .lm-field.err textarea { border-color: var(--lm-danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .1); }
.lm-hint { margin: 5px 0 0; font-size: 12px; color: var(--lm-muted); }
.lm-error { display: none; margin: 6px 0 0; font-size: 12.5px; font-weight: 500; color: var(--lm-danger); }
.lm-field.err .lm-error { display: block; }
.lm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* opções de objetivo */
.lm-options { display: grid; gap: 9px; margin-bottom: 14px; border: 0; padding: 0; min-width: 0; }
.lm-option { position: relative; }
.lm-option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.lm-option span {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--lm-line); border-radius: 12px;
  font-size: 14px; font-weight: 500; color: var(--lm-ink); line-height: 1.35; transition: border-color .15s, background .15s;
}
.lm-option span::before {
  content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #C7CBD1; background: #fff; transition: all .15s;
}
.lm-option:hover span { border-color: #F4CF6B; }
.lm-option input:focus-visible + span { box-shadow: 0 0 0 4px rgba(254, 183, 4, .28); border-color: var(--lm-yellow); }
.lm-option input:checked + span { border-color: var(--lm-yellow); background: var(--lm-yellow-soft); }
.lm-option input:checked + span::before { border-color: var(--lm-yellow-dark); background: radial-gradient(var(--lm-yellow-dark) 0 45%, #fff 50%); }
.lm-other { display: none; margin: -2px 0 14px; }
.lm-other.show { display: block; }

/* exemplos de problemas */
.lm-chips-label { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--lm-muted); }
.lm-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.lm-chip {
  padding: 7px 12px; border: 1.5px solid var(--lm-line); border-radius: 999px; background: #fff; color: var(--lm-text);
  font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .15s;
}
.lm-chip:hover { border-color: var(--lm-yellow); background: var(--lm-yellow-soft); }
.lm-chip[aria-pressed=true] { border-color: var(--lm-yellow); background: var(--lm-yellow-soft); color: #7A5200; font-weight: 600; }

/* botões */
.lm-actions { display: flex; gap: 10px; align-items: stretch; }
.lm-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px;
  border: 0; border-radius: 14px; background: var(--lm-yellow); color: var(--lm-ink); font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 16px rgba(254, 183, 4, .35); transition: transform .12s, background .15s, box-shadow .15s;
}
.lm-btn:hover { background: var(--lm-yellow-dark); transform: translateY(-1px); }
.lm-btn:active { transform: none; }
.lm-btn:focus-visible { outline: 3px solid var(--lm-ink); outline-offset: 2px; }
.lm-btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.lm-btn .lm-spin { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(0, 0, 0, .25); border-top-color: var(--lm-ink); border-radius: 50%; animation: lmSpin .7s linear infinite; }
.lm-btn.loading .lm-spin { display: inline-block; }
@keyframes lmSpin { to { transform: rotate(360deg); } }
.lm-back { flex: none; min-height: 52px; padding: 0 18px; border: 1.5px solid var(--lm-line); border-radius: 14px; background: #fff; color: var(--lm-text); font-size: 14px; font-weight: 600; cursor: pointer; }
.lm-back:hover { background: #F9FAFB; }
.lm-netmsg { display: none; margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #FEF2F2; color: var(--lm-danger); font-size: 13px; font-weight: 500; }
.lm-netmsg.show { display: block; }

/* aviso LGPD sob o botão (só na etapa 1) */
.lm-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; font-size: 12.5px; font-weight: 500; color: #166534; text-align: center; }
.lm-note svg { width: 15px; height: 15px; flex: none; }
.lm-lgpd[hidden] { display: none; }
.lm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* agradecimento */
.lm-thanks { text-align: center; padding: 6px 0 2px; }
.lm-check-ico { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%; background: var(--lm-yellow-soft); display: grid; place-items: center; }
.lm-check-ico svg { width: 34px; height: 34px; }
.lm-check-ico path { stroke-dasharray: 32; stroke-dashoffset: 32; animation: lmDraw .5s .15s ease forwards; }
@keyframes lmDraw { to { stroke-dashoffset: 0; } }
.lm-thanks .lm-title { font-size: 24px; }
.lm-thanks p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; color: var(--lm-text); }
.lm-next { margin: 18px 0 20px; padding: 14px 16px; border-radius: 14px; background: #F9FAFB; text-align: left; font-size: 13.5px; line-height: 1.55; color: var(--lm-text); }
.lm-next strong { color: var(--lm-ink); }

@media (max-width: 480px) {
  .lm-overlay { padding: 10px; align-items: flex-end; }
  .lm-modal { padding: 24px 20px 18px; border-radius: 20px; max-height: calc(100dvh - 20px); }
  .lm-title { font-size: 20px; }
  .lm-back { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lm-overlay.open, .lm-modal, .lm-step, .lm-check-ico path { animation: none !important; }
  .lm-check-ico path { stroke-dashoffset: 0; }
  .lm-progress::after { transition: none; }
}
