/* Botão e faixa de instalar o app + área de notificações (método Metodo-Notificacoes-PWA).
   Quem decide se aparecem é o instalar.js / notificacoes.js. Usa os tokens --c-* do theme.css. */

:root { --instalar-cor: #2563eb; --instalar-fundo: #0a1020; }

/* display: flex/grid venceria o atributo hidden sem estas regras */
[data-instalar-faixa][hidden], [data-instalar-faixa] [hidden],
[data-instalar-item][hidden], [data-instalar-item] [hidden],
[data-push][hidden], [data-push] [hidden] { display: none !important; }

/* ── botão fixo ── */
.botao-instalar { display: flex; align-items: center; gap: .75rem; box-sizing: border-box; width: 100%; max-width: 22rem; min-height: 68px; margin-inline: auto; padding: .6rem .75rem .6rem .6rem; border: 0; border-radius: 18px; background: var(--instalar-cor); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.botao-instalar:hover { filter: brightness(1.08); }
.botao-instalar:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.botao-instalar[disabled] { opacity: .65; cursor: default; }
.botao-instalar-icone { width: 48px; height: 48px; flex-shrink: 0; border-radius: 13px; }
.botao-instalar-textos { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: .15rem; }
.botao-instalar-titulo { font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.botao-instalar-sistemas { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; line-height: 1.2; }
.botao-instalar-sistemas svg { flex-shrink: 0; }
.botao-instalar-seta { display: flex; width: 38px; height: 38px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; background: rgba(0,0,0,.22); }
.instalar-ajuda { max-width: 22rem; margin: .5rem auto 0; font-size: .85rem; line-height: 1.5; color: var(--c-muted, #94a3b8); }
@media (max-width: 340px) { .botao-instalar-seta { display: none; } }

/* ── faixa flutuante (acima da barra de navegação de baixo) ── */
.instalar-faixa { position: fixed; left: 12px; right: 12px; bottom: calc(var(--faixa-base, 12px) + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: .5rem; padding: .625rem; border-radius: 12px; background: var(--instalar-fundo); border: 1px solid rgba(56,189,248,.25); color: #fff; font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
body:has(.bottomnav) { --faixa-base: 78px; }
.instalar-faixa-icone { width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; }
.instalar-faixa-textos { min-width: 0; flex: 1; }
.instalar-faixa-titulo { margin: 0; font-size: .875rem; font-weight: 700; line-height: 1.25; }
.instalar-faixa-texto { margin: 0; font-size: .75rem; line-height: 1.35; color: rgba(255,255,255,.78); }
.instalar-faixa-ja { min-height: 32px; padding: 0; border: 0; background: none; color: rgba(255,255,255,.78); font: inherit; font-size: .75rem; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.instalar-faixa-sim { min-height: 44px; flex-shrink: 0; padding: 0 .75rem; border: 0; border-radius: 8px; background: var(--instalar-cor); color: #fff; font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer; }
.instalar-faixa-nao { display: flex; width: 44px; height: 44px; flex-shrink: 0; align-items: center; justify-content: center; margin: -.25rem -.25rem -.25rem -.5rem; border: 0; background: none; color: rgba(255,255,255,.78); cursor: pointer; }
@media (min-width: 640px) { .instalar-faixa { left: auto; right: 20px; width: 22rem; } }

/* ── área de notificações (Perfil) ── */
.push-topo { display: flex; align-items: flex-start; gap: 12px; }
.push-topo > div { flex: 1; min-width: 0; }
.push-topo p { margin: 4px 0 0; font-size: .85rem; line-height: 1.45; color: var(--c-muted, #94a3b8); }
.push-chave { position: relative; width: 58px; height: 34px; flex-shrink: 0; border: 0; border-radius: 999px; background: var(--c-surface2, #1e293b); cursor: pointer; }
.push-chave span { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.push-chave[aria-checked="true"] { background: #2563eb; }
.push-chave[aria-checked="true"] span { transform: translateX(24px); }
.push-chave:focus-visible { outline: 2px solid #38bdf8; outline-offset: 2px; }
.push-chave[disabled] { opacity: .6; cursor: default; }
.push-estado { margin: 10px 0 0; text-align: right; font-size: .8rem; font-weight: 700; color: var(--c-muted, #94a3b8); }
.push-assuntos { margin: 14px 0 0; border: 0; border-top: 1px solid var(--c-border, rgba(56,189,248,.1)); padding: 12px 0 0; min-width: 0; }
.push-assuntos legend { padding: 0; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted, #94a3b8); }
.push-opcao { display: flex; min-height: 52px; align-items: center; gap: 10px; margin-top: 8px; border: 1px solid var(--c-border, rgba(56,189,248,.1)); border-radius: 12px; padding: 8px 12px; cursor: pointer; color: var(--c-text, #e2e8f8); }
.push-opcao:has(input:checked) { border-color: #2563eb; background: rgba(37,99,235,.12); }
.push-opcao small { display: block; font-size: .75rem; color: var(--c-muted, #94a3b8); }
.push-lista { display: grid; gap: 6px; margin-top: 10px; padding-left: 4px; }
/* sem esta linha, o display:grid vence o atributo hidden e a lista nunca some */
.push-lista[hidden] { display: none; }
.push-assunto { display: flex; min-height: 44px; align-items: center; gap: 10px; cursor: pointer; color: var(--c-text, #e2e8f8); font-size: .9rem; }
[data-push] input[type=radio], [data-push] input[type=checkbox] { width: 20px; height: 20px; accent-color: #2563eb; flex-shrink: 0; }
.push-aviso { margin: 12px 0 0; min-height: 18px; font-size: .85rem; font-weight: 600; color: #38bdf8; }
