/* Gab AI · candidatura em conversa + páginas de obrigado e lista (SITE-04a). Spec v1.7, seções 6 e 7.
   Carregado DEPOIS do /funil.css, que traz as fontes, os tokens --gab-*, a base, .f-btn, .f-brand, .f-msg
   e o rodapé legal. Celular primeiro; a conversa vira "WhatsApp Web" a partir de 1024px (card). */

.c-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ============================================================================================ */
/* /candidatura                                                                                  */
/* ============================================================================================ */

/* ---- Sem JS: só o formulário comum ---------------------------------------------------------- */
.c-chat, .c-side { display: none; }
.c-form {
  max-width: 560px; margin: 0 auto; padding: 16px var(--gutter) 56px;
  display: flex; flex-direction: column; gap: 22px;
}
.c-form-top { display: flex; align-items: center; min-height: 57px; border-bottom: 1px solid var(--gab-line); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.c-form-intro { font-size: 17px; line-height: 1.5; color: var(--gab-ink-2); }
.c-campo { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.c-campo > label, .c-campo > legend { font-size: 16px; font-weight: 700; line-height: 1.35; padding: 0; margin-bottom: 2px; }
.c-campo input[type="text"], .c-campo input[type="tel"], .c-campo select {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--gab-line-forte); border-radius: 12px; background: var(--gab-white);
  font-family: var(--font-text); font-size: 16px; color: var(--gab-ink);
}
.c-check, .c-campo > .c-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 16px; font-weight: 400; line-height: 1.4; }
.c-check input { width: 20px; height: 20px; flex: none; accent-color: var(--gab-ink); margin: 0; }
.c-form-aceite-txt { font-size: 16px; line-height: 1.5; color: var(--gab-ink-2); }
.c-form .f-btn { border: 0; cursor: pointer; width: 100%; }

/* Anti-robô: fora da tela para pessoas (continua no DOM para robôs que preenchem tudo). */
.c-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- Com JS: a tela inteira é a conversa (6.1) ---------------------------------------------- */
html.c-js, html.c-js body { height: 100%; overflow: hidden; }
html.c-js body { background: var(--gab-sand); }
.c-js .c-form { display: none; }
.c-js .c-shell {
  position: fixed; left: 0; right: 0; top: var(--c-top, 0px);
  height: 100vh; height: var(--c-vh, 100dvh);
}
.c-js .c-main { height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.c-js .c-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--gab-sand); }

/* Cabeçalho: desfazer, avatar, nome e status (sem contador desde a v1.9). */
.c-head {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 4px; padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background: var(--gab-white); border-bottom: 1px solid var(--gab-line);
}
.c-undo {
  flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: none; color: var(--gab-ink); cursor: pointer;
}
.c-undo:disabled { color: var(--gab-line-forte); cursor: default; }
.c-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 999px; background: var(--gab-pink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-weight: 700; font-size: 17px; color: var(--gab-ink);
}
.c-avatar--lg { width: 48px; height: 48px; font-size: 20px; }
.c-head-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.c-head-txt b { font-size: 15px; }
.c-head-txt span { font-size: 12px; color: var(--gab-ink-3); }

/* Conversa: a rolagem fica sempre no fim (column-reverse). */
.c-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column-reverse;
}
.c-log { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px; }
.c-msg { margin: 0; max-width: 82%; overflow-wrap: anywhere; }
.c-typing {
  align-self: flex-start; display: flex; gap: 4px; padding: 14px;
  border-radius: 14px 14px 14px 4px; background: var(--gab-white);
}
.c-typing i { width: 7px; height: 7px; border-radius: 999px; background: var(--gab-line-forte); }

