@charset "UTF-8";
/* ===========================================================================
   ACREDIZ · Simulador (formulário multi-step)
   =========================================================================== */

/* A altura da topbar é token porque três coisas dependem dela: a própria
   topbar, o `top` do aside sticky e — a que quebrava — o `scroll-margin-top`
   do painel. */
.sim-body { min-height: 100vh; display: flex; flex-direction: column; --sim-topbar-h: 66px; }

/* ---- Topbar ---- */
.sim-topbar { background: rgba(4, 10, 53, 0.72); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(255,255,255,0.08); position: sticky; top: 0; z-index: 20; }
.sim-topbar__inner { display: flex; align-items: center; justify-content: space-between; height: var(--sim-topbar-h); }
.sim-topbar__secure { font-size: var(--acz-fs-sm); color: var(--acz-blue-300); font-weight: 600; }

/* ---- Layout ---- */
.sim-main { flex: 1; display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start;
  padding-block: clamp(28px, 5vw, 56px); }

/* ---- Aside / progresso ---- */
.sim-aside { position: sticky; top: calc(var(--sim-topbar-h) + 30px); }
.sim-topbar .brand__logo { height: 30px; width: auto; }
.sim-aside__title { font-size: var(--acz-fs-2xl); color: #fff; }
.sim-aside__lead { color: var(--acz-on-dark-soft); margin: 10px 0 28px; font-size: var(--acz-fs-sm); }
.sim-progress { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 2px; }
.sim-progress li { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: var(--acz-fs-sm);
  color: var(--acz-on-dark-faint); font-weight: 500; position: relative; }
.sim-progress li span { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--acz-line-2);
  background: #fff; display: inline-flex; align-items: center; justify-content: center; transition: .2s; }
.sim-progress li:not(:last-child) span::before { content: ""; position: absolute; left: 10px; top: 30px; width: 2px; height: 18px; background: var(--acz-line-2); }
.sim-progress li.is-active { color: #fff; font-weight: 700; }
.sim-progress li.is-active span { border-color: var(--acz-accent); box-shadow: var(--acz-ring); }
.sim-progress li.is-done { color: var(--acz-on-dark-soft); }
.sim-progress li.is-done span { background: var(--acz-accent); border-color: var(--acz-accent); }
.sim-progress li.is-done span::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; }
.sim-progress li.is-done:not(:last-child) span::before { background: var(--acz-accent); }
/* O último marco é a saída da jornada (formalização na NoVerde): destacado
   mesmo antes de ser alcançado, para o usuário saber onde a jornada termina. */
.sim-progress li.sim-progress__final { font-weight: 700; align-items: flex-start; }
.sim-progress li.sim-progress__final span { margin-top: 2px; }
.sim-aside__badge { background: var(--acz-blue-50); border-radius: var(--acz-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.sim-aside__badge strong { color: var(--acz-primary-strong); font-size: var(--acz-fs-sm); }
.sim-aside__badge span { font-size: var(--acz-fs-xs); color: var(--acz-ink-soft); }

/* ---- Panel ---- */
/* ⚠️ `scroll-margin-top` NÃO é enfeite.
   Cada `wiz.show()` chama `panel.scrollIntoView({block:'start'})`, que encosta o
   topo do painel no topo do viewport — e a topbar é `position: sticky` com 66px,
   então ela cobria o título do passo. No primeiro passo o título sumia por
   inteiro: o usuário abria o simulador e via a descrição sem a pergunta. Vale em
   qualquer largura, mas só ficou óbvio olhando em 390px. */
.sim-panel { padding: clamp(24px, 4vw, 44px); position: relative; overflow: hidden;
  scroll-margin-top: calc(var(--sim-topbar-h) + 16px); }
.sim-mobilebar { display: none; height: 6px; background: var(--acz-surface-3); border-radius: 99px; margin-bottom: 26px; }
.sim-mobilebar__fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--acz-blue-400), var(--acz-blue-600)); width: 14%; transition: width .3s ease; }

.sim-step__title { font-size: var(--acz-fs-2xl); color: var(--acz-navy-900); }
.sim-step__desc { color: var(--acz-ink-soft); margin: 8px 0 26px; }
.sim-step--center { text-align: center; padding-block: 40px; }
.sim-step--center .sim-step__desc { margin-bottom: 28px; }

.sim-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.sim-field-digit { max-width: 160px; }
.sim-optional { font-weight: 400; color: var(--acz-muted); }

