/* TOTEM (27/10/2026). Base funcional — as artes de cada cliente vêm depois. Cores da loja em --t-* (pdv_config.totem).
   Regras de totem: alvo de toque ≥ 64 px, texto grande, contraste alto, nada que role de lado, sem seleção de texto.
   (28/10/2026) --t-sobre-principal: letra dos botões, escolhida no totem.js pelo contraste (branco no laranja dava ~3:1). */
:root { --t-principal: #f26b1d; --t-fundo: #14110f; --t-texto: #ffffff; --t-sobre-principal: #15171a; }
.totem-corpo [hidden] { display: none !important; } /* o terminal de teste da maquininha (display:flex no style=) aparecia sempre */
.totem-corpo { margin: 0; background: var(--t-fundo); color: var(--t-texto); overscroll-behavior: none; }
.totem-corpo #app { min-height: 100vh; }
.totem { min-height: 100vh; font-family: Inter, system-ui, sans-serif; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.totem button { font: inherit; cursor: pointer; touch-action: manipulation; }
.totem-carregando { padding: 40vh 24px 0; text-align: center; font-size: 1.4rem; opacity: 0.8; }

.totem-tela { min-height: 100vh; display: flex; flex-direction: column; box-sizing: border-box; }
.totem-tela h1 { font-family: Archivo, Inter, sans-serif; font-size: clamp(2.2rem, 6vw, 4rem); margin: 12px 0; text-align: center; }
.totem-tela h2 { font-family: Archivo, Inter, sans-serif; font-size: clamp(1.5rem, 3.6vw, 2.4rem); margin: 18px 24px; text-align: center; }
.totem-sub { font-size: clamp(1.1rem, 2.4vw, 1.5rem); opacity: 0.85; text-align: center; margin: 6px 24px; }

/* descanso / fim */
.totem-descanso { align-items: center; justify-content: center; gap: 18px; padding: 24px; cursor: pointer; }
.totem-logo-grande { width: min(42vw, 280px); max-height: 32vh; object-fit: contain; }
.totem-logo { height: 44px; width: auto; max-width: 140px; object-fit: contain; }

/* botões. (28/10/2026) cada um repete o próprio fundo no :hover — o button:hover do style.css pesava mais e, no toque
   (que deixa o hover "grudado"), trocava a cor da loja pelo laranja-escuro da CLAI. */
.totem-botao, .totem-botao:hover { min-height: 64px; padding: 14px 28px; border: 0; border-radius: 18px; background: var(--t-principal); color: var(--t-sobre-principal); font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.4rem); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.totem-botao:disabled { opacity: 0.45; }
.totem-botao:active { transform: scale(0.97); }
.totem-botao-leve, .totem-botao-leve:hover { min-height: 64px; padding: 10px 20px; border-radius: 16px; border: 2px solid currentColor; background: transparent; color: inherit; font-weight: 600; font-size: 1.1rem; opacity: 0.9; }
/* (28/10/2026) chama a atenção 3 vezes e para (pulsar sem fim cansa e não diz nada novo) */
.totem-botao--pulsa { font-size: clamp(1.4rem, 3.4vw, 2rem); padding: 22px 48px; animation: totem-pulsa 1.8s ease-in-out 3; }
@keyframes totem-pulsa { 50% { transform: scale(1.05); } }
.totem-cartao-grande, .totem-cartao-grande:hover { flex: 1; min-height: 34vh; border: 3px solid rgba(255, 255, 255, 0.18); border-radius: 26px; background: rgba(255, 255, 255, 0.06); color: inherit; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.totem-cartao-grande small { font-size: 1.1rem; font-weight: 500; opacity: 0.8; }
.totem-cartao-grande:active { border-color: var(--t-principal); background: rgba(255, 255, 255, 0.12); }
.totem-duas { display: flex; gap: 20px; padding: 0 24px 24px; flex-wrap: wrap; }
.totem-duas > * { flex: 1 1 240px; }
.totem-formas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; padding: 0 24px 24px; }
.totem-formas .totem-cartao-grande { min-height: 22vh; }

/* topo e barra de baixo */
.totem-topo { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); font-size: 1.2rem; }
.totem-topo b { flex: 1; }
/* (28/10/2026) sem blur (vidro é enfeite e pesa no aparelho do totem): fundo da loja sólido com uma linha em cima */
.totem-barra { position: sticky; bottom: 0; margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; background: var(--t-fundo); border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 1.25rem; }
.totem-barra--vazia { justify-content: center; opacity: 0.7; }

/* cardápio */
.totem-meio { flex: 1; display: grid; grid-template-columns: minmax(150px, 22%) 1fr; min-height: 0; }
.totem-categorias { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-right: 1px solid rgba(255, 255, 255, 0.12); overflow-y: auto; }
.totem-categorias button, .totem-categorias button:hover { min-height: 64px; padding: 10px 14px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.06); color: inherit; font-size: 1.1rem; font-weight: 600; text-align: left; }
.totem-categorias button.ativa { background: var(--t-principal); color: var(--t-sobre-principal); }
.totem-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; padding: 16px; align-content: start; overflow-y: auto; }
.totem-item, .totem-item:hover { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 2px solid rgba(255, 255, 255, 0.12); border-radius: 18px; background: rgba(255, 255, 255, 0.05); color: inherit; text-align: left; min-height: 220px; }
/* (28/10/2026) item sem foto: só nome, descrição e preço (o 🍕 aparecia até em bebida) */
.totem-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.totem-item b { font-size: 1.15rem; }
.totem-item small { opacity: 0.75; font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.totem-preco { margin-top: auto; font-weight: 700; color: var(--t-principal); font-size: 1.15rem; }
.totem-item:active { border-color: var(--t-principal); }
.totem-itens--sugestao { flex: 1; }

/* janela (montar item, ainda está aí, equipe) */
.totem-janela { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.7); display: flex; align-items: flex-end; justify-content: center; font-family: Inter, system-ui, sans-serif; }
.totem-janela-caixa { width: min(100%, 900px); max-height: 92vh; overflow-y: auto; background: var(--t-fundo); color: var(--t-texto); border-radius: 28px 28px 0 0; padding: 20px 22px; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
.totem-janela-caixa header { display: flex; gap: 16px; align-items: center; }
.totem-janela-caixa header img { width: 120px; height: 90px; object-fit: cover; border-radius: 14px; }
.totem-janela-caixa h2 { margin: 0; text-align: left; font-size: 1.8rem; }
.totem-janela-caixa footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; bottom: -20px; background: var(--t-fundo); padding: 12px 0; }
.totem-janela-caixa footer .totem-botao { flex: 1; }
.totem-grupo h3 { margin: 6px 0 10px; font-size: 1.25rem; }
.totem-grupo h3 small { font-weight: 400; opacity: 0.7; font-size: 0.95rem; margin-left: 6px; }
.totem-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.totem-opcao, .totem-opcao:hover { min-height: 64px; padding: 10px 12px; border: 2px solid rgba(255, 255, 255, 0.18); border-radius: 14px; background: transparent; color: inherit; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; font-size: 1.05rem; }
.totem-opcao small { opacity: 0.75; }
.totem-opcao.ativa { border-color: var(--t-principal); background: color-mix(in srgb, var(--t-principal) 22%, transparent); font-weight: 700; }
.totem-qtd { display: inline-flex; align-items: center; gap: 12px; }
.totem-qtd button, .totem-qtd button:hover { width: 64px; height: 64px; border-radius: 50%; border: 2px solid currentColor; background: transparent; color: inherit; font-size: 1.6rem; line-height: 1; }
.totem-qtd b { min-width: 28px; text-align: center; font-size: 1.4rem; }
.totem-aviso { margin: 8px 24px; padding: 12px 16px; border-radius: 12px; background: #4a1b12; color: #ffb3a1; font-weight: 600; font-size: 1.05rem; }
.totem-janela .totem-aviso { margin: 0; }

/* meu pedido */
.totem-pedido .totem-botao-leve { margin: 4px 20px; align-self: flex-start; }
.totem-linhas { list-style: none; margin: 0; padding: 8px 20px; display: flex; flex-direction: column; gap: 10px; }
.totem-linhas li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.totem-linhas small { display: block; opacity: 0.7; }
.totem-campos { display: grid; gap: 12px; padding: 12px 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.totem-campos label, .totem-config label { display: flex; flex-direction: column; gap: 6px; font-size: 1.05rem; }
.totem-campos input, .totem-config input:not([type="checkbox"]):not([type="color"]), .totem-equipe input { min-height: 56px; padding: 10px 14px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.08); color: inherit; font-size: 1.2rem; }
.totem-config .totem-sim { flex-direction: row; align-items: center; gap: 10px; }
.totem-config .totem-sim input { width: 26px; height: 26px; }
.totem-config .totem-cor input { width: 100%; height: 52px; border: 0; background: transparent; }

/* número do pedido */
.totem-numero { font-family: Archivo, Inter, sans-serif; font-size: clamp(5rem, 18vw, 10rem); font-weight: 900; line-height: 1; color: var(--t-principal); }
.totem-giro { width: 80px; height: 80px; border-radius: 50%; border: 8px solid rgba(255, 255, 255, 0.2); border-top-color: var(--t-principal); animation: totem-gira 0.9s linear infinite; }
@keyframes totem-gira { to { transform: rotate(360deg); } }

/* em pé (totem vertical) */
@media (orientation: portrait) {
  .totem-meio { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* (28/10/2026) quebram linha em vez de rolar de lado (a última ficava escondida e ninguém arrasta no totem) */
  .totem-categorias { flex-direction: row; flex-wrap: wrap; overflow: visible; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  .totem-categorias button { flex: 0 0 auto; }
  .totem-cartao-grande { min-height: 24vh; }
}
@media (prefers-reduced-motion: reduce) { .totem-botao--pulsa, .totem-giro { animation: none; } }

/* (28/10/2026) janela da maquininha (tefPdv.js usa o .modal do Painel: 420 px e botões de ~40 px). No totem quem toca é
   o cliente, de pé: janela larga, texto e botões grandes. */
.totem-corpo .modal { max-width: 640px; font-size: 1.25rem; }
.totem-corpo .modal-cabecalho h3 { font-size: 1.4rem; }
.totem-corpo .modal .modal-instrucao { font-size: 1.1rem; }
.totem-corpo .modal button { min-height: 64px; padding: 12px 24px; font-size: 1.2rem; border-radius: 14px; }

/* (04/11/2026) MODO MESA: o garçom digita a mesa; selo da mesa no topo; vídeo do item no lugar da foto */
.totem-mesa { display: flex; flex-direction: column; gap: 14px; width: min(100%, 360px); }
.totem-mesa label { display: flex; flex-direction: column; gap: 8px; font-size: 1.1rem; text-align: left; }
.totem-mesa input { font-size: 2.4rem !important; /* o style.css força 16 px nos campos abaixo de 900 px */ min-height: 72px; text-align: center; padding: 12px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); color: inherit; }
.totem-selo-mesa { padding: 6px 12px; border-radius: 999px; background: var(--t-principal); color: var(--t-sobre-principal); font-weight: 700; white-space: nowrap; }
.totem-item video.totem-video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: rgba(255, 255, 255, 0.06); pointer-events: none; }
.totem-janela-caixa header video.totem-video { width: 140px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; flex: none; }

/* (04/11/2026) segurar o logo 3 s (menu da equipe): sem o menu/arrasto de imagem do navegador no toque longo */
[data-segurar-sair] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; touch-action: none; }