/* Cards do final (6.3). */
.c-card {
  align-self: flex-start; width: 82%; display: flex; flex-direction: column; gap: 8px;
  padding: 14px; border-radius: 14px 14px 14px 4px;
}
.c-card-rotulo { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.c-card--escuro { background: var(--gab-ink); color: var(--gab-paper); }
.c-card--escuro .c-card-rotulo { color: var(--gab-ink-inverse-2); }
.c-card-num { display: flex; align-items: baseline; gap: 8px; }
.c-card-num b { font-family: var(--font-title); font-weight: 700; font-size: 44px; line-height: 1; }
.c-card-num span { font-size: 14px; color: var(--gab-ink-inverse-2); }
.c-card-barra { display: block; height: 8px; border-radius: 999px; background: var(--gab-pink); }
.c-card-perfil { font-size: 14px; font-weight: 600; line-height: 1.4; }
.c-card--branco { background: var(--gab-white); gap: 10px; }
.c-card--branco .c-card-rotulo { color: var(--gab-ink-3); }
.c-card-titulo { font-family: var(--font-title); font-weight: 700; font-size: 19px; line-height: 1.2; }
.c-card-itens { display: flex; flex-direction: column; gap: 10px; }
.c-card-itens li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: var(--gab-ink-2); }
.c-card-itens svg { flex: none; margin-top: 1px; }

/* Barra inferior: erro + ações (texto, escolha, múltipla, aceite). */
.c-bar {
  flex: none; display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px; padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--gab-sand); border-top: 1px solid var(--gab-line);
}
.c-bar:has(.c-acoes[data-modo="fim"]) { display: none; }
.c-erro { margin: 0; padding: 0 6px; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--gab-red); }
.c-acoes { display: flex; flex-direction: column; gap: 10px; min-height: 46px; }
.c-entrada { display: flex; align-items: center; gap: 8px; }
.c-input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px;
  border: 1px solid var(--gab-line-forte); border-radius: 999px; background: var(--gab-white);
  font-family: var(--font-text); font-size: 16px; color: var(--gab-ink);
}
.c-input[aria-invalid="true"] { border-color: var(--gab-red); }
.c-enviar {
  flex: none; width: 46px; height: 46px; border: 0; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--gab-ink); color: var(--gab-paper);
}
.c-opcoes { display: flex; flex-wrap: wrap; gap: 8px; }
.c-pilula {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--gab-ink); background: var(--gab-white); color: var(--gab-ink);
  font-family: var(--font-text); font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center;
}
.c-pilula[aria-pressed="true"] { background: var(--gab-ink); color: var(--gab-white); }
.c-botao {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border: 0; border-radius: 14px; cursor: pointer;
  font-family: var(--font-text); font-size: 16px; font-weight: 700; text-decoration: none; color: var(--gab-ink);
}
.c-botao--rosa { background: var(--gab-pink); }
.c-botao--rosa:hover { background: var(--gab-pink-hover); color: var(--gab-ink); }
/* "Pronto" sem serviço marcado e "Enviar" sem aceite: parecem inativos, mas continuam clicáveis para mostrar o erro. */
.c-botao.is-vazio { background: var(--gab-placeholder); }
.c-final-botao { align-self: stretch; margin-top: 4px; }
.c-aceite {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0;
  min-height: 48px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--gab-line-forte); background: var(--gab-white); font-size: 15px; line-height: 1.4;
}
.c-aceite-caixa { width: 22px; height: 22px; flex: none; margin: 0 12px 0 0; accent-color: var(--gab-ink); cursor: pointer; }
.c-aceite-txt { cursor: pointer; white-space: pre; }
.c-aceite a { font-weight: 600; }

