/**
 * Banner de consentimento — Centrorochas.
 *
 * Consome os presets do theme.json quando o tema está ativo e cai em valores
 * próprios quando não está: o plugin não pode depender do tema para ser legível,
 * já que a razão de ser plugin é sobreviver à troca dele.
 */

.cr-consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 99999;
  padding: 16px;
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
}

.cr-consent[hidden] { display: none; }

.cr-consent__caixa {
  max-width: 1100px;
  margin-inline: auto;
  background: var(--wp--preset--color--white, #fff);
  color: var(--wp--preset--color--ink, #252526);
  border-radius: 2px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cr-consent__titulo {
  font-family: var(--font-display, inherit);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 6px;
}

.cr-consent__descricao {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.cr-consent__descricao a {
  color: var(--wp--preset--color--brand-blue, #0033ff);
  text-decoration: underline;
}

.cr-consent__opcoes {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--wp--preset--color--alabaster, #f8f8f8);
  border-radius: 2px;
}

.cr-consent__opcoes[hidden] { display: none; }

.cr-consent__rotulo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.cr-consent__rotulo input[disabled] { cursor: default; }

.cr-consent__fixa {
  font-style: normal;
  font-size: 12px;
  font-weight: 400;
  color: var(--wp--preset--color--ink-body, #62718d);
}

.cr-consent__ajuda {
  margin: 4px 0 0 26px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--wp--preset--color--ink-body, #62718d);
}

.cr-consent__acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.cr-consent__btn {
  font-family: var(--font-display, inherit);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .15s ease;
}

.cr-consent__btn:hover { filter: brightness(.94); }
.cr-consent__btn[hidden] { display: none; }

.cr-consent__btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--brand-blue, #0033ff);
  outline-offset: 2px;
}

.cr-consent__btn--primario {
  background: var(--wp--preset--color--brand-green, #12b162);
  color: #fff;
}

.cr-consent__btn--secundario {
  background: transparent;
  border-color: var(--wp--preset--color--line-soft, #d9d9d9);
  color: inherit;
}

.cr-consent__btn--salvar {
  background: var(--wp--preset--color--hero-green, #005934);
  color: #fff;
}

.cr-consent__btn--texto {
  background: none;
  border: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  text-decoration: underline;
  padding: 12px 4px;
  margin-inline-end: auto;
  color: inherit;
}

.cr-consent-reabrir {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (min-width: 782px) {
  .cr-consent__caixa { padding: 28px 32px; }
  .cr-consent__opcoes { grid-template-columns: repeat(3, 1fr); }
}

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