/* Banner de consentimento de cookies (layouts/_cookie_consent).
   CSS próprio (sem Tailwind) porque também roda na landing, que não carrega o
   tailwind.css: entra no application.css pelo require_tree e é linkado à parte
   no layout landing_option. Tudo escopado em .nv-consent*.
   Visual = toast do app (shared/_toast): cartão branco, borda gray-100,
   rounded-2xl, sombra xl, ícone em círculo índigo. */
.nv-consent {
  position: fixed; z-index: 90; left: 1rem; right: 1rem; bottom: 1rem;
  display: flex; align-items: flex-start; gap: .75rem;
  max-width: 26rem; margin: 0; padding: 1rem;
  background: #fff; color: #111827;
  border: 1px solid #f3f4f6; border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .875rem; line-height: 1.45; text-align: left;
}
.nv-consent[hidden] { display: none; }
@media (min-width: 640px) { .nv-consent { right: auto; left: 1.25rem; bottom: 1.25rem; } }

.nv-consent-icon {
  display: flex; flex-shrink: 0; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 9999px;
  background: #eef2ff; color: #4f46e5;
}
.nv-consent-body { min-width: 0; flex: 1; }
.nv-consent-title { margin: 0 0 .15rem; font-weight: 600; color: #111827; }
.nv-consent-text { margin: 0; color: #4b5563; }
.nv-consent-link { color: #4338ca; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.nv-consent-link:hover { color: #3730a3; }

/* "Recusar" e "Aceitar" com o MESMO destaque (LGPD: recusar tão fácil quanto aceitar). */
.nv-consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.nv-consent-btn {
  appearance: none; cursor: pointer; margin: 0;
  padding: .55rem .9rem; border-radius: .75rem;
  border: 1px solid #4f46e5; background: #4f46e5; color: #fff;
  font: inherit; font-weight: 600; line-height: 1.25;
  transition: background-color .15s ease, border-color .15s ease;
}
.nv-consent-btn:hover { background: #4338ca; border-color: #4338ca; }
.nv-consent-btn:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }

/* Link "Preferências de cookies" renderizado como <button> nos rodapés. */
.nv-consent-prefs {
  appearance: none; background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; text-align: inherit;
}
.nv-consent-prefs:hover { text-decoration: underline; }

.dark .nv-consent { background: #1f2937; color: #f9fafb; border-color: #374151; box-shadow: 0 20px 25px -5px rgb(0 0 0 / .5); }
.dark .nv-consent-icon { background: rgb(99 102 241 / .15); color: #a5b4fc; }
.dark .nv-consent-title { color: #f9fafb; }
.dark .nv-consent-text { color: #d1d5db; }
.dark .nv-consent-link { color: #a5b4fc; }
.dark .nv-consent-link:hover { color: #c7d2fe; }

@media (prefers-reduced-motion: no-preference) {
  .nv-consent:not([hidden]) { animation: nv-consent-in .25s ease-out; }
  @keyframes nv-consent-in { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }
}
@media print { .nv-consent { display: none !important; } }

/* Espaço reservado enquanto o banner está aberto (ver reserveSpace() no
   controller): sem isso, no celular o banner fixo cobre o fim da página — o
   botão "Entrar" do login — e não dá para rolar até ele. */
body::after,
.nivo-viewport-h.overflow-y-auto::after {
  content: "";
  display: block;
  flex-shrink: 0;
  height: var(--nv-consent-space, 0px);
}
