/* Cookie Consent – self-contained, uses the theme colors when available */
.cc-box, .cc-box * { box-sizing: border-box; }
.cc-box {
  --cc-primary: var(--kp-primary, #1c3d5e);
  --cc-accent: var(--kp-accent, #1a9fa3);
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 2147483000;
  width: min(440px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 12px;
  background: #fff;
  color: #33475b;
  font: 400 14.5px/1.5 var(--kp-font, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  box-shadow: 0 2px 6px rgba(23, 50, 77, .10), 0 18px 50px rgba(23, 50, 77, .22);
  border: 1px solid #e2e8ef;
}
.cc-box[hidden] { display: none; }
.cc-box.cc-right { left: auto; right: 20px; }
.cc-box.cc-center { left: 50%; transform: translateX(-50%); width: min(720px, calc(100vw - 40px)); }
.cc-title { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: #17324d; }
.cc-text { margin: 0 0 14px; }
.cc-text a { color: var(--cc-primary); text-decoration: underline; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-btn {
  flex: 1 1 140px;
  min-height: 44px;
  padding: 10px 14px;
  border: 2px solid var(--cc-primary);
  border-radius: 8px;
  background: var(--cc-primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s;
}
.cc-btn:hover { filter: brightness(1.12); }
.cc-btn:focus-visible, .cc-link:focus-visible, .cc-switch input:focus-visible + span { outline: 3px solid var(--cc-accent); outline-offset: 2px; }
/* accept and reject have the same weight – refusing must be as easy as accepting */
.cc-btn--ghost { background: #fff; color: var(--cc-primary); }
.cc-link {
  flex: 1 1 100%;
  margin-top: 2px;
  padding: 8px;
  border: 0;
  background: none;
  color: #5f7184;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.cc-cats { margin: 0 0 14px; padding: 0; list-style: none; border-top: 1px solid #e2e8ef; }
.cc-cats[hidden] { display: none; }
.cc-cat { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #e2e8ef; }
.cc-cat strong { display: block; color: #17324d; }
.cc-cat small { display: block; color: #5f7184; font-size: 13px; line-height: 1.4; }
.cc-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; margin-top: 2px; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch span { position: absolute; inset: 0; border-radius: 999px; background: #c5cfd9; transition: background-color .15s; }
.cc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.cc-switch input:checked + span { background: var(--cc-accent); }
.cc-switch input:checked + span::after { transform: translateX(20px); }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:disabled + span { opacity: .6; }
.cc-reopen { text-align: center; padding: 10px 16px 14px; }
.cc-reopen button { border: 0; background: none; color: inherit; opacity: .8; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.cc-reopen button:hover { opacity: 1; }
@media (max-width: 575.98px) {
  .cc-box, .cc-box.cc-right, .cc-box.cc-center { left: 0; right: 0; bottom: 0; transform: none; width: 100%; max-height: 85vh; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 14px 14px 0 0; border-width: 1px 0 0; }
  .cc-btn { flex: 1 1 130px; }
}
@media (prefers-reduced-motion: reduce) { .cc-btn, .cc-switch span, .cc-switch span::after { transition: none; } }
