/**
 * eu_cookie_compliance styling.
 *
 * Ported from the Historie theme (issue #31040) so the cookie bar in the
 * Penize na uteku theme matches the layout of the rest of the CNB sites, which
 * all use the same eu_cookie_compliance module. Colours are pinned to the
 * Penize theme palette: dark #333 (btn--primary) for text, links and the
 * primary button; the withdraw tab uses the theme cookie icon.
 */

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 Penize theme body font (Roboto 15px) so the popup
     reads as part of the site regardless of context. */
  font-family: "roboto", 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: "roboto", 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: #333;
}

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

/* The eu_cookie_compliance content wrapper also carries the class "info",
   which collides with the Penize theme .info info-box component (cream
   background, mustard text, icon padding, rounded corners, 500px max-width).
   Neutralise that bleed so the popup content matches the plain white layout of
   the other CNB sites (see #31040). */
#sliding-popup .eu-cookie-compliance-content {
  max-width: calc(100% - 4rem);
  background: transparent;
  color: #333;
  margin: 0 2rem;
  padding: 0;
  border-radius: 0;
}

#sliding-popup button.button {
  background: #333;
  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/penize_na_uteku/assets/cookie/img/calc-cookies.png");
  background-size: 100%;
  width: 40px;
  height: 40px;
  overflow: hidden;
}
