/*
  O banner de cookies (src/components/consent/CookieBanner.astro). Funciona nas páginas novas e nas do
  blog (Layout antigo, com Tailwind), por isso não depende do kit: usa os tokens da página quando
  existem (--p-inv-*, --font-text) e cai nas mesmas cores da Tenanci quando não existem.
*/
.tn-consent {
  --tc-bg: var(--p-inv-bg, #17142b);
  --tc-ink: var(--p-inv-ink, #ffffff);
  --tc-muted: var(--p-inv-muted, #b9b8c4);
  --tc-btn: var(--p-inv-surface, #2c2846);
  --tc-line: rgba(255, 255, 255, .14);
  position: fixed; z-index: 2147483000;
  left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(760px, calc(100% - 32px));
  box-sizing: border-box;
  display: flex; align-items: center; gap: 20px;
  padding: 16px 16px 16px 20px;
  background: var(--tc-bg); color: var(--tc-ink);
  border: 1px solid var(--tc-line); border-radius: 16px;
  box-shadow: 0 18px 48px -12px rgba(23, 20, 43, .45), 0 2px 6px rgba(23, 20, 43, .18);
  font: 400 14px/1.45 var(--font-text, "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  text-align: left; letter-spacing: normal;
}
.tn-consent[hidden] { display: none; }
.tn-consent * { box-sizing: border-box; }
.tn-consent__text { flex: 1 1 auto; min-width: 0; }
.tn-consent p { margin: 0; }
.tn-consent__t { font-weight: 600; font-size: 14px; color: var(--tc-ink); }
.tn-consent__d { margin-top: 2px !important; color: var(--tc-muted); font-size: 13.5px; }
.tn-consent__d a { color: var(--tc-ink); text-decoration: underline; text-underline-offset: 2px; }
.tn-consent__d a:hover { text-decoration-thickness: 2px; }
.tn-consent__btns { flex: none; display: flex; gap: 8px; }
/* os dois botões iguais: o mesmo tamanho, a mesma cor, o mesmo peso */
.tn-consent__btn {
  appearance: none; -webkit-appearance: none; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 104px; height: 40px; padding: 0 18px;
  border: 1px solid var(--tc-line); border-radius: 999px;
  background: var(--tc-btn); color: var(--tc-ink);
  font: 500 14px/1 var(--font-text, "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.tn-consent__btn:hover { background: color-mix(in oklab, var(--tc-btn) 80%, #ffffff); border-color: rgba(255, 255, 255, .28); }
.tn-consent__btn:active { transform: translateY(1px); }
.tn-consent :focus-visible { outline: 2px solid #a996fb; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .tn-consent:not([hidden]) { animation: tn-consent-in .28s cubic-bezier(.2, .7, .2, 1); }
  @keyframes tn-consent-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
}
@media (max-width: 639px) {
  .tn-consent { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; border-radius: 14px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .tn-consent__btns { width: 100%; }
  .tn-consent__btn { flex: 1 1 0; min-width: 0; height: 44px; }
}
@media print { .tn-consent { display: none !important; } }

/* o link "Preferências de cookies" dos rodapés: um botão com cara de link */
.tn-consent-link {
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; letter-spacing: inherit; text-align: inherit; cursor: pointer; text-decoration: inherit;
}
.tn-consent-link:hover { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 639px) { .footer__legal .tn-consent-link { display: inline-flex; align-items: center; min-height: 44px; } }
