/* Cookie banner — filho direto do <body>, fora de qualquer wrapper com overflow (ver CLAUDE.md) */
.ck-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: min(340px, calc(100vw - 32px));
  box-sizing: border-box;
  overflow: hidden;
  z-index: 2147483000;
  padding: 20px;
  border-radius: 16px;
  background: #4b5a32;
  color: #f3efdd;
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  box-shadow: 0 16px 40px rgba(58, 36, 18, 0.28);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.ck-banner[hidden] { display: none; }

.ck-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.ck-text { flex: 1 1 auto; min-width: 0; }
.ck-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #f3efdd;
}
.ck-desc { margin: 0; color: #eae6cf; }
.ck-desc a { color: #f3efdd; text-decoration: underline; text-underline-offset: 3px; }
.ck-desc a:hover { color: #ffffff; }

.ck-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Botões: o banner é escuro, por isso o primário é claro (.btn--white) — nunca da cor do fundo */
.ck-btn {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  cursor: pointer;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1.5px solid #f3efdd;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.ck-btn--white { background: #f3efdd; color: #3a2412; }
.ck-btn--white:hover { background: #ffffff; border-color: #ffffff; }
.ck-btn--ghost { background: transparent; color: #f3efdd; }
.ck-btn--ghost:hover { background: rgba(243, 239, 221, 0.14); }
.ck-btn:focus-visible,
.ck-switch input:focus-visible + .ck-slider {
  outline: 3px solid #d98a2b;
  outline-offset: 2px;
}

/* Painel de preferências */
.ck-panel { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(243, 239, 221, 0.3); }
.ck-panel[hidden] { display: none; }
.ck-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}
.ck-row + .ck-row { border-top: 1px solid rgba(243, 239, 221, 0.18); }
.ck-row-title { display: block; font-weight: 600; color: #f3efdd; }
.ck-row-desc { display: block; font-size: 14px; color: #eae6cf; }
.ck-panel-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

.ck-switch { position: relative; flex: 0 0 auto; display: inline-block; width: 46px; height: 26px; }
.ck-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ck-switch input:disabled { cursor: not-allowed; }
.ck-slider {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  background: rgba(243, 239, 221, 0.3);
  transition: background 0.2s;
  pointer-events: none;
}
.ck-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f3efdd;
  transition: transform 0.2s;
}
.ck-switch input:checked + .ck-slider { background: #c8641d; }
.ck-switch input:checked + .ck-slider::before { transform: translateX(20px); }
.ck-switch input:disabled + .ck-slider { opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
  .ck-btn, .ck-slider, .ck-slider::before { transition: none; }
}
