/* amo-guiado.css — folha do atendimento guiado (assets/js/amo-guiado.js).
   Carregado so nas paginas em teste. Usa os tokens do amo.css; o que e
   proprio da folha vira token local em .amo-gt, nunca valor solto nas regras.
   A folha e sempre clara (papel), inclusive sobre o tema escuro do corporativo:
   e um momento de conversa, e o acento do braco e o que diz de quem ela e. */

html.amo-gt-aberto { overflow: hidden; }

.amo-gt {
  --gt-acento: var(--amo-gold-deep);            /* 5,4:1 sobre o papel */
  --gt-tinta: rgba(201, 168, 76, 0.14);
  --gt-texto: var(--amo-ink);
  --gt-suave: var(--amo-neutral-700);
  --gt-borda: var(--amo-neutral-300);
  --gt-borda-campo: var(--amo-neutral-500);
  --gt-placeholder: #6B6F65;                     /* 5,1:1 sobre branco */
  --gt-erro: #9F2A1B;                            /* 7,4:1 sobre branco */
  --gt-bolha: #E3F6CF;
  --gt-bolha-borda: #C4E6A1;
  --gt-veu: rgba(15, 19, 15, 0.55);
  --gt-sombra: 0 24px 64px rgba(15, 19, 15, 0.28);
  --gt-titulo: clamp(1.5rem, 1.35rem + 0.6vw, 1.7rem);
  --gt-titulo-menor: clamp(1.35rem, 1.25rem + 0.4vw, 1.5rem);
  --gt-op: 1rem;
  --gt-op-grade: 0.92rem;
  --gt-nota: 0.8rem;
  --gt-alvo: 44px;                               /* area minima de toque */
  --gt-campo: 50px;
  --gt-botao: 54px;
  --gt-entrada: 340ms;
  --gt-saida: 150ms;
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-text); color: var(--gt-texto);
  -webkit-text-size-adjust: 100%;
}
.amo-gt[data-arm="corporativo"] {
  --gt-acento: var(--amo-blue-deep);             /* 5,9:1 sobre o papel */
  --gt-tinta: rgba(91, 155, 213, 0.14);
}
.amo-gt[hidden] { display: none; }

.amo-gt-veu {
  position: absolute; inset: 0; background: var(--gt-veu);
  animation: amoGtVeu var(--motion-base) ease both;
}

.amo-gt-folha {
  position: relative; display: flex; flex-direction: column;
  width: min(480px, calc(100vw - 48px)); max-height: min(88vh, 760px);
  background: var(--amo-paper); border-radius: var(--radius-lg);
  box-shadow: var(--gt-sombra); overflow: hidden;
  animation: amoGtSurge var(--gt-entrada) var(--ease-standard) both;
}
.amo-gt-rolagem {
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 0 var(--space-6) var(--space-6);
}

@media (max-width: 640px) {
  .amo-gt { align-items: flex-end; }
  .amo-gt-folha {
    width: 100%; max-height: 92vh; max-height: 92dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation-name: amoGtSobe;
  }
  .amo-gt-rolagem { padding: 0 var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px)); }
}

/* ------------------------------------------------------------ cabeca */
.amo-gt-cab {
  position: sticky; top: 0; z-index: 1;
  display: grid; grid-template-columns: var(--gt-alvo) 1fr var(--gt-alvo); align-items: center;
  gap: var(--space-2); padding: var(--space-3) 0 var(--space-4);
  background: var(--amo-paper);
}
.amo-gt-icone {
  width: var(--gt-alvo); height: var(--gt-alvo); border: 0; border-radius: 50%;
  background: transparent; color: var(--gt-texto); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  transition: background-color var(--motion-fast) ease;
}
button.amo-gt-icone:hover { background: var(--amo-neutral-100); }
.amo-gt-voltar .icon { transform: rotate(180deg); }
.amo-gt-progresso { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.amo-gt-passo {
  font-size: var(--gt-nota); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gt-acento);
}
.amo-gt-segs { display: flex; gap: 5px; width: 100%; max-width: 180px; }
.amo-gt-segs span {
  flex: 1; height: 4px; border-radius: 2px; background: var(--gt-borda);
  transition: background-color var(--gt-entrada) ease;
}
.amo-gt-segs span.cheio { background: var(--gt-acento); }

/* ------------------------------------------------------------ tela */
.amo-gt-tela {
  display: flex; flex-direction: column; gap: var(--space-4);
  animation: amoGtEntra 260ms var(--ease-standard) both;
}
/* .amo-gt na frente: o tema escuro do corporativo pinta h2 de claro com
   body[data-theme="corp"] h2 (especificidade 0,1,2); aqui e 0,2,0. */