.sim-actions { display: flex; gap: 12px; margin-top: 8px; }
.sim-actions .acz-btn { color: #fff; }
.sim-actions .acz-btn--ghost { color: var(--acz-primary-strong); }
.sim-actions .acz-btn--primary { margin-left: auto; }
.sim-actions .acz-btn--block { margin-left: 0; }

/* ---- Alert ---- */
.sim-alert { background: var(--acz-danger-bg); color: var(--acz-danger); border: 1px solid #f6c9c6;
  padding: 13px 16px; border-radius: var(--acz-radius); font-size: var(--acz-fs-sm); font-weight: 500; margin-bottom: 22px;
  scroll-margin-top: calc(var(--sim-topbar-h) + 16px); }

/* ---- Spinner ---- */
.sim-spinner { width: 56px; height: 56px; margin: 0 auto 24px; border-radius: 50%;
  border: 5px solid var(--acz-blue-100); border-top-color: var(--acz-accent); animation: sim-spin .8s linear infinite; }
@keyframes sim-spin { to { transform: rotate(360deg); } }

/* ---- Ofertas ---- */
.sim-offers { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.sim-offer { display: flex; align-items: center; gap: 16px; border: 1.5px solid var(--acz-line-2);
  border-radius: var(--acz-radius); padding: 18px 20px; cursor: pointer; transition: .15s; background: #fff; }
.sim-offer:hover { border-color: var(--acz-blue-300); }
.sim-offer input { position: absolute; opacity: 0; pointer-events: none; }
.sim-offer__radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--acz-line-2); position: relative; transition: .15s; }
.sim-offer__body { flex: 1; }
/* `block`, não o `inline` padrão de `<span>`: sem isso, título e descrição —
   fontes diferentes — corriam na mesma linha e só quebravam no meio da
   descrição quando faltava espaço. */
.sim-offer__title { display: block; font-weight: 700; color: var(--acz-navy-900); font-size: var(--acz-fs-lg); }
.sim-offer__desc { display: block; font-size: var(--acz-fs-sm); color: var(--acz-ink-soft); margin-top: 2px; }
.sim-offer__tag { font-size: var(--acz-fs-xs); font-weight: 700; color: var(--acz-accent-strong); background: var(--acz-blue-50); padding: 3px 9px; border-radius: 99px; }
.sim-offer.is-selected { border-color: var(--acz-accent); box-shadow: var(--acz-ring); background: var(--acz-blue-50); }
.sim-offer.is-selected .sim-offer__radio { border-color: var(--acz-primary); }
.sim-offer.is-selected .sim-offer__radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--acz-primary); }

/* ---- Esteira Open Finance: autorização no banco e termo LGPD ---- */
/* Não há embed: na esteira 4.0 o link é o do BANCO escolhido, que recusa
   `<iframe>` e não caberia num `frame-src` — a autorização abre em nova aba
   e esta tela espera o webhook do consentimento. */
.sim-autorizar { display: flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; margin-bottom: 18px; }

/* O QR do link de autorização — só aparece no computador (ver `ehComputador`
   em onboarding.js). `image-rendering: pixelated` mantém o módulo quadrado em
   qualquer zoom: suavização em QR é leitura perdida. */
.sim-qr-wrap { display: flex; justify-content: center; margin: 4px 0 14px; }
.sim-qr { width: 232px; max-width: 70vw; height: auto; color: var(--acz-navy-900);
  border: 1.5px solid var(--acz-line-2); border-radius: var(--acz-radius); padding: 8px;
  background: #fff; image-rendering: pixelated; }
.sim-qr-ou { font-size: var(--acz-fs-xs); color: var(--acz-ink-soft); text-align: center; margin: 0 0 8px; }

.sim-aguardando { display: flex; align-items: center; gap: 10px; font-size: var(--acz-fs-sm);
  color: var(--acz-ink-soft); margin: 0 0 16px; min-height: 22px; }
/* O pontinho pulsando é o único sinal de que a tela continua trabalhando
   enquanto o cliente está na outra aba. */
.sim-aguardando::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--acz-accent); animation: sim-pulse 1.4s ease-in-out infinite; }
.sim-aguardando:empty { display: none; }
@keyframes sim-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.sim-termo { border: 1.5px solid var(--acz-line-2); border-radius: var(--acz-radius);
  padding: 14px 16px; margin-bottom: 20px; background: var(--acz-blue-50); }
.sim-termo__resumo { font-size: var(--acz-fs-sm); font-weight: 700; color: var(--acz-navy-900); cursor: pointer; }
.sim-termo__meta { font-size: var(--acz-fs-xs); color: var(--acz-ink-soft); margin: 8px 0 0; }
/* Texto puro vindo do parceiro (`textoDoHtml`), sem formatação nenhuma — a
   rolagem existe porque são ~4 KB e a tela não pode virar uma página de termo. */
.sim-termo__corpo { max-height: 220px; overflow-y: auto; margin-top: 10px; padding-right: 8px;
  font-size: var(--acz-fs-xs); line-height: 1.6; color: var(--acz-ink); white-space: pre-wrap; }

/* ---- Resultado ---- */
.sim-result-icon { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 2rem; font-weight: 800; }
.sim-result-icon--ok { background: var(--acz-blue-100); color: var(--acz-accent-strong); }
.sim-result-icon--no { background: #fdeceb; color: var(--acz-danger); }
.sim-step--center .acz-btn { color: #fff; }
.sim-step--center .acz-btn--ghost { color: var(--acz-primary-strong); }

/* ---- Footer ---- */
.sim-footer { padding: 24px 0 32px; }
.sim-footer p { font-size: var(--acz-fs-xs); color: var(--acz-on-dark-faint); text-align: center; }

/* ---- Responsivo ---- */
@media (max-width: 860px) {
  .sim-main { grid-template-columns: 1fr; gap: 0; }
  .sim-aside { display: none; }
  .sim-mobilebar { display: block; }
}
@media (max-width: 480px) {
  .sim-grid-2 { grid-template-columns: 1fr; }
  .sim-actions { flex-wrap: wrap; }
  .sim-actions .acz-btn { flex: 1; }
}

/* ---- Pedido do estabelecimento (entrada por QR Code) ---- */
.sim-pedido { display: flex; flex-direction: column; gap: 2px; margin-bottom: 26px;
  padding: 16px 18px; border-radius: var(--acz-radius); background: var(--acz-blue-50);
  border: 1px solid var(--acz-blue-100); }
.sim-pedido__label { font-size: var(--acz-fs-xs); color: var(--acz-ink-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sim-pedido__lojista { font-size: var(--acz-fs-lg); color: var(--acz-navy-900); }
.sim-pedido__valor { font-size: var(--acz-fs-2xl); color: var(--acz-primary-strong); font-weight: 800; line-height: 1.2; }
