/* =====================================================================
   app-pwa.css — estilos da camada de app (APP-1).
   Só o necessário p/ /app.php e os ajustes de quem roda instalado.
   Tokens REAIS do style.css (não existem --bg nem --text puros).
   A tab bar e a home compacta são da APP-2 — aqui não.
   ===================================================================== */

/* Rodando instalado: respeitar as áreas seguras (notch do iPhone). */
html.is-app body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
/* O badge de versão do rodapé polui a tela pequena do app. */
html.is-app .app-version-badge { display: none; }

/* ---------------- /app.php — página de instalação ---------------- */
.pwa-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 4px 40px;
}
.pwa-hero {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elevated);
  margin-bottom: 22px;
}
.pwa-hero img { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 14px; }
.pwa-hero h1 { margin: 0 0 6px; font-size: 22px; }
.pwa-hero p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.5; }

.pwa-status {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-elevated);
  margin-bottom: 18px; font-size: 14.5px;
}
.pwa-status.ok { border-color: var(--success); color: var(--success); }

.pwa-passos { list-style: none; padding: 0; margin: 0 0 20px; }
.pwa-passos li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px solid var(--line);
  font-size: 14.5px; line-height: 1.5;
}
.pwa-passos li:last-child { border-bottom: 0; }
.pwa-passo-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700;
}
.pwa-btn-instalar {
  width: 100%; min-height: 48px; /* alvo de toque */
  font-size: 15.5px; font-weight: 600;
}
.pwa-nota {
  margin-top: 18px; padding: 14px 16px;
  border-radius: 12px; border: 1px dashed var(--line-strong);
  color: var(--text-muted); font-size: 13.5px; line-height: 1.55;
}

/* ---------------- APP-3: banner "Ativar notificações" ---------------- */

/* CUIDADO (bug real, 2026-07-11): um `display` de autor VENCE o atributo
   [hidden] (que só funciona pelo display:none do user-agent). Sem estas
   duas regras, .pa-push-banner{display:flex} deixava o banner na tela para
   sempre — não sumia ao Ativar/Dispensar e ainda aparecia para quem já
   havia decidido. Mesmo padrão já usado no projeto (#sino-panel[hidden],
   .fe-modal[hidden]). Especificidade classe+atributo > classe: sem !important. */
.pa-push-banner[hidden],
.pwa-status[hidden] { display: none; }

.pa-push-banner {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--bg-elevated);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.pa-push-txt { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.pa-push-txt strong { font-size: 14.5px; color: var(--text-primary); }
.pa-push-txt span { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.pa-push-acoes { display: flex; gap: 8px; flex: none; }
.pa-push-acoes .btn { min-height: 40px; }

@media (min-width: 720px) {
  .pa-push-banner { left: auto; right: 24px; max-width: 420px; }
}
