/* aifoodfotos: ferramenta (chat guiado por botões). Tokens em site.css. */

.ferramenta {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-coluna {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.app-topo {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 14px 0;
  background: var(--mostarda);
}

.app-topo .marca { font-size: 1.375rem; }

/* Conversa */

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  padding-bottom: 24px;
}

.msg {
  display: grid;
  gap: 10px;
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 20px;
  line-height: 1.4;
  scroll-margin-top: 72px;
  scroll-margin-bottom: calc(var(--doca-altura, 0px) + 12px);
  animation: chegar .22s ease-out;
}

@keyframes chegar {
  from { opacity: 0; transform: translateY(6px); }
}

.msg-bot {
  align-self: flex-start;
  background: var(--kraft);
  border-bottom-left-radius: 6px;
}

.msg-cliente {
  align-self: flex-end;
  background: var(--mostarda);
  border-bottom-right-radius: 6px;
  font-weight: 600;
}

.msg-larga { width: 100%; max-width: 100%; }

.msg-foto { padding: 4px; }

.msg-foto img {
  width: 200px;
  border-radius: 16px 16px 4px 16px;
}

.msg .dica {
  color: var(--tostado-suave);
  font-size: .9375rem;
}

.msg .comparar {
  border-radius: 14px;
  box-shadow: none;
}

/* Esperando a foto ficar pronta */

.pontinhos { display: flex; gap: 6px; padding: 4px 0; }

.pontinhos span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tostado);
  animation: pulo 1s infinite;
}

.pontinhos span:nth-child(2) { animation-delay: .15s; }
.pontinhos span:nth-child(3) { animation-delay: .3s; }

@keyframes pulo {
  0%, 80%, 100% { opacity: .25; transform: none; }
  40% { opacity: 1; transform: translateY(-4px); }
}

/* Escolha de estilo */

.estilos { display: grid; gap: 8px; }

.estilo {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--papel);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .08s;
}

.estilo img {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.estilo-nome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 1.125rem;
  font-weight: 800;
}

.estilo-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--mostarda);
  font-size: .75rem;
  font-weight: 700;
}

.estilo-texto {
  display: block;
  margin-top: 2px;
  color: var(--tostado-suave);
  font-size: .9375rem;
  line-height: 1.35;
}

.estilo:active:not(:disabled) { transform: scale(.98); }
.estilo.escolhido { border-color: var(--tostado); }
.estilo:disabled { cursor: default; }
.estilo:disabled:not(.escolhido) { opacity: .45; }

/* Packs */

.packs-lista { display: grid; gap: 8px; }

.pack {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: start;
  gap: 0 14px;
  padding: 14px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--papel);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .08s;
}

.pack:active:not(:disabled) { transform: scale(.98); }
.pack-destaque { border-color: var(--mostarda); }

.pack-cadeado {
  grid-row: 1 / span 4;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tostado);
  color: var(--mostarda);
}

.pack-titulo { font-weight: 800; line-height: 1.25; }

.pack-preco {
  font-stretch: 75%;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.2;
}

.pack-titulo, .pack-preco, .pack-detalhe, .pack .selo { grid-column: 2; }

.pack-detalhe {
  color: var(--tostado-suave);
  font-size: .875rem;
}

.pack .selo { justify-self: start; margin-top: 8px; }

/* Botões fixos embaixo */

.doca {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 12px 0 calc(14px + env(safe-area-inset-bottom));
  background: var(--papel);
  box-shadow: 0 -8px 24px rgba(36, 21, 11, .12);
}

.doca.vazia { display: none; }

.doca-botoes { display: grid; gap: 10px; }

.doca .botao { gap: 10px; }

.doca .botao svg { flex: none; }

.botao-contorno {
  background: transparent;
  color: var(--tostado);
  border: 2px solid var(--tostado);
  box-shadow: none;
}

.botao-contorno:active { box-shadow: none; }

/* Cadastro. O botão do Google é desenhado pelo próprio Google, dentro de um iframe. */

.botao-google {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.campo-whatsapp { display: grid; gap: 10px; }

.campo {
  width: 100%;
  min-height: 60px;
  padding: 14px 18px;
  border: 2px solid var(--tostado);
  border-radius: 14px;
  background: var(--papel);
  color: var(--tostado);
  font: inherit;
  font-size: 1.375rem; /* acima de 16px: o iPhone não dá zoom ao tocar */
  font-weight: 700;
  letter-spacing: .02em;
}

.campo::placeholder {
  color: var(--tostado-suave);
  opacity: .55;
  font-weight: 500;
}

.campo:focus-visible { outline-offset: 2px; }

.botao:disabled { opacity: .6; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .msg, .pontinhos span { animation: none; }
  .estilo, .pack { transition: none; }
}
