/* ============================================================
   CONSENTIMENTO DE COOKIES / LGPD
   Banner + painel de preferências. Markup injetado por js/consent.js
   ============================================================ */

/* ---------- botão de reabrir no rodapé ---------- */
.footer__prefs {
  font: inherit;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.66);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.25s;
}
.footer__prefs:hover { color: var(--green); }

/* ---------- banner ---------- */

.ck-banner {
  position: fixed;
  z-index: 260;
  left: 16px;
  right: 16px;
  bottom: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 640px;
  background: var(--ink);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.ck-banner.is-in { opacity: 1; transform: none; }
.ck-banner[hidden] { display: none; }

.ck-banner__label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}
.ck-banner__label::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}
.ck-banner__title {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  font-weight: 760;
  font-variation-settings: 'wdth' 106;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 10px;
}
.ck-banner__text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 20px;
}
.ck-banner__text a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ck-actions .ck-btn { flex: 1 1 auto; }

/* ---------- botões ---------- */

.ck-btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
}
.ck-btn:hover { transform: translateY(-1px); }
.ck-btn:active { transform: none; }
.ck-btn--accept { background: var(--green); color: var(--black); }
.ck-btn--accept:hover { background: #0ce99e; }
.ck-btn--reject {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
}
.ck-btn--reject:hover { border-color: rgba(255, 255, 255, 0.4); }
.ck-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.18);
}
.ck-btn--ghost:hover { color: var(--green); border-color: rgba(11, 214, 146, 0.5); }

/* ---------- painel de preferências ---------- */

.ck-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ck-modal[hidden] { display: none; }
.ck-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ck-modal.is-in .ck-modal__backdrop { opacity: 1; }

.ck-modal__box {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86vh, 780px);
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.ck-modal.is-in .ck-modal__box { opacity: 1; transform: none; }

.ck-modal__head {
  padding: clamp(22px, 3vw, 30px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
.ck-modal__title {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 790;
  font-variation-settings: 'wdth' 108;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding-right: 40px;
}
.ck-modal__sub {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
}
.ck-modal__sub a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

.ck-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.ck-modal__close:hover { background: rgba(255, 255, 255, 0.14); color: var(--green); }
.ck-modal__close svg { width: 15px; height: 15px; }

.ck-modal__body {
  padding: clamp(18px, 2.4vw, 24px) clamp(22px, 3vw, 30px);
  overflow-y: auto;
  flex: 1 1 auto;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}
/* idem: sem isto a tabela de cookies estica a largura do painel */
.ck-cat, .ck-cat__details { min-width: 0; }

/* ---------- categorias ---------- */

.ck-cat {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.ck-cat:last-child { margin-bottom: 0; }
.ck-cat__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
}
.ck-cat__name {
  font-weight: 740;
  font-size: 1rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ck-cat__tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}
.ck-cat__tag--on { color: var(--green); border-color: rgba(11, 214, 146, 0.45); }
.ck-cat__desc {
  margin-top: 7px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.68);
}

/* interruptor */
.ck-switch { position: relative; flex-shrink: 0; margin-top: 3px; }
.ck-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.ck-switch__track {
  display: block;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background-color 0.25s, border-color 0.25s;
  pointer-events: none;
}
.ck-switch__track::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s;
}
.ck-switch input:checked + .ck-switch__track {
  background: var(--green);
  border-color: var(--green);
}
.ck-switch input:checked + .ck-switch__track::after {
  transform: translateX(20px);
  background: var(--black);
}
.ck-switch input:focus-visible + .ck-switch__track {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.ck-switch input:disabled { cursor: not-allowed; }
.ck-switch input:disabled + .ck-switch__track { opacity: 0.55; }

/* detalhes do que é armazenado */
.ck-cat__toggle {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 640;
  letter-spacing: 0.02em;
  color: var(--green);
  background: none;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  text-align: left;
  padding: 11px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.25s;
}
.ck-cat__toggle:hover { background: rgba(255, 255, 255, 0.04); }
.ck-cat__toggle svg {
  width: 13px;
  height: 13px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.ck-cat__toggle[aria-expanded='true'] svg { transform: rotate(180deg); }

.ck-cat__details {
  padding: 0 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.ck-cat__details[hidden] { display: none; }
.ck-cat__empty {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.55);
  padding-top: 14px;
}

.ck-table-wrap { overflow-x: auto; padding-top: 14px; }
.ck-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 460px;
}
.ck-table th,
.ck-table td {
  text-align: left;
  vertical-align: top;
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ck-table th {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.ck-table td { color: rgba(255, 255, 255, 0.66); line-height: 1.5; }
.ck-table tr:last-child td { border-bottom: none; }
.ck-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--green);
  background: rgba(11, 214, 146, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* bloco sobre dados do formulário */
.ck-note {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(11, 214, 146, 0.28);
  background: rgba(11, 214, 146, 0.06);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}
.ck-note strong { color: var(--white); font-weight: 720; }
.ck-note a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

.ck-modal__foot {
  padding: clamp(18px, 2.4vw, 22px) clamp(22px, 3vw, 30px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.3);
}
.ck-modal__foot .ck-btn { flex: 1 1 auto; }

/* ---------- responsivo ---------- */

@media (max-width: 620px) {
  .ck-banner { left: 10px; right: 10px; bottom: 10px; max-width: none; }
  .ck-actions .ck-btn,
  .ck-modal__foot .ck-btn { flex: 1 1 100%; }
  .ck-cat__head { grid-template-columns: minmax(0, 1fr) auto; }
}

/* o botão flutuante do WhatsApp não pode brigar com o banner */
@media (max-width: 820px) {
  body.ck-open .whatsapp-float { opacity: 0; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ck-banner,
  .ck-modal__box,
  .ck-modal__backdrop {
    transition: none !important;
    transform: none !important;
  }
  .ck-btn:hover { transform: none; }
  .ck-switch__track::after { transition: none; }
}
