/* =========================================================
   protecao.css — barreiras contra cópia. A classe "protegido" no <html>
   é posta pelo js/protecao.js (todas as páginas). Nos painéis (admin e
   gestão: "pr-painel") o texto continua selecionável e a impressão dos
   QR Codes das mesas (body.print-tables) continua valendo.
   ========================================================= */

/* o texto não seleciona; toque longo não abre "copiar" / "salvar imagem" (iPhone) */
html.protegido:not(.pr-painel) body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.pr-painel img { -webkit-touch-callout: none; }
/* o que o cliente digita continua normal (colar, corretor); o endereço da loja continua copiável */
html.protegido input, html.protegido textarea, html.protegido select, html.protegido [contenteditable],
html.protegido #m-info { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* imagens e links não arrastam para fora da página */
html.protegido img, html.protegido a { -webkit-user-drag: none; }

/* capa preta dos atalhos de print do computador (js/protecao.js): por cima de tudo,
   até das gavetas abertas, porque é um "popover" (camada do topo) */
.pr-capa { display: none; }
html.pr-coberta .pr-capa {
  display: block; position: fixed; inset: 0; z-index: 2147483647;
  width: auto; height: auto; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #000; pointer-events: none;
}

/* imprimir ou "salvar como PDF": sai só o aviso, sem o conteúdo (vale também na vitrine; lá o print de tela é que fica liberado) */
@media print {
  html.protegido, html.protegido body:not(.print-tables) { background: #fff !important; color: #111 !important; }
  html.protegido body:not(.print-tables) > :not(.pr-impressao) { display: none !important; }
  html.protegido body:not(.print-tables)::before, html.protegido body:not(.print-tables)::after { content: none !important; display: none !important; }
  html.protegido body:not(.print-tables) .pr-impressao {
    display: grid !important; gap: 10px; justify-items: center; align-content: center; text-align: center;
    min-height: 60vh; padding: 40px 24px; color: #111;
    font: 15px/1.5 "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }
  html.protegido .pr-impressao strong { font-size: 22px; }
  html.protegido .pr-impressao .pr-link { font-weight: 700; word-break: break-all; }
  html.protegido .pr-impressao small { color: #555; font-size: 12px; }
}
