/* ══════════════════════════════════════════════════════════════════════
 * Cookie consent
 *
 * Bottom-left card rather than a full-width bar: it has to be noticeable
 * without covering the first thing a visitor came to read, and the hero
 * CTA sits centre-right on most pages.
 *
 * Self-contained — this loads on every page including ones that never
 * enqueue ic-v3.css, so it cannot rely on the v3 tokens.
 * ═════════════════════════════════════════════════════════════════════ */

.ic-consent {
  position: fixed;
  z-index: 2000;
  bottom: 20px;
  left: 20px;
  width: min(420px, calc(100vw - 40px));
  font-family: 'Open Sans', Arial, sans-serif;
}

.ic-consent__panel {
  padding: 24px;
  border: 1px solid rgba(17, 20, 79, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(9, 12, 48, 0.24);
  opacity: 0;
  translate: 0 14px;
  transition: opacity .32s ease, translate .32s cubic-bezier(0.22, 1, 0.36, 1);
}

.ic-consent.is-open .ic-consent__panel {
  opacity: 1;
  translate: 0 0;
}

/* The brand's accent, used as a hairline so the card reads as ours. */
.ic-consent__panel::before {
  display: block;
  width: 46px;
  height: 4px;
  margin-bottom: 16px;
  border-radius: 99px;
  background: linear-gradient(90deg, #5234de, #365ef1);
  content: "";
}

.ic-consent__title {
  margin: 0 0 8px;
  color: #062f5d;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
}

.ic-consent__body {
  margin: 0 0 18px;
  color: #4a4f63;
  font-size: 13.5px;
  line-height: 21px;
}

.ic-consent__body a {
  color: #4941e3;
  text-decoration: underline;
  text-underline-offset: .16em;
  transition: color .25s ease;
}

.ic-consent__body a:hover,
.ic-consent__body a:focus-visible { color: #5234de; }

.ic-consent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ic-consent__btn {
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 99px;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, translate .25s ease, box-shadow .25s ease;
}

.ic-consent__btn--primary {
  background: #f80134;
  color: #fff;
}

.ic-consent__btn--primary:hover,
.ic-consent__btn--primary:focus-visible {
  translate: 0 -1px;
  box-shadow: 0 10px 24px rgba(248, 1, 52, 0.32);
}

.ic-consent__btn--ghost {
  border-color: rgba(17, 20, 79, 0.16);
  background: #fff;
  color: #062f5d;
}

.ic-consent__btn--ghost:hover,
.ic-consent__btn--ghost:focus-visible {
  border-color: #4941e3;
  color: #4941e3;
}

.ic-consent__link {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: #686c7d;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
  transition: color .25s ease;
}

.ic-consent__link:hover,
.ic-consent__link:focus-visible { color: #4941e3; }

/* ── Preferences ──────────────────────────────────────────────────── */

.ic-consent__prefs-title {
  margin: 0 0 14px;
  color: #062f5d;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 16px;
  font-weight: 650;
}

.ic-consent__list {
  max-height: min(46vh, 320px);
  margin: 0 0 18px;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.ic-consent__item + .ic-consent__item {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(17, 20, 79, 0.08);
}

.ic-consent__row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
}

.ic-consent__row input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
}

.ic-consent__switch {
  position: relative;
  display: block;
  width: 38px;
  height: 22px;
  margin-top: 2px;
  border-radius: 99px;
  background: #d5d8e4;
  transition: background .25s ease;
}

.ic-consent__switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(9, 12, 48, 0.3);
  content: "";
  transition: translate .25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ic-consent__row input:checked + .ic-consent__switch { background: #4941e3; }
.ic-consent__row input:checked + .ic-consent__switch::after { translate: 16px 0; }
.ic-consent__row input:disabled + .ic-consent__switch { background: #a8adc4; cursor: not-allowed; }

.ic-consent__row input:focus-visible + .ic-consent__switch {
  outline: 2px solid #4941e3;
  outline-offset: 2px;
}

.ic-consent__label strong {
  display: block;
  margin-bottom: 3px;
  color: #062f5d;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 13.5px;
  font-weight: 650;
}

.ic-consent__always {
  margin-left: 6px;
  color: #686c7d;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ic-consent__label span {
  color: #686c7d;
  font-size: 12.5px;
  line-height: 19px;
}

/* Footer control for changing a decision later. */
.ic-consent-reopen {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
  opacity: .85;
  transition: opacity .25s ease;
}

.ic-consent-reopen:hover,
.ic-consent-reopen:focus-visible { opacity: 1; }

@media (max-width: 575.98px) {
  .ic-consent {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }

  .ic-consent__panel { padding: 20px; }

  .ic-consent__actions > .ic-consent__btn { flex: 1 1 auto; }
}
