/**
 * Brand overrides for CookieConsent v3 (orestbida/cookieconsent).
 * Loaded AFTER the library's own CSS so these wins by cascade.
 *
 * Site palette:
 *   • Navy   #17213a — primary text, secondary button outline, toggle-on
 *   • Yellow #ffea00 — primary CTA fill (matches .button--solid)
 *   • Type   "Open Sans"
 */

#cc-main {
  /* Type & layout */
  --cc-font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  --cc-font-size: 15px;
  --cc-modal-border-radius: 12px;
  --cc-btn-border-radius: 96px;        /* fully rounded — matches .button--solid */
  --cc-modal-transition-duration: 0.25s;
  --cc-z-index: 9999;

  /* Surfaces */
  --cc-bg: #ffffff;
  --cc-primary-color: #17213a;
  --cc-secondary-color: #4a5775;
  --cc-link-color: #17213a;
  --cc-overlay-bg: rgba(15, 21, 35, 0.55);

  /* Borders & blocks */
  --cc-separator-border-color: #e5e7eb;
  --cc-cookie-category-block-bg: #f8f9fb;
  --cc-cookie-category-block-border: #e5e7eb;
  --cc-cookie-category-block-hover-bg: #f1f3f6;
  --cc-cookie-category-block-bg-expanded: #f8f9fb;
  --cc-cookie-category-expanded-block-hover-bg: #f1f3f6;
  --cc-cookie-category-expanded-block-bg: #ffffff;
  --cc-section-category-border: #e5e7eb;

  /* Primary button — Accept all (yellow on navy text, like .button--solid) */
  --cc-btn-primary-bg: #ffea00;
  --cc-btn-primary-color: #17213a;
  --cc-btn-primary-border-color: #ffea00;
  --cc-btn-primary-hover-bg: #f5e000;
  --cc-btn-primary-hover-color: #17213a;
  --cc-btn-primary-hover-border-color: #f5e000;

  /* Secondary button — Reject / Manage (navy outline) */
  --cc-btn-secondary-bg: #ffffff;
  --cc-btn-secondary-color: #17213a;
  --cc-btn-secondary-border-color: #17213a;
  --cc-btn-secondary-hover-bg: #17213a;
  --cc-btn-secondary-hover-color: #ffffff;
  --cc-btn-secondary-hover-border-color: #17213a;

  /* Toggles */
  --cc-toggle-bg-on: #17213a;
  --cc-toggle-bg-off: #c5c9d3;
  --cc-toggle-bg-readonly: #d8dbe3;
  --cc-toggle-knob-bg: #ffffff;
  --cc-toggle-knob-icon-color: #ffea00;

  /* Scrollbar inside the prefs modal */
  --cc-webkit-scrollbar-bg: #e5e7eb;
  --cc-webkit-scrollbar-bg-hover: #c5c9d3;
}

/* Make button copy match the site (uppercase + letter-spacing like .button--solid span) */
#cc-main .pm__btn,
#cc-main .cm__btn {
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: capitalize;
}

/* Inline links inside the banner pick up the brand colour with a subtle underline */
#cc-main .cm__desc a,
#cc-main .pm__section--desc a,
#cc-main .cm__footer a {
  color: #17213a;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cc-main .cm__desc a:hover,
#cc-main .pm__section--desc a:hover,
#cc-main .cm__footer a:hover {
  text-decoration-thickness: 2px;
}

/* Slightly softer shadow under the floating consent box so it doesn't feel grey */
#cc-main .cm--box {
  box-shadow: 0 12px 32px rgba(15, 21, 35, 0.18);
}

/* Accordion fix —
   The library reuses --cc-btn-border-radius (96px in our brand) on the section blocks AND
   the description panel, so the category accordions render as full pills and the expanded
   panel clips text via its overflow:hidden. Force sensible 6px radii and square the joining
   edges when expanded so the title row meets the description panel flush. */
#cc-main .pm__section,
#cc-main .pm__section--toggle {
  border-radius: 6px !important;
}
#cc-main .pm__section--toggle.is-expanded {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
#cc-main .pm__section--toggle .pm__section-desc-wrapper {
  border-radius: 0 0 6px 6px !important;
}
#cc-main .pm__section-title {
  border-radius: 0 !important;
}
