/**
 * eu_cookie_compliance styling.
 *
 * Ported from the cnb_demo theme (main web) so the cookie bar in the
 * Historie theme matches the layout of the rest of the CNB sites, which all
 * use the same eu_cookie_compliance module. Source: cnb_demo _layout.scss,
 * with respond-to() mixins expanded to plain media queries (sm = 580px,
 * md = 768px). The cnb_demo blue ($color_text = #0b0b0f) is overridden with
 * #0b0b0f for the Historie theme.
 */

body.eu-cookie-compliance-popup-open:before {
  content: "";
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 999999;
  opacity: 0.75;
}

#sliding-popup {
  width: 656px !important;
  left: 58px;
  padding-top: 2rem;
  padding-bottom: 2rem;
  z-index: 1000000;
  background: #fff !important;
  /* Pin typography to the main web (cnb_demo body: Arial 15px) so the popup
     does not inherit the Historie theme font/size. */
  font-family: Arial, sans-serif;
  font-size: 15px;
}

/* Buttons do not inherit font-family; force it on the whole popup subtree. */
#sliding-popup,
#sliding-popup * {
  font-family: Arial, sans-serif;
}

@media (max-width: 768px) {
  #sliding-popup {
    width: 100% !important;
    left: 0;
  }
}

#sliding-popup .eu-cookie-withdraw-banner {
  background-color: transparent !important;
}

#sliding-popup .eu-cookie-compliance-message {
  max-width: 100%;
  margin: 0;
}

#sliding-popup h1,
#sliding-popup h2,
#sliding-popup h3,
#sliding-popup p,
#sliding-popup label,
#sliding-popup div,
#sliding-popup .eu-cookie-compliance-more-button,
#sliding-popup .eu-cookie-compliance-secondary-button,
#sliding-popup .eu-cookie-withdraw-tab {
  color: #0b0b0f;
}

#sliding-popup a {
  color: #0b0b0f;
  text-decoration: underline;
  text-decoration-style: solid;
}

#sliding-popup .eu-cookie-compliance-content {
  max-width: calc(100% - 4rem);
}

#sliding-popup button.button {
  background: #0b0b0f;
  border: none !important;
  border-radius: 0;
  text-shadow: none;
  color: #fff;
  padding: 1em 1.7em;
  display: inline-block;
  cursor: pointer;
  font-size: 0.82em;
  font-weight: 600;
  box-shadow: none;
  margin-bottom: 12px;
}

#sliding-popup .popup-content {
  display: flex;
  flex-direction: column;
}

#sliding-popup .eu-cookie-compliance-categories {
  order: 2;
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
  padding: 0;
  position: relative;
}

#sliding-popup .eu-cookie-compliance-categories input {
  width: 16px !important;
  height: 16px !important;
  margin-right: 0.25rem;
}

#sliding-popup .eu-cookie-compliance-categories label {
  font-size: 12px;
  font-weight: 600;
}

#sliding-popup .eu-cookie-compliance-categories-buttons {
  order: -1;
  position: absolute;
  top: -4rem;
  right: 0;
}

@media (max-width: 580px) {
  #sliding-popup .eu-cookie-compliance-categories-buttons {
    position: relative;
    top: 0;
  }

  #sliding-popup .eu-cookie-compliance-categories-buttons button.button {
    margin: 0;
  }
}

#sliding-popup #popup-buttons {
  margin: 0;
}

#sliding-popup .eu-cookie-withdraw-tab {
  position: fixed;
  bottom: 0.5rem;
  left: 0.5rem;
  top: auto;
  transform: none;
  border-radius: 0.25rem;
  box-shadow: none;
  border: none;
  background: transparent;
  color: transparent;
  background-image: url("/themes/custom/historie/assets/cookie/img/calc-cookies.png");
  background-size: 100%;
  width: 40px;
  height: 40px;
  overflow: hidden;
}
