/**
 * Aviso de consentimento das páginas do Worker.
 *
 * Mesma aparência do aviso do `index.html`, onde ele vive embutido: usa os
 * tokens do design system, com valores de reserva caso o CSS de tokens não
 * tenha carregado. Aqui é arquivo próprio porque a CSP das páginas do Worker
 * aceita `style-src 'unsafe-inline'` só pelo que o design system exige — não é
 * lugar para acrescentar dependência de embutido por conveniência.
 */

#rb-consentimento {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  background: var(--surface-invert, #043952);
  color: var(--text-on-invert, #ffeccc);
  font-family: var(--font-ui, 'Quicksand', 'Jost', sans-serif);
  border-top: 1px solid var(--border-invert, rgba(255, 236, 204, 0.28));
  box-shadow: var(--shadow-sheet, 0 18px 50px rgba(4, 57, 82, 0.22));
}

#rb-consentimento[data-aberto] {
  display: block;
}

#rb-consentimento .rb-caixa {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

#rb-consentimento p {
  margin: 0;
  flex: 1 1 22rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

#rb-consentimento .rb-acoes {
  display: flex;
  flex: 0 0 auto;
  gap: 0.625rem;
}

#rb-consentimento button {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0.5rem 1.125rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill, 999px);
  background: transparent;
  color: inherit;
}

#rb-consentimento button[data-acao='aceitar'] {
  border-color: transparent;
  background: var(--surface-accent, #e99b26);
  color: var(--text-on-accent, #043952);
}

#rb-consentimento a {
  color: inherit;
  text-decoration: underline;
}

#rb-consentimento button:focus-visible,
#rb-consentimento a:focus-visible {
  outline: 2px solid var(--focus-ring, #e99b26);
  outline-offset: 2px;
}

@media (max-width: 40rem) {
  #rb-consentimento .rb-acoes {
    width: 100%;
  }
  #rb-consentimento button {
    flex: 1;
  }
}
