/* Consent28 — cookie consent (shared front asset).
 * First layer .cc28 (.cc28--bar | .cc28--box), preferences dialog
 * .cc28-prefs, footer/table trigger .cc28-link, policy-page table .cc28-table.
 * Theme through the --cc28-* properties — set them on `.cc28, .cc28-prefs`
 * in the site's sections.css, never by editing this file. The defaults read
 * the 28x design tokens with plain fallbacks and sit in :where() at zero
 * specificity: this file is linked at the end of <body>, after the site's
 * stylesheets, so the site's own `.cc28 {…}` must still win. */
:where(.cc28, .cc28-prefs, .cc28-table, .cc28-link) {
  --cc28-accent: var(--color-accent, #16a07f);
  --cc28-accent-ink: var(--color-accent-dark, var(--cc28-accent));
  --cc28-accent-contrast: var(--color-accent-contrast, #fff);
  --cc28-bg: var(--color-bg, #fff);
  --cc28-bg-alt: var(--color-bg-alt, #f5f6f8);
  --cc28-text: var(--color-text, #363d45);
  --cc28-heading: var(--color-heading, var(--cc28-text));
  --cc28-muted: var(--color-muted, #6b7480);
  --cc28-border: var(--color-border, #e4e7ec);
  --cc28-border-strong: var(--color-border-strong, #cfd4db);
  --cc28-font: var(--font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  --cc28-fs: 0.9375rem;
  --cc28-radius: var(--radius-lg, 16px);          /* box, dialog */
  --cc28-radius-control: var(--radius, 6px);      /* buttons */
  --cc28-btn-bg: var(--cc28-accent-ink);           /* all three buttons alike: no choice is pushed */
  --cc28-btn-text: var(--cc28-accent-contrast);
  --cc28-btn-border: var(--cc28-btn-bg);
  --cc28-switch-on: var(--cc28-accent-ink);
  --cc28-z: 1060;                                  /* above the chat launcher */
  --cc28-box-w: 34rem;
  --cc28-prefs-w: 42rem;
  --cc28-shadow: 0 -2px 12px rgba(18, 22, 27, .08), 0 -12px 40px rgba(18, 22, 27, .10);
  --cc28-shadow-box: 0 8px 24px rgba(18, 22, 27, .12), 0 24px 64px rgba(18, 22, 27, .16);
  --cc28-focus-ring: 0 0 0 2px var(--cc28-bg), 0 0 0 4px var(--cc28-accent-ink);
}

/* ---- first layer ---- */
.cc28 {
  position: fixed;
  z-index: var(--cc28-z);
  inset-inline: 0;
  bottom: 0;
  font-family: var(--cc28-font);
  font-size: var(--cc28-fs);
  line-height: 1.5;
  color: var(--cc28-text);
}
.cc28[hidden] { display: none; }
.cc28 *, .cc28 *::before, .cc28 *::after { box-sizing: border-box; }
.cc28__banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1rem;
  background: var(--cc28-bg);
  border-top: 1px solid var(--cc28-border);
  box-shadow: var(--cc28-shadow);
}
.cc28__body { flex: 1 1 28rem; min-width: 0; }
.cc28__title {
  margin: 0 0 0.25rem;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cc28-heading);
}
.cc28__text { margin: 0; }
.cc28__policy { color: var(--cc28-accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.cc28__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  flex: 1 1 100%;
}
.cc28--box .cc28__banner {
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--cc28-border);
}

/* ---- buttons: same weight for every choice ---- */
.cc28__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  color: var(--cc28-btn-text);
  background: var(--cc28-btn-bg);
  border: 1px solid var(--cc28-btn-border);
  border-radius: var(--cc28-radius-control);
  cursor: pointer;
  transition: filter 160ms ease;
}
.cc28__btn:hover { filter: brightness(1.08); }
.cc28__btn:focus-visible,
.cc28-prefs__close:focus-visible,
.cc28-switch:focus-visible,
.cc28-cat__cookies summary:focus-visible,
.cc28-link:focus-visible {
  outline: none;
  box-shadow: var(--cc28-focus-ring);
}

/* ---- preferences dialog ---- */
.cc28-prefs {
  width: min(var(--cc28-prefs-w), 100vw);
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto auto 0;
  padding: 0;
  color: var(--cc28-text);
  background: var(--cc28-bg);
  border: 0;
  border-radius: var(--cc28-radius) var(--cc28-radius) 0 0;
  box-shadow: var(--cc28-shadow-box);
  font-family: var(--cc28-font);
  font-size: var(--cc28-fs);
  line-height: 1.5;
}
.cc28-prefs *, .cc28-prefs *::before, .cc28-prefs *::after { box-sizing: border-box; }
.cc28-prefs::backdrop { background: rgba(18, 22, 27, .45); }
.cc28-prefs__form { display: flex; flex-direction: column; max-height: 100dvh; }
.cc28-prefs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--cc28-border);
}
.cc28-prefs__title {
  margin: 0;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cc28-heading);
}
.cc28-prefs__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: var(--cc28-muted);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.cc28-prefs__close:hover { color: var(--cc28-heading); background: var(--cc28-bg-alt); }
.cc28-prefs__close svg { width: 1.25rem; height: 1.25rem; }
.cc28-prefs__body { flex: 1 1 auto; overflow-y: auto; padding: 1rem; }
.cc28-prefs__intro { margin: 0 0 1rem; }
.cc28-prefs__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--cc28-border);
}

/* ---- categories ---- */
.cc28-cat { padding-block: 0.875rem; border-top: 1px solid var(--cc28-border); }
.cc28-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cc28-cat__title {
  margin: 0;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cc28-heading);
}
.cc28-cat__title label { cursor: pointer; }
.cc28-cat__always { font-size: 0.875rem; font-weight: 600; color: var(--cc28-accent-ink); white-space: nowrap; }
.cc28-cat__desc { margin: 0.25rem 0 0; color: var(--cc28-muted); }
.cc28-cat__cookies { margin-top: 0.5rem; }
.cc28-cat__cookies summary {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cc28-accent-ink);
  cursor: pointer;
  border-radius: 4px;
}
.cc28-cat__scroll { margin-top: 0.5rem; overflow-x: auto; }

