/* ==========================================================================
   COOKIE CONSENT DIALOG

   Restyles the CookieConsent library's consent box (cookieconsent.css,
   loaded just before this file) to the Website 2.0 Figma file: the main
   dialog (node 152:20736) and the mobile dialog (node 152:20715). The
   library's own phone rules use !important, so the phone rules here do too.
   ========================================================================== */

#cc-main {
  --cc-font-family: var(--font-family-secondary, "Inter", sans-serif);
  --cc-bg: var(--background-surface-light, #fff);
  --cc-primary-color: var(--text-regular, #334155);
  --cc-secondary-color: var(--text-light, #64748b);
  --cc-btn-primary-bg: #1e293b;
  --cc-btn-primary-color: #fff;
  --cc-btn-primary-border-color: #1e293b;
  --cc-btn-primary-hover-bg: #0f172a;
  --cc-btn-primary-hover-color: #fff;
  --cc-btn-primary-hover-border-color: #0f172a;
  --cc-btn-border-radius: 100px;
  --cc-modal-border-radius: 16px;
  --cc-modal-margin: 24px;
  --cc-link-color: var(--text-brand, #5b4b9a);
}

#cc-main .cm.cm--box {
  width: 490px;
  max-width: calc(100vw - 2 * var(--cc-modal-margin));
  border: 1px solid var(--border-light, #e2e8f0);
  box-shadow: 0 12px 32px -16px rgba(15, 23, 42, 0.24);
}

#cc-main .cm--box .cm__body {
  gap: 16px;
  padding: 24px 28px;
}

#cc-main .cm--box .cm__texts {
  padding: 0;
}

#cc-main .cm--box .cm__title,
#cc-main .cm--box .cm__desc {
  padding: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.64px;
}

#cc-main .cm--box .cm__title {
  color: var(--cc-primary-color);
}

#cc-main .cm--box .cm__title + .cm__desc {
  margin-top: 0;
}

#cc-main .cm--box .cm__desc {
  padding-bottom: 0;
  color: var(--cc-secondary-color);
}

/* Accept and Reject on the left, the preferences link on the right */
#cc-main .cm--box .cm__btns {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  border-top: 0;
}

#cc-main .cm--box .cm__btn-group {
  display: flex;
  gap: 8px;
}

#cc-main .cm--box .cm__btn + .cm__btn,
#cc-main .cm--box .cm__btn-group + .cm__btn-group {
  margin: 0;
}

#cc-main .cm--box .cm__btn {
  min-height: 0;
  padding: 8px 20px;
  border-width: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  letter-spacing: -0.56px;
}

#cc-main .cm--box .cm__btn:focus-visible {
  outline: 2px solid var(--border-focused, #5b4b9a);
  outline-offset: 2px;
}

/* "Manage Individual preferences": a borderless text button */
#cc-main .cm--box .cm__btn--secondary {
  padding: 0;
  background: none;
  color: #475569;
}

#cc-main .cm--box .cm__btn--secondary:hover {
  background: none;
  color: var(--text-strong, #0f172a);
}

/* Phones: full-width buttons, stacked, with the preferences link centred
   under them. Matches the library's own 640px breakpoint. */
@media screen and (max-width: 640px) {
  #cc-main {
    --cc-modal-margin: 12px;
  }

  #cc-main .cm.cm--box {
    width: auto !important;
  }

  #cc-main .cm--box .cm__body {
    padding: 24px 28px !important;
  }

  #cc-main .cm--box .cm__title,
  #cc-main .cm--box .cm__desc,
  #cc-main .cm--box .cm__btns {
    padding: 0 !important;
  }

  #cc-main .cm--box .cm__btns {
    flex-direction: column !important;
    align-items: stretch;
    border-top: 0 !important;
  }

  #cc-main .cm--box .cm__btn-group {
    gap: 8px;
  }

  #cc-main .cm--box .cm__btn + .cm__btn,
  #cc-main .cm--box .cm__btn-group + .cm__btn-group {
    margin: 0 !important;
  }

  #cc-main .cm--box .cm__btn--secondary {
    min-height: 38px;
  }
}
