/* Consent banner (iubenda) in the site's style. The colours come from consent.js;
   this file adds what its settings can't: a border that sets the banner apart from
   the page, and "Cookie settings" as a text link instead of a third button.
   iubenda styles its banner with !important, so these rules need it too. */

#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-content {
  border-top: 1px solid #134d52 !important;
  box-shadow: 0 -8px 24px rgba(19, 77, 82, 0.08) !important;
  /* The site extends under the iPhone home bar (viewport-fit=cover). */
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}

/* The site's own font instead of iubenda's system font. */
#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-content,
#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-content * {
  font-family: var(--sans, Inter, system-ui, -apple-system, sans-serif) !important;
}

/* Keep "Cookie policy · Privacy policy" together when the text wraps. */
#iubenda-cs-banner .consent-links {
  white-space: nowrap !important;
}

/* Less space between the text and the buttons when they stack. */
#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-rationale .iubenda-banner-content {
  padding-bottom: 8px !important;
}

/* Wide screens: one slim row, text on the left and choices on the right. */
@media (min-width: 1024px) {
  #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-rationale {
    flex-direction: row !important;
    align-items: center !important;
    gap: 32px !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
  }
  #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-rationale .iubenda-banner-content {
    flex: 1 1 auto !important;
    padding: 0 !important;
  }
  #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-opt-group {
    flex: 0 0 auto !important;
    margin: 0 !important;
    gap: 16px !important;
    align-items: center !important;
  }
  #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-opt-group-custom,
  #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-opt-group-consent {
    margin: 0 !important;
  }
}

/* Full-size tap targets on phones and touch screens. */
@media (max-width: 809px), (pointer: coarse) {
  #iubenda-cs-banner.iubenda-cs-default .iubenda-cs-opt-group button {
    min-height: 44px !important;
  }
}

#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-opt-group .iubenda-cs-customize-btn {
  background: transparent !important;
  color: #134d52 !important;
  padding: 8px 0 !important;
  border-radius: 0 !important;
  font-weight: 500 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-opt-group .iubenda-cs-customize-btn:hover {
  text-decoration-thickness: 2px !important;
}

#iubenda-cs-banner.iubenda-cs-default .iubenda-cs-opt-group .iubenda-cs-customize-btn:focus-visible {
  outline: 2px solid #134d52 !important;
  outline-offset: 2px !important;
}
