/* Cardápio na Mão: base comum (cardápio do cliente, painel, criar e página de vendas).
   Papel quente, tinta escura, a cor da loja como destaque. Títulos e preços na fonte de quadro de cardápio. */

@font-face {
  font-family: 'Big Shoulders Display';
  src: url('/fonts/big-shoulders-display.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/fonts/schibsted-grotesk.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --papel: #f8f4ee;
  --branco: #ffffff;
  --tinta: #1c1917;
  --cinza: #6b625a;
  --cinza-claro: #a39a90;
  --linha: #e8e0d5;
  --linha-forte: #d6ccbf;
  --ok: #1f7a4d;
  --ok-claro: #e3f2ea;
  --alerta: #b45309;
  --alerta-claro: #fdf0dd;
  --perigo: #b42318;
  --perigo-claro: #fdeceb;
  --zap: #1fa855;
  --marca: #b8341b;
  --marca-escura: #8f2713;
  --marca-clara: #f8e5df;
  --sobre-marca: #ffffff;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --texto: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --raio: 14px;
  --sombra: 0 1px 2px rgb(28 25 23 / 0.06), 0 6px 20px rgb(28 25 23 / 0.06);
  --sombra-forte: 0 12px 40px rgb(28 25 23 / 0.18);
  color-scheme: light;
}

/* A cor de cada loja (escolhida no painel). */
[data-cor='tomate'] { --marca: #b8341b; --marca-escura: #8f2713; --marca-clara: #f8e5df; }
[data-cor='mostarda'] { --marca: #a8690f; --marca-escura: #82500a; --marca-clara: #f8ecd8; }
[data-cor='oliva'] { --marca: #4d6b2f; --marca-escura: #3a5222; --marca-clara: #e7eedf; }
[data-cor='vinho'] { --marca: #7a1f3d; --marca-escura: #5e162e; --marca-clara: #f3e1e7; }
[data-cor='carvao'] { --marca: #26221f; --marca-escura: #000000; --marca-clara: #ebe7e2; }
[data-cor='acai'] { --marca: #4b1f5c; --marca-escura: #371546; --marca-clara: #eee3f2; }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 16px/1.45 var(--texto);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--marca);
}

[hidden] {
  display: none !important;
}

.so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--marca);
  color: var(--sobre-marca);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.15s, opacity 0.15s;
}

.btn:hover {
  background: var(--marca-escura);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-sec {
  background: var(--branco);
  color: var(--tinta);
  box-shadow: inset 0 0 0 1.5px var(--linha-forte);
}

.btn-sec:hover {
  background: var(--papel);
}

.btn-zap {
  background: var(--zap);
  color: #fff;
}

.btn-zap:hover {
  background: #178a45;
}

.btn-ok {
  background: var(--ok);
  color: #fff;
}

.btn-ok:hover {
  background: #17603c;
}

.btn-perigo {
  background: var(--branco);
  color: var(--perigo);
  box-shadow: inset 0 0 0 1.5px #f1c1bd;
}

.btn-peq {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.btn-largo {
  width: 100%;
}

.link-btn {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--marca);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- formulário ---------- */

.campo {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.campo > span {
  font-size: 14px;
  font-weight: 600;
}

.campo small {
  color: var(--cinza);
  font-size: 13px;
}

.campo input,
.campo select,
.campo textarea,
.entrada {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--linha-forte);
  border-radius: 12px;
  background: var(--branco);
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.campo textarea {
  min-height: 80px;
  resize: vertical;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus,
.entrada:focus {
  border-color: var(--marca);
  outline: none;
  box-shadow: 0 0 0 3px var(--marca-clara);
}

.duas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.erro {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--perigo-claro);
  color: var(--perigo);
  font-size: 14px;
  font-weight: 600;
}

/* Escolhas em pílula (rádio ou caixa escondidos). */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--branco);
  box-shadow: inset 0 0 0 1.5px var(--linha-forte);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.chip input:checked + span {
  background: var(--tinta);
  color: #fff;
  box-shadow: none;
}

.chip input:focus-visible + span {
  outline: 3px solid var(--marca);
  outline-offset: 2px;
}

/* Interruptor. */
.liga {
  position: relative;
  display: inline-block;
  flex: none;
  width: 48px;
  height: 28px;
}

.liga input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.liga i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--linha-forte);
  pointer-events: none;
  transition: background-color 0.15s;
}

.liga i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
  transition: transform 0.15s;
}

.liga input:checked + i {
  background: var(--ok);
}

.liga input:checked + i::after {
  transform: translateX(20px);
}

.liga input:focus-visible + i {
  outline: 3px solid var(--marca);
  outline-offset: 2px;
}

/* ---------- folha que sobe de baixo (no computador, janela no meio) ---------- */

.folha {
  width: min(560px, 100vw);
  max-width: 100vw;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--papel);
  color: var(--tinta);
  box-shadow: var(--sombra-forte);
  overflow: hidden;
}

.folha[open] {
  display: flex;
  flex-direction: column;
  animation: folha-sobe 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.folha::backdrop {
  background: rgb(28 25 23 / 0.5);
}

@keyframes folha-sobe {
  from {
    transform: translateY(40px);
    opacity: 0.4;
  }
}

.folha-corpo {
  flex: 1;
  padding: 20px 20px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.folha-pe {
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linha);
  background: var(--branco);
}

.folha-fechar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  box-shadow: var(--sombra);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

@media (min-width: 720px) {
  .folha {
    margin: auto;
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
