/* CredX cookie consent: the presentation layer. credco.co.uk's banner in CredX colours and type.
   No build step, no dependencies. All values are CredX brand tokens; change them here. */

.cc {
  --cc-dark: #1a1a1a;
  --cc-dark-deep: #000000;
  --cc-yellow: #fbbb4e;
  --cc-cyan: #008189;
  --cc-light: #e6e6e6;
  --cc-muted: #a9a9a9;
  --cc-body: #474544;
  --cc-line: #e3e3e3;
  --cc-track: #d5d5d5;
  --cc-radius: 30px;
  --cc-radius-sm: 50px;
  --cc-gutter: 26px;
  --cc-max: 1320px;
  --cc-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  font-family: 'Aller Regular', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Nothing renders until the script decides consent is required. */
.cc[hidden] { display: none !important; }

@keyframes cc-rise { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes cc-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .cc *, .cc *::before, .cc *::after { animation: none !important; transition: none !important; }
}

/* ---------- backdrop ---------- */

.cc__backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(26, 26, 26, 0.55);
  backdrop-filter: blur(2px);
  animation: cc-fade .25s ease both;
}

/* ---------- banner ---------- */

.cc__banner {
  position: fixed;
  z-index: 2147483001;
  left: var(--cc-gutter);
  right: var(--cc-gutter);
  bottom: var(--cc-gutter);
  max-width: var(--cc-max);
  margin: 0 auto;
  padding: 34px 38px;
  background: var(--cc-dark);
  border-radius: var(--cc-radius);
  border-top: 4px solid var(--cc-yellow);
  box-shadow: var(--cc-shadow);
  animation: cc-rise .34s cubic-bezier(.2, .7, .3, 1) both;
}

.cc__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: center;
}

.cc__eyebrow {
  display: block;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--cc-yellow);
}

.cc__copy {
  margin: 14px 0 0;
  max-width: 68ch;
  font-family: 'Aller Light', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--cc-light);
  text-wrap: pretty;
}

.cc__links {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--cc-muted);
}
.cc__links a {
  color: var(--cc-yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cc__links a:hover { color: #fff; }

.cc__actions { display: flex; align-items: center; gap: 12px; }

/* ---------- buttons ---------- */

.cc__btn {
  height: 52px;
  padding: 0 28px;
  border: none;
  border-radius: var(--cc-radius-sm);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.cc__btn:focus-visible { outline: 3px solid var(--cc-yellow); outline-offset: 3px; }

.cc__btn--primary { background: var(--cc-cyan); color: #fff; }
.cc__btn--primary:hover { background: #fff; color: var(--cc-dark); }

/* Reject must be as prominent and as few clicks as Accept (ICO/PECR). */
.cc__btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.cc__btn--ghost:hover { border-color: #fff; }

.cc__btn--link {
  height: 52px;
  padding: 0 8px;
  background: transparent;
  color: var(--cc-light);
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cc__btn--link:hover { color: var(--cc-yellow); }

/* ---------- preferences dialog ---------- */

.cc__dialog-wrap {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  display: grid;
  place-items: center;
  padding: 32px;
}

.cc__dialog {
  width: min(680px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 40px;
  background: #fff;
  color: var(--cc-dark);
  border-radius: var(--cc-radius);
  border-top: 4px solid var(--cc-yellow);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  animation: cc-rise .34s cubic-bezier(.2, .7, .3, 1) both;
}
.cc__dialog .cc__eyebrow { color: var(--cc-cyan); }

.cc__dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.cc__title {
  margin: 16px 0 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 400;
  color: var(--cc-dark);
}

.cc__intro {
  margin: 18px 0 30px;
  font-family: 'Aller Light', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--cc-body);
  text-wrap: pretty;
}

.cc__close {
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--cc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--cc-dark);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.cc__close:hover { border-color: var(--cc-dark); }
.cc__close:focus-visible { outline: 3px solid var(--cc-cyan); outline-offset: 2px; }

.cc__groups { display: grid; gap: 14px; }

.cc__group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--cc-line);
  border-radius: 20px;
}

.cc__group-name { display: block; font-size: 17px; color: var(--cc-dark); }
.cc__group-desc {
  margin: 8px 0 0;
  font-family: 'Aller Light', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--cc-body);
}

.cc__locked {
  padding: 9px 16px;
  border-radius: 999px;
  background: #f3f3f3;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #6b6b6b;
  white-space: nowrap;
}

/* ---------- toggle ---------- */

.cc__switch {
  width: 62px;
  height: 34px;
  flex: none;
  padding: 3px;
  display: flex;
  justify-content: flex-start;
  border: none;
  border-radius: 999px;
  background: var(--cc-track);
  cursor: pointer;
  transition: background .18s ease;
}
.cc__switch[aria-checked="true"] { justify-content: flex-end; background: var(--cc-cyan); }
.cc__switch:focus-visible { outline: 3px solid var(--cc-cyan); outline-offset: 3px; }

.cc__knob {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.cc__dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cc__dialog-actions .cc__btn { height: 54px; padding: 0 28px; }
.cc__dialog-actions .cc__btn--primary:hover { background: var(--cc-dark); color: #fff; }
.cc__dialog-actions .cc__btn--ghost { color: var(--cc-dark); border-color: var(--cc-dark); }
.cc__dialog-actions .cc__btn--ghost:hover { background: var(--cc-dark); color: #fff; }
.cc__dialog-actions .cc__btn--link { padding: 0 10px; color: var(--cc-body); }
.cc__dialog-actions .cc__btn--link:hover { color: var(--cc-dark); }
.cc__dialog .cc__btn:focus-visible { outline-color: var(--cc-cyan); }

/* ---------- persistent re-open pill ---------- */

.cc__pill {
  position: fixed;
  z-index: 2147482999;
  left: var(--cc-gutter);
  bottom: var(--cc-gutter);
  height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--cc-dark);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  animation: cc-fade .3s ease both;
}
.cc__pill:hover { background: var(--cc-dark-deep); }
.cc__pill:focus-visible { outline: 3px solid var(--cc-yellow); outline-offset: 3px; }

.cc__pill-dot {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cc-yellow);
}
.cc__pill-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc-dark); }

.cc__pill-label {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #fff;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .cc { --cc-gutter: 14px; }
  .cc__banner { padding: 26px 22px; border-radius: 20px; }
  .cc__row { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cc__actions { display: grid; gap: 10px; }
  .cc__btn, .cc__btn--link { width: 100%; }
  .cc__dialog { padding: 26px 22px; max-height: 90vh; border-radius: 20px; }
  .cc__title { font-size: 24px; }
  .cc__group { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .cc__dialog-actions .cc__btn { width: 100%; }
  .cc__pill { left: 14px; bottom: 14px; height: 44px; }
}
