/* ---- Banner de cookies -----------------------------------------------------
   Aparece em todo o site — páginas do Elementor e telas da fundação — então
   não depende da `velcap-ui.css`: lê as cores do Kit com o valor do Figma de
   reserva, e tudo vive sob o id `#velcap-consent`, que vence o Kit e o tema
   sem !important.

   Botão declara a própria cor em todos os estados: o `reset.css` do
   Elementor pinta `button:hover` de rosa em (0,2,0). Medidas em rem; borda
   fina em px (ver CLAUDE.md).
   -------------------------------------------------------------------------- */

#velcap-consent {
  --vcc-primary: var(--e-global-color-primary, #3B5146);
  --vcc-accent:  var(--e-global-color-accent, #9EB55D);
  --vcc-text:    var(--e-global-color-text, #1C1C1C);
  --vcc-surface: var(--e-global-color-secondary, #EFECE4);
  --vcc-muted:   #5f5f58;
  --vcc-line:    #dcdcd4;
  --vcc-radius:  var(--big-radius, 1rem);
  --vcc-radius-btn: var(--default-radius, .5rem);
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--vcc-text);

  /* O contêiner não ocupa espaço: tudo dentro dele é fixo ou escondido. As
     declarações são explícitas porque ele é `body > div`, e regra de página
     pega isso — o CSS da página do quiz no Elementor
     (`body.elementor-page-274 > div { display: flex; height: 100vh }`) o
     transformava numa faixa vazia da altura da tela. O id vence sem
     !important. */
  display: block;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}

/* Fundo escurecido enquanto o banner pede a escolha: a página não recebe
   toque até a resposta (ver Velcap_Core_Consent). */
#velcap-consent .vcc__backdrop {
  position: fixed;
  z-index: 99997;
  inset: 0;
  background: rgba(28, 28, 28, .45);
  animation: vcc-fade .2s ease-out;
}

/* Banner: no celular, folha presa à base da tela; no computador, cartão
   centralizado embaixo. Centralizado por left/right + margin auto, e não por
   transform, que a animação usa. */
#velcap-consent .vcc__banner {
  position: fixed;
  z-index: 99998;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: 40rem;
  max-height: calc(100vh - 3rem);
  margin: 0 auto;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 1.75rem 2rem;
  background: #fff;
  border-radius: var(--vcc-radius);
  box-shadow: 0 .75rem 2.5rem rgba(28, 28, 28, .2);
  animation: vcc-up .25s ease-out;
}
#velcap-consent .vcc__banner:focus {
  outline: none;
}
#velcap-consent .vcc__banner.is-nudge {
  animation: vcc-nudge .45s ease-in-out;
}
#velcap-consent .vcc__banner .vcc__title {
  font-size: 1.5rem;
}
#velcap-consent .vcc__banner .vcc__text {
  margin-bottom: .75rem;
  font-size: .9375rem;
  color: var(--vcc-text);
}

/* Texto completo, aberto por quem quiser. */
#velcap-consent .vcc__more {
  margin: 0 0 1.25rem;
}
#velcap-consent .vcc__more summary {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  list-style: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--vcc-primary);
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
#velcap-consent .vcc__more summary::-webkit-details-marker {
  display: none;
}
#velcap-consent .vcc__more summary::after {
  content: "";
  width: .4rem;
  height: .4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-.1rem) rotate(45deg);
  transition: transform .15s ease;
}
#velcap-consent .vcc__more[open] summary::after {
  transform: translateY(.1rem) rotate(-135deg);
}
#velcap-consent .vcc__more summary:focus-visible {
  outline: 2px solid var(--vcc-primary);
  outline-offset: 2px;
}
#velcap-consent .vcc__more p {
  margin: .75rem 0 0;
  font-size: .8125rem;
  color: var(--vcc-muted);
}
#velcap-consent .vcc__more a {
  color: var(--vcc-primary);
  text-decoration: underline;
}

/* Aceitar em destaque; Recusar e Personalizar do mesmo tamanho de toque,
   logo ao lado — recusar não pode ser mais difícil que aceitar. */
#velcap-consent .vcc__banner .vcc__actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  grid-template-areas: "reject prefs accept";
  gap: .5rem;
}
#velcap-consent .vcc__btn--accept { grid-area: accept; }
#velcap-consent .vcc__btn--reject { grid-area: reject; }
#velcap-consent .vcc__btn--prefs  { grid-area: prefs; }
#velcap-consent .vcc__banner .vcc__btn {
  min-height: 3rem;
}
#velcap-consent .vcc__banner .vcc__btn--accept {
  font-size: 1rem;
}