/* ---- switch ---- */
.cc28-switch {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  background: var(--cc28-border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.cc28-switch::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(18, 22, 27, .25);
  transition: transform 160ms ease;
}
.cc28-switch:checked { background: var(--cc28-switch-on); }
.cc28-switch:checked::after { transform: translateX(1.25rem); }

/* ---- cookie tables (dialog + policy page) ---- */
.cc28-cookies { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.cc28-cookies th,
.cc28-cookies td { padding: 0.375rem 0.5rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--cc28-border); }
.cc28-cookies th { font-weight: 600; color: var(--cc28-heading); white-space: nowrap; }
.cc28-cookies code { font-size: inherit; color: inherit; background: none; padding: 0; white-space: nowrap; }
.cc28-table__title { margin-top: 1.5rem; }
.cc28-table__desc { color: var(--cc28-muted); }
.cc28-table .table-basic-wrap { overflow-x: auto; }

/* ---- "Cookie settings" link-button (footer, policy page) ---- */
.cc28-link {
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.cc28-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the chat launcher moves above an open bar */
html.has-cc28 .chat28 { --chat28-offset-y: calc(var(--cc28-bar-h, 0px) + 20px); }

@media (min-width: 576px) {
  .cc28__actions { grid-template-columns: repeat(3, auto); flex: 0 0 auto; }
  .cc28-prefs__actions { grid-template-columns: repeat(3, 1fr); }
  .cc28--box { inset-inline: auto; right: 1.25rem; bottom: 1.25rem; width: min(var(--cc28-box-w), calc(100vw - 2.5rem)); }
  .cc28--box .cc28__banner { padding: 1.25rem; border-radius: var(--cc28-radius); box-shadow: var(--cc28-shadow-box); }
  .cc28--box .cc28__actions { grid-template-columns: repeat(3, 1fr); }
  .cc28--notice .cc28__actions { grid-template-columns: auto; }
  .cc28-prefs { margin: auto; max-height: min(85dvh, 48rem); border-radius: var(--cc28-radius); }
  .cc28-prefs__form { max-height: min(85dvh, 48rem); }
  .cc28-prefs__head { padding: 1.25rem 1.5rem 1rem; }
  .cc28-prefs__body { padding: 1rem 1.5rem; }
  .cc28-prefs__actions { padding: 1rem 1.5rem 1.25rem; }
}
@media (min-width: 992px) {
  .cc28--bar .cc28__banner { flex-wrap: nowrap; padding: 1.25rem max(1.5rem, calc((100vw - 1320px) / 2)); }
}
@media (prefers-reduced-motion: reduce) {
  .cc28__btn, .cc28-switch, .cc28-switch::after { transition: none; }
}
