/* Pesquisa no tablet da recepção. As cores vêm do config.json do hotel (variáveis definidas em pesquisa.js). */
:root {
  --fundo: #f6f4f1; --superficie: #fff; --texto: #333; --suave: #777;
  --principal: #555; --principal-texto: #fff; --destaque: #ddd;
  --fonte-titulo: 'Montserrat', system-ui, sans-serif; --fonte: 'Montserrat', system-ui, sans-serif;
  --raio: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fundo); color: var(--texto); font-family: var(--fonte);
  -webkit-user-select: none; user-select: none; overscroll-behavior: none; touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.app { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- topo e rodapé ---------- */
.topo { display: flex; align-items: center; gap: 20px; padding: 20px clamp(16px, 4vw, 48px) 0; }
.topo img { height: 44px; width: auto; }
.progresso { flex: 1; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--principal) 15%, transparent); overflow: hidden; }
.progresso span { display: block; height: 100%; background: var(--principal); border-radius: 6px; transition: width .35s ease; }
.passo { font-size: 15px; color: var(--suave); font-variant-numeric: tabular-nums; white-space: nowrap; }

.corpo { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px clamp(16px, 4vw, 48px); max-width: 1100px; width: 100%; margin: 0 auto; }
.rodape { display: flex; justify-content: space-between; gap: 16px; padding: 0 clamp(16px, 4vw, 48px) 28px; max-width: 1100px; width: 100%; margin: 0 auto; }

.botao {
  min-height: 64px; padding: 0 36px; border-radius: 999px; font-size: 20px; font-weight: 600; letter-spacing: .02em;
  background: var(--principal); color: var(--principal-texto); transition: transform .1s, opacity .2s;
}
.botao:active { transform: scale(.97); }
.botao.secundario { background: transparent; color: var(--suave); border: 2px solid color-mix(in srgb, var(--suave) 35%, transparent); }
.botao.grande { min-height: 76px; padding: 0 56px; font-size: 24px; }

/* ---------- boas-vindas ---------- */
.boas-vindas { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; gap: 28px; }
.boas-vindas .logo { width: min(340px, 60vw); max-height: 30vh; object-fit: contain; }
.boas-vindas h1 { font-family: var(--fonte-titulo); font-size: clamp(30px, 4.4vw, 46px); font-weight: 600; margin: 8px 0 0; letter-spacing: .01em; }
.boas-vindas p { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.5; color: var(--suave); max-width: 640px; margin: 0; }
.boas-vindas small { font-size: 15px; color: var(--suave); }

/* ---------- perguntas ---------- */
h2.secao { font-family: var(--fonte-titulo); font-size: clamp(28px, 4vw, 40px); font-weight: 600; margin: 0 0 6px; }
.dica { font-size: 18px; color: var(--suave); margin: 0 0 28px; }
.itens { display: flex; flex-direction: column; gap: 18px; }
.item { background: var(--superficie); border-radius: var(--raio); padding: 22px 24px; box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 4px 18px rgb(0 0 0 / .04); }
.item .rotulo { font-size: clamp(19px, 2.3vw, 23px); font-weight: 500; margin: 0 0 16px; line-height: 1.35; }
.opcoes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.opcoes.duas { grid-template-columns: repeat(2, 1fr); }
.opcao {
  min-height: 84px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px solid color-mix(in srgb, var(--principal) 22%, transparent); background: var(--superficie);
  font-size: 19px; font-weight: 600; transition: background .15s, border-color .15s, transform .1s;
}
.opcao .rosto { font-size: 30px; line-height: 1; }
.opcao:active { transform: scale(.97); }
.opcao[aria-pressed="true"] { background: var(--principal); border-color: var(--principal); color: var(--principal-texto); }

.campo {
  width: 100%; font: inherit; font-size: 28px; padding: 20px 24px; border-radius: var(--raio); border: 2px solid color-mix(in srgb, var(--principal) 25%, transparent);
  background: var(--superficie); color: var(--texto); -webkit-user-select: text; user-select: text; outline: none;
}
.campo:focus { border-color: var(--principal); }
textarea.campo { font-size: 22px; min-height: 220px; resize: none; line-height: 1.45; }
.apto { max-width: 360px; text-align: center; letter-spacing: .08em; }
.apto[aria-invalid="true"] { border-color: #c8332f; }
.item.falta .opcao { border-color: #c8332f; }
.item.falta .rotulo { color: #c8332f; }
.aviso-campo:empty { display: none; }
.aviso-campo { color: #c8332f; font-size: 18px; font-weight: 600; margin: 14px 0 0; min-height: 1.4em; }

/* ---------- obrigado ---------- */
.obrigado { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px; padding: 40px 24px; }
.obrigado .marca { width: min(220px, 40vw); }
.obrigado h1 { font-family: var(--fonte-titulo); font-size: clamp(40px, 6vw, 64px); font-weight: 600; margin: 0; }
.obrigado p { font-size: 22px; color: var(--suave); margin: 0; max-width: 560px; line-height: 1.5; }

/* ---------- avisos ---------- */
.bloqueado { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 40px 24px; color: var(--suave); font-size: 20px; }
.faixa-teste { position: fixed; top: 0; left: 0; right: 0; z-index: 5; background: #b3261e; color: #fff; text-align: center; font-size: 14px; font-weight: 600; padding: 6px; letter-spacing: .03em; }
.faixa-teste + .app { padding-top: 30px; }
.fila { position: fixed; right: 12px; bottom: 10px; font-size: 13px; color: var(--suave); background: var(--superficie); padding: 6px 12px; border-radius: 999px; box-shadow: 0 1px 6px rgb(0 0 0 / .08); }

.entrar { animation: entrar .3s ease both; }
@keyframes entrar { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* tablet deitado: pergunta e botões na mesma linha, para caber até 5 perguntas sem rolar */
@media (min-width: 900px) and (orientation: landscape) {
  .topo { padding-top: 14px; }
  .corpo { padding-top: 12px; padding-bottom: 16px; }
  h2.secao { font-size: clamp(26px, 4.4vh, 36px); }
  .itens { gap: clamp(8px, 1.4vh, 12px); }
  .item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 1.35fr); align-items: center; gap: 20px; padding: clamp(8px, 1.3vh, 14px) 16px clamp(8px, 1.3vh, 14px) 24px; }
  .item .rotulo { margin: 0; font-size: 20px; }
  .item:has(.rotulo) .opcao { min-height: clamp(54px, 8.2vh, 70px); }
  .opcao .rosto { font-size: 24px; }
  .item:not(:has(.rotulo)) { display: block; }
  .dica { margin-bottom: clamp(10px, 2vh, 20px); }
  .rodape { padding-bottom: 20px; }
}

/* tablet em pé ou tela estreita: rótulo em cima, quatro botões embaixo em 2×2 se faltar espaço */
@media (max-width: 560px) {
  .opcoes { grid-template-columns: repeat(2, 1fr); }
  .rodape { padding-bottom: 20px; }
  .botao { padding: 0 24px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
