/* ClickInns Consent — banner + preferences center.
 *
 * Scoped under .cn so it reads the theme design tokens (tokens.css) and flips
 * with the .cn.dark toggle. Reuses the theme's own .btn / .btn-blue /
 * .btn-ghost / .btn-sm / .ulink (defined in base.css, loaded site-wide) so the
 * buttons are pixel-identical to the rest of the site; only the banner/modal/
 * toggle chrome lives here. Design approved 2026-08-13 (artifact 6ca4553e).
 */

.cin-consent { font-family: Raleway, system-ui, sans-serif; }

/* ── Docked bottom banner ─────────────────────────────────────────────── */
.cn .ci-cc {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none; /* transparent gutter never blocks the page */
}
.cn .ci-cc[hidden] { display: none; }

.cn .ci-cc__card {
  pointer-events: auto;
  width: min(1120px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 22px 48px -24px rgba(6, 14, 22, .5), 0 6px 16px -10px rgba(6, 14, 22, .32);
  padding: 18px 20px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  /* entrance */
  transform: translateY(14px);
  opacity: 0;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .45s ease;
}
.cn .ci-cc.is-in .ci-cc__card { transform: none; opacity: 1; }
.cn.dark .ci-cc__card { box-shadow: 0 22px 54px -22px rgba(0, 0, 0, .7), 0 6px 18px -10px rgba(0, 0, 0, .6); }
.cn .ci-cc__card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
}

.cn .ci-cc__icon {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--blue-tint);
  color: var(--blue-deep);
  display: grid; place-items: center;
  border: 1px solid var(--blue-soft);
}
.cn.dark .ci-cc__icon { border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.cn .ci-cc__icon svg { width: 22px; height: 22px; }

.cn .ci-cc__body { flex: 1; min-width: 0; }
.cn .ci-cc__eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--mute);
}
.cn .ci-cc__title {
  font-family: Montserrat, system-ui, sans-serif; font-weight: 600;
  font-size: 17px; line-height: 1.2; margin: 5px 0 0; color: var(--ink);
}
.cn .ci-cc__text {
  font-size: 13px; line-height: 1.55; color: var(--ink); opacity: .86;
  margin: 6px 0 0; max-width: 64ch;
}
.cn .ci-cc__text .ulink,
.cn .ci-cc__subrow .ulink { font-size: 13px; }

.cn .ci-cc__actions {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; justify-content: flex-end;
}
.cn .ci-cc__subrow {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cn .ci-cc__subrow .ulink svg,
.cn .ci-cc__manage svg { width: 13px; height: 13px; }

/* The theme's .ulink is authored for <a>; our Manage / Do-Not-Sell actions are
   <button>s (correct semantics), so neutralize native button chrome and restore
   the underlined-link look. color + hover come from .ulink. */
.cn .ci-cc button.ulink {
  -webkit-appearance: none; appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  padding: 0 0 1px;
  margin: 0;
  line-height: 1;
}

@media (max-width: 640px) {
  .cn .ci-cc { padding: 10px; }
  .cn .ci-cc__card { flex-direction: column; gap: 14px; }
  .cn .ci-cc__actions { width: 100%; flex-direction: column; align-items: stretch; }
  .cn .ci-cc__actions .btn { width: 100%; }
  .cn .ci-cc__manage { order: 3; justify-content: center; text-align: center; }
}

/* ── Preferences center (modal) ───────────────────────────────────────── */
.cn .ci-cc-scrim {
  position: fixed; inset: 0;
  z-index: 2147483001;
  background: color-mix(in srgb, #060E16 58%, transparent);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s ease;
}
.cn .ci-cc-scrim.is-in { opacity: 1; }
.cn .ci-cc-scrim[hidden] { display: none; }
.cn.dark .ci-cc-scrim { background: color-mix(in srgb, #000 62%, transparent); }

.cn .ci-prefs {
  width: 100%; max-width: 520px; max-height: calc(100% - 20px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, .6);
  scrollbar-width: thin;
  transform: translateY(10px) scale(.99);
  transition: transform .2s ease;
}
.cn .ci-cc-scrim.is-in .ci-prefs { transform: none; }

.cn .ci-prefs__head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); position: relative; }
.cn .ci-prefs__eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--blue-deep);
}
.cn .ci-prefs__title {
  font-family: Montserrat, system-ui, sans-serif; font-weight: 600;
  font-size: 20px; margin: 7px 0 0; color: var(--ink);
}
.cn .ci-prefs__intro { font-size: 12.5px; line-height: 1.55; color: var(--ink); opacity: .82; margin: 8px 0 0; max-width: 52ch; }
.cn .ci-prefs__close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--paper); color: var(--mute);
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.cn .ci-prefs__close:hover { border-color: var(--ink); color: var(--ink); }
.cn .ci-prefs__close svg { width: 15px; height: 15px; }

.cn .ci-prefs__list { padding: 8px 22px; }
.cn .ci-cat { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cn .ci-cat:last-child { border-bottom: 0; }
.cn .ci-cat__ico {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--blue-deep);
  display: grid; place-items: center;
}
.cn .ci-cat__ico svg { width: 17px; height: 17px; }
.cn .ci-cat__main { flex: 1; min-width: 0; }
.cn .ci-cat__name {
  font-family: Montserrat, system-ui, sans-serif; font-weight: 600; font-size: 14px;
  color: var(--ink); display: flex; align-items: center; gap: 9px;
}
.cn .ci-cat__badge {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 34%, transparent);
  border-radius: 999px; padding: 3px 8px;
}
.cn .ci-cat__desc { font-size: 12px; line-height: 1.5; color: var(--ink); opacity: .78; margin: 4px 0 0; }
.cn .ci-cat__ctl { flex: 0 0 auto; padding-top: 2px; }

/* toggle switch — native checkbox, pure CSS */
.cn .sw-toggle { position: relative; width: 46px; height: 26px; display: inline-block; flex: 0 0 auto; }
.cn .sw-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cn .sw-toggle input:disabled { cursor: not-allowed; }
.cn .sw-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--line-2); border: 1px solid var(--line);
  transition: background .18s, border-color .18s;
}
.cn .sw-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .18s; pointer-events: none;
}
.cn .sw-toggle input:checked ~ .sw-track { background: var(--blue-deep); border-color: var(--blue-deep); }
.cn .sw-toggle input:checked ~ .sw-knob { transform: translateX(20px); }
.cn .sw-toggle input:disabled ~ .sw-track { opacity: .6; }
.cn .sw-toggle input:focus-visible ~ .sw-track { outline: 2px solid var(--blue-deep); outline-offset: 2px; }

.cn .ci-prefs__foot { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.cn .ci-prefs__foot .btn { flex: 1; min-width: 120px; }

@media (prefers-reduced-motion: reduce) {
  .cn .ci-cc__card,
  .cn .ci-cc-scrim,
  .cn .ci-prefs { transition: none; transform: none; opacity: 1; }
}
