/* Credco cookie consent — presentation layer.
   No build step, no dependencies. Load after your site CSS.
   All values are Credco brand tokens; change them here, not inline. */

.cc {
  --cc-navy: #2C3E5A;
  --cc-navy-deep: #1B2434;
  --cc-pink: #ED2787;
  --cc-pink-dark: #c11e6f;
  --cc-light: #C6CEDC;
  --cc-muted: #93A0B7;
  --cc-body: #555555;
  --cc-line: #E3E6EB;
  --cc-track: #D5DAE2;
  --cc-radius: 24px;
  --cc-radius-sm: 12px;
  --cc-gutter: 26px;
  --cc-max: 1320px;
  --cc-shadow: 0 24px 60px rgba(12, 18, 30, 0.38);
  font-family: 'Poppins', 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(15, 21, 33, 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-navy);
  border-radius: var(--cc-radius);
  border-top: 4px solid var(--cc-pink);
  box-shadow: var(--cc-shadow);
  animation: cc-rise .34s cubic-bezier(.2, .7, .3, 1) both;
}

/* Optional corner variant: <div class="cc cc--corner"> */
.cc--corner .cc__banner {
  left: auto;
  width: min(430px, calc(100vw - (var(--cc-gutter) * 2)));
}

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

.cc__eyebrow {
  display: block;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cc-pink);
}

.cc__copy {
  margin: 14px 0 0;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--cc-light);
  text-wrap: pretty;
}

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

.cc__actions { display: flex; align-items: center; gap: 12px; }
.cc--corner .cc__actions { display: grid; gap: 10px; }

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

.cc__btn {
  height: 52px;
  padding: 0 26px;
  border: none;
  border-radius: var(--cc-radius-sm);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  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-pink); outline-offset: 3px; }

.cc__btn--primary { background: var(--cc-pink); color: #fff; }
.cc__btn--primary:hover { background: var(--cc-pink-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(198, 206, 220, 0.45);
}
.cc__btn--ghost:hover { border-color: #fff; }

.cc__btn--link {
  height: 52px;
  padding: 0 8px;
  background: transparent;
  color: var(--cc-light);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cc__btn--link:hover { color: #fff; }

/* ---------- 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-navy);
  border-radius: var(--cc-radius);
  border-top: 4px solid var(--cc-pink);
  box-shadow: 0 30px 80px rgba(12, 18, 30, 0.42);
  animation: cc-rise .34s cubic-bezier(.2, .7, .3, 1) both;
}

.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: 700;
  letter-spacing: -0.02em;
  color: var(--cc-navy);
}

.cc__intro {
  margin: 18px 0 30px;
  font-size: 15px;
  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: var(--cc-radius-sm);
  background: #fff;
  color: var(--cc-navy);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.cc__close:hover { border-color: var(--cc-navy); }
.cc__close:focus-visible { outline: 3px solid var(--cc-pink); 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: 16px;
}

.cc__group-name { display: block; font-size: 16px; font-weight: 700; color: var(--cc-navy); }
.cc__group-desc { margin: 8px 0 0; font-size: 14px; line-height: 1.65; color: var(--cc-body); }

.cc__locked {
  padding: 9px 16px;
  border-radius: 999px;
  background: #F2F4F7;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cc-muted);
  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-pink); }
.cc__switch:focus-visible { outline: 3px solid var(--cc-pink); outline-offset: 3px; }

.cc__knob {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(12, 18, 30, 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--ghost { color: var(--cc-navy); border-color: var(--cc-navy); }
.cc__dialog-actions .cc__btn--ghost:hover { background: var(--cc-navy); 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-navy); }

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

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

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

.cc__pill-label {
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  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; }
  .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; }
}