@keyframes vcc-fade {
  from { opacity: 0; }
}
@keyframes vcc-up {
  from { opacity: 0; transform: translateY(1.5rem); }
}
@keyframes vcc-nudge {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-.5rem); }
  60% { transform: translateY(0); }
  80% { transform: translateY(-.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  #velcap-consent .vcc__backdrop,
  #velcap-consent .vcc__banner,
  #velcap-consent .vcc__banner.is-nudge {
    animation: none;
  }
}
#velcap-consent .vcc__title {
  margin: 0 0 .5rem;
  font-family: "new-spirit", serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--vcc-primary);
  text-transform: none;
  letter-spacing: 0;
}
#velcap-consent .vcc__text,
#velcap-consent .vcc__cat-text {
  margin: 0 0 1.25rem;
  font-size: .875rem;
  color: var(--vcc-muted);
}
#velcap-consent .vcc__text a {
  color: var(--vcc-primary);
  text-decoration: underline;
}

/* Os três com o mesmo tamanho: recusar não pode ser menor que aceitar. */
#velcap-consent .vcc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
#velcap-consent .vcc__btn {
  flex: 1 1 8rem;
  margin: 0;
  padding: .75rem 1rem;
  border: 1px solid var(--vcc-accent);
  border-radius: var(--vcc-radius-btn);
  background: var(--vcc-accent);
  color: #fff;
  font-family: inherit;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
#velcap-consent .vcc__btn:hover,
#velcap-consent .vcc__btn:focus-visible {
  background: var(--vcc-primary);
  border-color: var(--vcc-primary);
  color: var(--vcc-accent);
}
#velcap-consent .vcc__btn--ghost {
  background: #fff;
  border-color: var(--vcc-primary);
  color: var(--vcc-primary);
}
#velcap-consent .vcc__btn--ghost:hover,
#velcap-consent .vcc__btn--ghost:focus-visible {
  background: var(--vcc-surface);
  border-color: var(--vcc-primary);
  color: var(--vcc-primary);
}
#velcap-consent .vcc__btn:focus-visible,
#velcap-consent .vcc__reopen:focus-visible,
#velcap-consent .vcc__toggle:focus-visible {
  outline: 2px solid var(--vcc-primary);
  outline-offset: 2px;
}

/* Preferências: aí sim modal, porque é uma decisão. */
#velcap-consent .vcc__dialog {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(28, 28, 28, .45);
}
#velcap-consent .vcc__panel {
  width: min(32rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 2rem;
  background: #fff;
  border-radius: var(--vcc-radius);
}
#velcap-consent .vcc__cat {
  padding: 1rem 0 0;
  border-top: 1px solid var(--vcc-line);
}
#velcap-consent .vcc__cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 .25rem;
  cursor: pointer;
}
#velcap-consent .vcc__cat-name {
  font-weight: 700;
  color: var(--vcc-text);
}
#velcap-consent .vcc__always {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--vcc-accent);
}
#velcap-consent .vcc__cat-text {
  margin-bottom: 1rem;
}
#velcap-consent .vcc__panel .vcc__actions {
  padding-top: 1rem;
  border-top: 1px solid var(--vcc-line);
}

/* Chave liga/desliga, a partir do checkbox nativo (teclado e leitor de tela
   continuam funcionando). */
#velcap-consent .vcc__toggle {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  border: 0;
  border-radius: 1rem;
  background: var(--vcc-line);
  cursor: pointer;
  transition: background-color .15s ease;
}
#velcap-consent .vcc__toggle::after {
  content: "";
  position: absolute;
  top: .1875rem;
  left: .1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
#velcap-consent .vcc__toggle:checked {
  background: var(--vcc-accent);
}
#velcap-consent .vcc__toggle:checked::after {
  transform: translateX(1.25rem);
}

/* Rever a escolha: discreto, no canto oposto ao WhatsApp/atendimento. */
#velcap-consent .vcc__reopen {
  position: fixed;
  z-index: 99997;
  left: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--vcc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--vcc-primary);
  box-shadow: 0 .25rem .75rem rgba(28, 28, 28, .12);
  cursor: pointer;
}
#velcap-consent .vcc__reopen:hover {
  background: var(--vcc-surface);
  color: var(--vcc-primary);
  border-color: var(--vcc-line);
}
#velcap-consent .vcc__reopen svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
#velcap-consent .vcc__reopen svg circle {
  fill: currentColor;
  stroke: none;
}

@media (max-width: 767px) {
  #velcap-consent .vcc__banner {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    max-height: 88vh;
    max-height: 88dvh;
    padding: 1.75rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    border-radius: var(--vcc-radius) var(--vcc-radius) 0 0;
  }
  #velcap-consent .vcc__banner .vcc__title {
    font-size: 1.375rem;
  }
  #velcap-consent .vcc__banner .vcc__actions {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "accept accept" "reject prefs";
  }
  #velcap-consent .vcc__panel {
    padding: 1.5rem;
  }
}

/* Por último, de propósito: mesmo peso (1,1,0) das regras com display acima,
   e vence por ordem — sem !important. */
#velcap-consent [hidden] {
  display: none;
}