/* Resposta da pessoa = botão: tocar altera a resposta (decisão de 12/11/2026, spec 6.1). */
.c-resp {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  border: 0; cursor: pointer; text-align: right; color: var(--gab-ink);
  font-family: var(--font-text); font-size: 15px; line-height: 1.4;
}
.c-resp-txt { text-align: left; }
.c-resp-alt { font-size: 11px; line-height: 1.2; color: var(--gab-ink-3); }
.c-resp:hover .c-resp-alt { text-decoration: underline; }
.c-resp.is-editando { box-shadow: 0 0 0 2px var(--gab-ink); }
.c-resp:focus-visible { outline: 3px solid var(--gab-ink); outline-offset: 3px; }
/* Aviso acima da barra enquanto altera uma resposta. */
.c-aviso {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 40px; padding: 4px 6px 4px 14px; border-radius: 12px;
  background: var(--gab-avocado); color: var(--gab-ink); font-size: 14px; font-weight: 600; line-height: 1.3;
}
.c-aviso[hidden] { display: none; }
.c-aviso-cancelar {
  flex: none; min-height: 36px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-text); font-size: 14px; font-weight: 700; color: var(--gab-ink);
  text-decoration: underline; text-underline-offset: 3px;
}
/* Pílula da resposta atual, na edição (escolha única). */
.c-pilula[aria-pressed="false"] { background: var(--gab-white); }