.amo-gt .amo-gt-titulo {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: var(--gt-titulo); line-height: 1.15; letter-spacing: -0.01em; color: var(--gt-texto);
}
.amo-gt .amo-gt-titulo:focus { outline: none; }
.amo-gt .amo-gt-titulo--menor { font-size: var(--gt-titulo-menor); line-height: 1.2; }
.amo-gt-dica { margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--gt-suave); }

.amo-gt-ops { display: flex; flex-direction: column; gap: 10px; }
.amo-gt-ops--grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }

.amo-gt-op {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px;
  padding: var(--space-3) var(--space-4); margin: 0;
  background: #FFFFFF; border: 1.5px solid var(--gt-borda); border-radius: 12px;
  font: inherit; font-size: var(--gt-op); font-weight: 600; line-height: 1.3;
  color: var(--gt-texto); text-align: left; cursor: pointer;
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.amo-gt-ops--grade .amo-gt-op {
  min-height: 56px; padding: 10px 12px; border-radius: var(--radius-md);
  font-size: var(--gt-op-grade); line-height: 1.25;
}
.amo-gt-op--largo { grid-column: span 2; }
.amo-gt-op:hover { border-color: var(--gt-acento); }
.amo-gt-op:active { transform: scale(0.985); }
.amo-gt-op[aria-pressed="true"] { border-color: var(--gt-acento); background: var(--gt-tinta); }
.amo-gt-aro {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--gt-borda-campo); box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
}
.amo-gt-op[aria-pressed="true"] .amo-gt-aro { border-color: var(--gt-acento); }
.amo-gt-op[aria-pressed="true"] .amo-gt-aro::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gt-acento);
  animation: amoGtPop 220ms var(--ease-standard) both;
}
.amo-gt-op-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.amo-gt-op-sub { font-size: var(--gt-nota); font-weight: 500; line-height: 1.35; color: var(--gt-suave); }

/* ------------------------------------------------------------ rodape */
.amo-gt-pe {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--gt-borda);
}
.amo-gt-pe--contato { margin-top: 0; padding-top: 0; border-top: 0; gap: var(--space-2); }
.amo-gt-link {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--gt-alvo); padding: 0 10px; margin: 0; border: 0; background: none;
  font: inherit; font-size: var(--text-sm); font-weight: 600; color: var(--gt-acento);
  text-decoration: none; cursor: pointer;
}
.amo-gt-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.amo-gt-link .icon { width: 20px; height: 20px; }
.amo-gt-link--centro { align-self: center; }
.amo-gt-nota { font-size: var(--gt-nota); color: var(--gt-suave); text-align: center; }

/* ------------------------------------------------------------ contato */
.amo-gt-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.amo-gt-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 6px var(--space-3); margin: 0; border: 1px solid var(--gt-borda); border-radius: 999px;
  background: #FFFFFF; font: inherit; font-size: var(--gt-nota); color: var(--gt-texto); cursor: pointer;
  transition: background-color var(--motion-fast) ease;
}
.amo-gt-chip:hover { background: var(--amo-neutral-100); }
.amo-gt-chip-rot { color: var(--gt-suave); }
.amo-gt-chip-val { font-weight: 600; }
.amo-gt-chip-ico { width: 14px; height: 14px; color: var(--gt-acento); stroke-width: 2; }

.amo-gt-alerta {
  display: flex; gap: 10px; padding: var(--space-3) 14px;
  border: 1px solid var(--gt-acento); border-radius: 12px; background: var(--gt-tinta);
}
.amo-gt-alerta .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--gt-acento); }
.amo-gt-alerta > span { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); line-height: 1.45; color: var(--amo-neutral-900); }
.amo-gt-alerta strong { font-weight: 700; color: var(--gt-texto); }

.amo-gt-campo { display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); font-weight: 600; color: var(--gt-texto); }
.amo-gt-campo em { font-style: normal; font-weight: 500; color: var(--gt-suave); }
.amo-gt-campo input {
  box-sizing: border-box; width: 100%; height: var(--gt-campo); margin: 0;
  padding: 0 14px; border: 1.5px solid var(--gt-borda-campo); border-radius: var(--radius-md);
  background: #FFFFFF; font: inherit; font-size: 16px; font-weight: 400; color: var(--gt-texto);
  -webkit-appearance: none; appearance: none;
}
.amo-gt-campo input::placeholder { color: var(--gt-placeholder); opacity: 1; }
.amo-gt-campo input[aria-invalid="true"] { border-color: var(--gt-erro); }
.amo-gt-erro { margin: -6px 0 0; min-height: 18px; font-size: var(--gt-nota); font-weight: 600; color: var(--gt-erro); }
.amo-gt-erro:empty { min-height: 0; margin: 0; }

