/* Banner e central de preferências de cookies.
   Sem dependência de biblioteca. Herda a fonte do site (Poppins no catallog.net).
   Os três botões compartilham a mesma classe de propósito: rejeitar não pode
   ficar visualmente mais fraco que aceitar.
   Referência: pacote jurídico, 60-implementacao/banner-cookies-wordpress/. */

.cc-fundo {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgb(0 0 0 / 40%);
}

@media (min-width: 640px) {
  .cc-fundo {
    align-items: center;
  }
}

.cc-caixa {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  color: #14181f;
  box-shadow: 0 18px 48px rgb(0 0 0 / 22%);
  font-size: 15px;
  line-height: 1.55;
}

.cc-titulo {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.cc-texto {
  margin: 0 0 16px;
  color: #3d4654;
}

.cc-link {
  color: inherit;
  text-underline-offset: 2px;
}

.cc-acoes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 640px) {
  .cc-acoes {
    flex-direction: row;
  }
  .cc-botao {
    flex: 1 1 0;
  }
}

.cc-botao {
  padding: 11px 16px;
  border: 1px solid #14181f;
  border-radius: 8px;
  background: #fff;
  color: #14181f;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cc-botao:hover {
  background: #14181f;
  color: #fff;
}

.cc-botao:focus-visible {
  outline: 2px solid #14181f;
  outline-offset: 2px;
}

.cc-lista {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.cc-item {
  padding: 12px 0;
  border-top: 1px solid #e4e7ec;
}

.cc-item-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-item-nome {
  font-weight: 600;
}

.cc-estado {
  color: #667085;
  font-size: 13px;
}

.cc-item-desc {
  margin: 4px 0 0;
  color: #3d4654;
  font-size: 14px;
}

/* Interruptor construído sobre checkbox real, para funcionar com teclado e
   leitor de tela sem ARIA extra. */
.cc-switch {
  appearance: none;
  position: relative;
  flex: none;
  width: 42px;
  height: 24px;
  margin: 0;
  border: 1px solid #c3c8d2;
  border-radius: 999px;
  background: #e4e7ec;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cc-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
  transition: transform 0.15s ease;
}

.cc-switch:checked {
  border-color: #14181f;
  background: #14181f;
}

.cc-switch:checked::after {
  transform: translateX(18px);
}

.cc-switch:focus-visible {
  outline: 2px solid #14181f;
  outline-offset: 2px;
}

/* Link permanente do rodapé */
.cc-abrir {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .cc-botao,
  .cc-switch,
  .cc-switch::after {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  .cc-caixa {
    background: #14181f;
    color: #f2f4f7;
  }
  .cc-texto,
  .cc-item-desc {
    color: #c3c8d2;
  }
  .cc-botao {
    border-color: #f2f4f7;
    background: #14181f;
    color: #f2f4f7;
  }
  .cc-botao:hover {
    background: #f2f4f7;
    color: #14181f;
  }
  .cc-botao:focus-visible,
  .cc-switch:focus-visible {
    outline-color: #f2f4f7;
  }
  .cc-item {
    border-top-color: #2b323d;
  }
  .cc-switch {
    border-color: #3d4654;
    background: #2b323d;
  }
  .cc-switch:checked {
    border-color: #f2f4f7;
    background: #f2f4f7;
  }
  .cc-switch:checked::after {
    background: #14181f;
  }
}

/* Rodapé do blog: o link de preferências segue o estilo dos demais links */
.catallog-footer-links .cc-abrir {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  transition: color 0.18s;
}

.catallog-footer-links .cc-abrir:hover,
.catallog-footer-links .cc-abrir:focus-visible {
  color: var(--cat-cyan);
}