/* Animações (só transform e opacity; desligadas com "Reduzir movimento"). */
@keyframes c-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes c-dot { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
@keyframes c-pisca { 0%, 35% { background-color: var(--gab-avocado); } 100% { background-color: var(--gab-pink-soft); } }
@media (prefers-reduced-motion: no-preference) {
  .c-msg, .c-typing, .c-card, .c-final-botao { animation: c-pop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .c-typing i { animation: c-dot 1.1s infinite; }
  /* Resposta alterada: pisca rapidamente em verde abacate (sem animação com "Reduzir movimento"). */
  .c-resp.is-alterada { animation: c-pisca 0.8s ease-out; }
  .c-typing i:nth-child(2) { animation-delay: 0.15s; }
  .c-typing i:nth-child(3) { animation-delay: 0.3s; }
}

/* ---- Desktop (≥ 1024px): formato WhatsApp Web -------------------------------------------------- */
@media (min-width: 1024px) {
  /* minmax(0, 1fr) na linha: sem isso a linha cresce com a conversa e a área de mensagens não rola. */
  .c-js .c-shell { display: grid; grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .c-js .c-side {
    display: flex; flex-direction: column; height: 100%; min-height: 0; overflow-y: auto;
    background: var(--gab-white); border-right: 1px solid var(--gab-line);
  }
  .c-side-top { flex: none; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 20px; border-bottom: 1px solid var(--gab-line); }
  .c-side-sair { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; }
  .c-side-title { flex: none; padding: 18px 20px 10px; font-family: var(--font-title); font-weight: 700; font-size: 24px; }
  .c-side-item { flex: none; display: flex; align-items: center; gap: 12px; margin: 0 10px; padding: 12px 10px; border-radius: 12px; background: var(--gab-sand); }
  .c-side-item-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .c-side-item-linha { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .c-side-item-linha b { font-size: 16px; }
  .c-side-agora { font-size: 12px; font-weight: 600; color: var(--gab-green); }
  .c-side-item-sub { font-size: 14px; color: var(--gab-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .c-side-box { flex: none; margin: auto 20px 20px; padding: 18px; border-radius: 16px; border: 1px solid var(--gab-line); display: flex; flex-direction: column; gap: 12px; }
  .c-side-list { display: flex; flex-direction: column; gap: 12px; }
  .c-side-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; color: var(--gab-ink-2); }
  .c-side-list svg { flex: none; margin-top: 1px; }
  .c-side-nota { font-size: 13px; line-height: 1.4; color: var(--gab-ink-3); padding-top: 4px; }
  .c-side-nota a { color: var(--gab-ink-2); font-weight: 600; }

  .c-head { padding: 10px 7% 10px calc(7% - 12px); min-height: 64px; }
  .c-log { padding: 24px 7%; }
  .c-msg { max-width: 62%; }
  .c-card { width: 380px; max-width: 100%; }
  .c-final-botao { align-self: flex-start; width: 380px; max-width: 100%; }
  .c-bar { padding: 12px 7% 18px; }
  .c-opcoes .c-pilula { padding: 8px 18px; }
  .c-acoes[data-modo="multi"] .c-botao, .c-acoes[data-modo="aceite"] .c-botao { align-self: flex-start; min-width: 240px; }
  .c-aceite { align-self: flex-start; }
}

/* ============================================================================================ */
/* Páginas de obrigado (7.1) e lista (7.2)                                                       */
/* ============================================================================================ */
.o-pill { font-size: 12px; font-weight: 600; line-height: 1.2; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--gab-ink); text-align: center; }
.o-main { padding: 24px 0 48px; }
.o-main > .f-wrap { display: flex; flex-direction: column; gap: 24px; }
.o-copy { display: flex; flex-direction: column; gap: 10px; }
.o-selo-ok { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--gab-green); }
.o-selo-ok svg { flex: none; }
.o-h1 { font-family: var(--font-title); font-weight: 700; font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; }
.o-sub { font-size: 16px; line-height: 1.5; color: var(--gab-ink-2); }
/* Obrigado por perfil (7.1, v1.12): sem vídeo; topo centralizado, "O que acontece agora" (Padrão A, listas.css)
   e o bloco final do Instagram. O cabeçalho do obrigado não é sticky: a área presa começa no topo da tela. */
.o-passos { --f-topo: 0px; }
.o-copy.f-wrap { align-items: center; text-align: center; }
.o-copy .o-pill { margin-top: 2px; }
.o-copy .o-sub { max-width: 520px; }
.o-passos { padding: 40px 0 0; }
.o-fim { display: flex; flex-direction: column; gap: 14px; }
.o-fim p { font-size: 15px; line-height: 1.5; color: var(--gab-ink-2); }
.o-passos ~ .f-wrap .o-fim {
  align-items: center; text-align: center; max-width: 620px; margin: 24px auto 0;
  padding: 24px; border-radius: 24px; background: var(--gab-sand);
}
.o-sino { width: 56px; height: 56px; border-radius: 18px; background: var(--gab-ink); display: flex; align-items: center; justify-content: center; }
.o-caixa { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 18px; background: var(--gab-white); border: 1px solid var(--gab-line); }
.o-caixa h2 { font-size: 16px; font-weight: 700; }
.o-caixa p { font-size: 15px; line-height: 1.45; color: var(--gab-ink-2); }
.o-voltar { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: 15px; font-weight: 600; }
.o-lista { max-width: calc(600px + 2 * var(--gutter)); }

@media (min-width: 900px) {
    .o-main { padding: 56px 0 88px; }
  .o-pill { font-size: 13px; padding: 6px 12px; }
  .o-copy { gap: 12px; }
  .o-passos { padding-top: 64px; }
  .o-passos ~ .f-wrap .o-fim { padding: 32px; margin-top: 32px; }
  .o-passos ~ .f-wrap .o-fim .f-btn { align-self: center; }
  .o-selo-ok { font-size: 14px; }
  .o-h1 { font-size: 46px; line-height: 1.05; letter-spacing: -0.02em; }
  .o-sub { font-size: 18px; }
  .o-fim { gap: 16px; max-width: 520px; }
  .o-fim p { font-size: 17px; }
  .o-fim .f-btn { align-self: flex-start; }
  .o-lista .o-h1 { font-size: 40px; }
  .o-lista-acoes { display: flex; align-items: center; gap: 24px; }
}
@media (max-width: 899px) {
  .o-lista-acoes { display: flex; flex-direction: column; gap: 8px; }
}

/* FORM-V2 (01/12/2026): fim do chat com o WhatsApp do comercial, reserva e atalhos do Instagram. */
.c-final-whats { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.c-final-nota { margin: 0; font-size: 15px; color: var(--gab-ink); opacity: .75; }
.c-final-reserva { align-self: flex-start; padding: 6px 0; border: 0; background: none; cursor: pointer;
  font-family: var(--font-text); font-size: 15px; color: var(--gab-ink); text-decoration: underline; }
.c-opcoes--atalhos { margin-bottom: 8px; }
@media (min-width: 900px) { .c-final-whats .c-final-botao { align-self: flex-start; width: 380px; max-width: 100%; } }
.c-final-copiar { display: flex; flex-direction: column; gap: 8px; }
