/* ============================================================
   consent.css — Banner e painel de preferências de cookies
   Achei no Clique · LGPD + Google Consent Mode v2
   Escopo isolado sob .anc-cc* — não altera styles.css.
   ============================================================ */

.anc-cc {
  --anc-cc-azul: #305c7d;
  --anc-cc-azul-fundo: #1f3e57;
  --anc-cc-terracota: #c06c50;
  --anc-cc-creme: #f5f3ef;
  --anc-cc-texto: #1f2d3a;
  --anc-cc-texto-suave: #47535f;
  --anc-cc-borda: #d9dfe4;
  --anc-cc-z: 2147483000;
}

.anc-cc *,
.anc-cc *::before,
.anc-cc *::after { box-sizing: border-box; }

.anc-cc__banner,
.anc-cc__panel,
.anc-cc__reopen {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--anc-cc-texto);
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* ---------- Banner ---------- */
.anc-cc__banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--anc-cc-z);
  max-width: 100%;
  background: #fff;
  border-top: 3px solid var(--anc-cc-azul);
  box-shadow: 0 -8px 30px rgba(20, 32, 45, .18);
  padding: 18px clamp(16px, 4vw, 40px);
}
.anc-cc__banner[hidden] { display: none; }

.anc-cc__box {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.anc-cc__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--anc-cc-azul-fundo);
}
.anc-cc__text {
  margin: 0;
  font-size: .92rem;
}
.anc-cc__link {
  color: var(--anc-cc-azul);
  text-decoration: underline;
}
.anc-cc__link:hover { color: var(--anc-cc-azul-fundo); }

.anc-cc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Botões ---------- */
.anc-cc__btn {
  font: inherit;
  font-weight: 700;
  border-radius: 10px;
  padding: 11px 18px;
  min-height: 44px;
  cursor: pointer;
  border: 2px solid var(--anc-cc-azul);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.anc-cc__btn--primary {
  background: var(--anc-cc-azul);
  color: #fff;
}
.anc-cc__btn--primary:hover {
  background: var(--anc-cc-azul-fundo);
  border-color: var(--anc-cc-azul-fundo);
}
.anc-cc__btn--ghost {
  background: transparent;
  color: var(--anc-cc-azul-fundo);
}
.anc-cc__btn--ghost:hover { background: var(--anc-cc-creme); }

.anc-cc__btn:focus-visible,
.anc-cc__toggle:focus-visible,
.anc-cc__close:focus-visible,
.anc-cc__reopen:focus-visible,
.anc-cc__link:focus-visible {
  outline: 3px solid var(--anc-cc-terracota);
  outline-offset: 2px;
}

/* ---------- Overlay + painel ---------- */
.anc-cc__overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--anc-cc-z) + 1);
  background: rgba(20, 32, 45, .55);
}
.anc-cc__overlay[hidden] { display: none; }

.anc-cc__panel {
  position: fixed;
  z-index: calc(var(--anc-cc-z) + 2);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px));
  max-width: 100%;
  max-height: min(90vh, 720px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  padding: clamp(18px, 4vw, 28px);
  box-shadow: 0 20px 60px rgba(20, 32, 45, .35);
}
.anc-cc__panel[hidden] { display: none; }
.anc-cc__panel:focus { outline: none; }

.anc-cc__panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.anc-cc__close {
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  background: transparent;
  border: 0;
  color: var(--anc-cc-azul-fundo);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
}
.anc-cc__close:hover { background: var(--anc-cc-creme); }

/* ---------- Categorias ---------- */
.anc-cc__cat {
  border: 1px solid var(--anc-cc-borda);
  border-radius: 10px;
  padding: 14px;
  margin-top: 14px;
}
.anc-cc__cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}
.anc-cc__cat-name {
  color: var(--anc-cc-azul-fundo);
}
.anc-cc__cat-desc {
  margin: 8px 0 0;
  font-size: .85rem;
  font-weight: 400;
  color: var(--anc-cc-texto-suave);
}
.anc-cc__toggle {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--anc-cc-azul);
  cursor: pointer;
}
.anc-cc__toggle:disabled {
  cursor: default;
  opacity: .65;
}

.anc-cc__panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.anc-cc__panel-actions .anc-cc__btn { flex: 1 1 auto; }

/* ---------- Botão flutuante "Gerenciar cookies" ---------- */
.anc-cc__reopen {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: calc(var(--anc-cc-z) - 1);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  color: var(--anc-cc-azul-fundo);
  background: #fff;
  border: 1px solid var(--anc-cc-azul);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(20, 32, 45, .18);
}
.anc-cc__reopen[hidden] { display: none; }
.anc-cc__reopen:hover { background: var(--anc-cc-creme); }

/* ---------- Responsivo ---------- */
@media (min-width: 720px) {
  .anc-cc__box {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .anc-cc__box > .anc-cc__title { flex: 1 1 100%; }
  .anc-cc__text { flex: 1 1 320px; }
  .anc-cc__actions {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .anc-cc__actions .anc-cc__btn { flex: 1 1 100%; }
  .anc-cc__panel {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anc-cc__btn { transition: none; }
}