.amo-gt-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: var(--gt-botao); padding: 0 var(--space-4); margin: 0; box-sizing: border-box;
  border: 0; border-radius: var(--radius-md); background: var(--amo-green); color: var(--amo-ink);
  font: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer;
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-base) ease;
}
.amo-gt-cta:hover { color: var(--amo-ink); box-shadow: 0 8px 22px rgba(15, 19, 15, 0.16); }
.amo-gt-cta:active { transform: scale(0.985); }
.amo-gt-sec {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  width: 100%; min-height: var(--gt-campo); padding: 0 var(--space-4); margin: 0; box-sizing: border-box;
  border: 1.5px solid var(--gt-texto); border-radius: var(--radius-md); background: transparent;
  font: inherit; font-size: var(--text-sm); font-weight: 700; color: var(--gt-texto); cursor: pointer;
  transition: background-color var(--motion-fast) ease;
}
.amo-gt-sec:hover { background: var(--amo-neutral-100); }
.amo-gt-confianca {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0;
  font-size: var(--gt-nota); line-height: 1.4; color: var(--gt-suave); text-align: center;
}
.amo-gt-confianca .icon { width: 14px; height: 14px; stroke-width: 2; }

/* ------------------------------------------------------------ pronto */
.amo-gt-bolha-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.amo-gt-bolha {
  max-width: 92%; margin: 0; padding: 14px var(--space-4);
  border-radius: 16px 16px 4px 16px; background: var(--gt-bolha); border: 1px solid var(--gt-bolha-borda);
  font-size: 0.94rem; line-height: 1.5; color: var(--gt-texto); overflow-wrap: anywhere;
  animation: amoGtBolha 380ms 80ms var(--ease-standard) both;
}
.amo-gt-para { font-size: 0.75rem; color: var(--gt-suave); }
.amo-gt-duo { display: flex; gap: 10px; }
.amo-gt-duo > * { flex: 1 1 0; min-height: var(--gt-campo); font-size: var(--text-sm); }
.amo-gt-qr {
  display: flex; gap: var(--space-4); align-items: center; padding: 14px;
  border: 1px solid var(--gt-borda); border-radius: 12px; background: #FFFFFF;
}
.amo-gt-qr[hidden] { display: none; }
.amo-gt-qr p { margin: 0; font-size: var(--text-sm); line-height: 1.5; color: var(--gt-suave); }
.amo-gt-qr-img {
  flex: none; width: 176px; height: 176px; display: flex; align-items: center; justify-content: center;
}
.amo-gt-qr-img svg { display: block; width: 100%; height: 100%; }
.amo-gt-qr-img .amo-gt-erro { margin: 0; text-align: center; }
.amo-gt-carregando { font-size: var(--gt-nota); color: var(--gt-suave); }
.amo-gt-tela--fim { align-items: flex-start; padding-top: var(--space-2); }
.amo-gt-selo { color: var(--gt-acento); display: inline-flex; animation: amoGtPop 220ms var(--ease-standard) both; }

/* ------------------------------------------------------------ foco */
.amo-gt button:focus-visible, .amo-gt a:focus-visible {
  outline: 3px solid var(--gt-acento); outline-offset: 2px;
}
/* campo: um anel so (borda + contorno colados), sem o duplo do offset */
.amo-gt .amo-gt-campo input:focus { border-color: var(--gt-acento); outline: 2px solid var(--gt-acento); outline-offset: 0; }

/* ------------------------------------------------------------ movimento */
.amo-gt.saindo .amo-gt-veu { animation: amoGtVeuSai var(--gt-saida) ease both; }
.amo-gt.saindo .amo-gt-folha { animation: amoGtSai var(--gt-saida) ease both; }
@keyframes amoGtVeu { from { opacity: 0; } to { opacity: 1; } }
@keyframes amoGtVeuSai { from { opacity: 1; } to { opacity: 0; } }
@keyframes amoGtSurge { from { transform: translateY(14px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes amoGtSobe { from { transform: translateY(32px); opacity: 0.3; } to { transform: none; opacity: 1; } }
@keyframes amoGtSai { from { opacity: 1; } to { transform: translateY(16px); opacity: 0; } }
@keyframes amoGtEntra { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes amoGtBolha { from { transform: translateY(10px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes amoGtPop { from { transform: scale(0.3); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .amo-gt *, .amo-gt *::before, .amo-gt *::after, .amo-gt-veu, .amo-gt-folha {
    animation: none !important; transition: none !important;
  }
}

@media (max-width: 380px) {
  .amo-gt-duo { flex-direction: column; }
  .amo-gt-qr { flex-direction: column; text-align: center; }
}
