/* HAC-606: banner de consentimento de cookies (LGPD) — CSP-safe (arquivo próprio, sem inline).
   O gerador copia este arquivo para /consentimento.css com cache-busting (?v=hash).
   Marcado no <head> de TODAS as páginas (PT e /en/); o HTML do banner é montado por
   /consentimento.js (nada de style=, <style> ou on*= — a CSP live bloqueia inline). */

#hn-consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 90;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: var(--superficie, #ffffff);
  border-top: 1px solid var(--linha, #e1e4ee);
  box-shadow: var(--sombra-alta, 0 -8px 32px -16px rgb(16 20 40 / .35));
  font-family: "Open Sans", system-ui, sans-serif;
  color: var(--texto, #121626);
  max-height: 85vh;
  overflow-y: auto;
}

#hn-consent[hidden] { display: none; }

.hn-consent-caixa {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}

.hn-consent-texto {
  flex: 1 1 34ch;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.hn-consent-texto strong { font-size: 0.95rem; }

.hn-consent-texto a { color: inherit; text-decoration: underline; }

.hn-consent-acoes {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.hn-consent-acoes button {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--linha, #e1e4ee);
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  background: var(--superficie-2, #eef0f6);
  color: var(--texto, #121626);
}

.hn-consent-acoes button:hover { filter: brightness(0.97); }

.hn-consent-acoes .hn-aceitar {
  background: var(--texto, #121626);
  border-color: var(--texto, #121626);
  color: var(--superficie, #ffffff);
}

.hn-consent-acoes .hn-gerenciar {
  background: transparent;
  border: none;
  padding: 0.45rem 0.35rem;
  text-decoration: underline;
  font-weight: 500;
}

/* painel de preferências (abre pelo botão "Gerenciar preferências") */
.hn-consent-painel { flex: 1 1 100%; }

.hn-consent-painel[hidden] { display: none; }

.hn-consent-painel fieldset {
  border: 1px solid var(--linha, #e1e4ee);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0.35rem 0 0;
  display: grid;
  gap: 0.65rem;
}

.hn-consent-painel legend { font-size: 0.85rem; font-weight: 600; padding: 0 0.35rem; }

.hn-consent-painel label {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.88rem;
  line-height: 1.4;
  cursor: pointer;
}

.hn-consent-painel label.necessario { cursor: default; }

.hn-consent-painel input[type="checkbox"] { margin-top: 0.15rem; accent-color: var(--texto, #121626); }

.hn-consent-painel small { display: block; color: var(--suave, #5a6178); font-size: 0.8rem; }

@media (max-width: 640px) {
  .hn-consent-acoes { width: 100%; }

  .hn-consent-acoes button { flex: 1 1 auto; }

  .hn-consent-acoes .hn-gerenciar { flex: 1 1 100%; text-align: center; }
}
