@import url('/css/fonts-institutional.css');

/*!
 * Alicerce — Banner de consentimento de cookies (LGPD)
 * Identidade: branco / grafite / preto + acento azul #0B2D4A. Sem roxo.
 * Autocontido; usa variáveis próprias com prefixo --alc- para não colidir.
 */
#alc-consent {
  --alc-azul: #0B2D4A;
  --alc-azul-hover: #0a2740;
  --alc-preto: #111418;
  --alc-grafite: #3a4149;
  --alc-cinza: #6b7280;
  --alc-borda: #e3e6ea;
  --alc-branco: #ffffff;
  --alc-bg: #f7f8fa;

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  display: none;
  padding: 16px;
  box-sizing: border-box;
  font-family: var(--font-body, "IBM Plex Sans", system-ui, sans-serif);
  color: var(--alc-grafite);
}

#alc-consent.is-visible {
  display: block;
  animation: alc-slide-up .28s ease both;
}

@keyframes alc-slide-up {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

#alc-consent *,
#alc-consent *::before,
#alc-consent *::after { box-sizing: border-box; }

.alc-consent__banner {
  max-width: 980px;
  margin: 0 auto;
  background: var(--alc-branco);
  border: 1px solid var(--alc-borda);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(11, 45, 74, .16);
  padding: 20px 22px;
}

.alc-consent__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--alc-preto);
  letter-spacing: -0.01em;
}

.alc-consent__text {
  margin: 0 0 16px;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--alc-grafite);
}

.alc-consent__link {
  color: var(--alc-azul);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.alc-consent__link:hover { color: var(--alc-azul-hover); }

.alc-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.alc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .05s ease;
}
.alc-btn:active { transform: translateY(1px); }
.alc-btn:focus-visible { outline: 2px solid var(--alc-azul); outline-offset: 2px; }

.alc-btn--solid {
  background: var(--alc-azul);
  color: #fff;
  border-color: var(--alc-azul);
}
.alc-btn--solid:hover { background: var(--alc-azul-hover); border-color: var(--alc-azul-hover); }

.alc-btn--outline {
  background: transparent;
  color: var(--alc-preto);
  border-color: var(--alc-borda);
}
.alc-btn--outline:hover { border-color: var(--alc-grafite); }

.alc-btn--ghost {
  background: transparent;
  color: var(--alc-cinza);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding-left: 8px;
  padding-right: 8px;
  margin-right: auto;
}
.alc-btn--ghost:hover { color: var(--alc-preto); }

/* ---- painel de categorias ---- */
.alc-consent__panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--alc-borda);
}

.alc-consent__cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--alc-bg);
}
.alc-consent__cat:last-of-type { border-bottom: none; }

.alc-consent__cat-info { display: flex; flex-direction: column; gap: 3px; }
.alc-consent__cat-name { font-weight: 700; color: var(--alc-preto); font-size: .9rem; }
.alc-consent__cat-desc { font-size: .82rem; color: var(--alc-cinza); line-height: 1.45; }

/* switch acessível */
.alc-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.alc-switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.alc-switch__track {
  width: 44px; height: 24px; border-radius: 999px;
  background: #cbd2d9; position: relative; transition: background .18s ease; display: inline-block;
}
.alc-switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s ease;
}
.alc-switch input:checked + .alc-switch__track { background: var(--alc-azul); }
.alc-switch input:checked + .alc-switch__track::after { transform: translateX(20px); }
.alc-switch input:disabled + .alc-switch__track { background: var(--alc-azul); opacity: .55; }
.alc-switch input:focus-visible + .alc-switch__track { outline: 2px solid var(--alc-azul); outline-offset: 2px; }

@media (max-width: 640px) {
  .alc-consent__banner { padding: 16px; border-radius: 12px; }
  .alc-consent__actions { justify-content: stretch; }
  .alc-btn { flex: 1 1 auto; }
  .alc-btn--ghost { flex-basis: 100%; text-align: left; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #alc-consent.is-visible { animation: none; }
}
