/*
 * Cookiebanner (CookieYes), nieuwe indeling: op desktop een brede, gecentreerde
 * balk onderaan met de tekst links en de bediening rechts; op mobiel een
 * compacte balk over de volle breedte met de knop boven de tekstlink.
 *
 * CookieYes blijft op het bannertype "Box, linksonder" staan en voegt zijn
 * eigen <style> pas ná deze stylesheet in. Vandaar de zware selectors: ze
 * moeten winnen van regels als ".cky-consent-bar .cky-notice-des p". Kleuren
 * en teksten staan in CookieYes zelf (die zet ze inline op de elementen).
 *
 * Wordt alleen geladen als SOLARITE_CONSENT_LIVE aanstaat (consent-mode.php).
 */

/* Ruimte onder de pagina zolang de banner open staat, zodat hij de knoppen
   van een formulier niet blijvend bedekt. cookie-banner.js zet de hoogte.
   Als los blok en niet als padding: de site zet de padding van body later in
   de pagina zelf weer op 0. */
body::after {
  content: "";
  display: block;
  height: var(--sol-cookiebanner-height, 0px);
}

body .cky-consent-container.cky-box-bottom-left {
  left: 50%;
  bottom: 24px;
  width: calc(100% - 48px);
  max-width: 1120px;
  transform: translateX(-50%);
  border-radius: 20px;
}

body .cky-consent-container.cky-box-bottom-left .cky-consent-bar {
  padding: 28px 36px;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
}

/* Tekst links, bediening rechts. De wrapper om tekst en knoppen telt niet mee
   als eigen blok, zodat titel, tekst en knoppen samen in één raster staan. */
body .cky-consent-container.cky-box-bottom-left .cky-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 48px;
  align-items: center;
}

body .cky-consent-container.cky-box-bottom-left .cky-notice-group {
  display: contents;
}

body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-title {
  grid-column: 1;
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.3;
}

/* overflow-y: CookieYes zet bij een laag venster "scroll", wat ook zonder
   overloop een lege schuifbalk tekent. */
body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-des {
  grid-column: 1;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.6;
}

body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-des * {
  font-size: 15px;
  line-height: 1.6;
}

body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-btn-wrapper {
  grid-column: 2;
  grid-row: 1 / span 2;
  flex-wrap: nowrap;
  align-items: center;
  gap: 28px;
  margin-top: 0;
}

body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-btn-accept {
  flex: 0 0 auto;
  min-width: 220px;
  padding: 16px 36px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
}

body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-btn-customize {
  flex: 0 0 auto;
  font-size: 15px;
  white-space: nowrap;
}

/* Smaller dan de tweekoloms-indeling: tekst boven, bediening eronder rechts. */
@media (max-width: 1023px) {
  body .cky-consent-container.cky-box-bottom-left .cky-notice,
  body .cky-consent-container.cky-box-bottom-left .cky-notice-group {
    display: block;
  }

  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-btn-wrapper {
    justify-content: flex-end;
    margin-top: 20px;
  }
}

/* Mobiel: over de volle breedte tegen de onderrand, compacte tekst, de knop
   over de hele breedte en de tekstlink eronder met een ruim tikvlak. */
@media (max-width: 767px) {
  body .cky-consent-container.cky-box-bottom-left {
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    transform: none;
    border-radius: 16px 16px 0 0;
  }

  body .cky-consent-container.cky-box-bottom-left .cky-consent-bar {
    padding: 16px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.2);
  }

  /* CookieYes geeft deze drie blokken tot 440px breed zelf nog 24px
     zijmarge, bovenop de marge van de balk. */
  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-title,
  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-des,
  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-btn-wrapper {
    padding-left: 0;
    padding-right: 0;
  }

  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-title {
    margin-bottom: 6px;
    font-size: 17px;
  }

  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-des,
  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-des * {
    font-size: 13px;
    line-height: 1.45;
  }

  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-des {
    max-height: 30vh;
    overflow-y: auto;
  }

  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-notice-btn-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 12px;
  }

  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-btn-accept {
    order: 1;
    width: 100%;
    min-width: 0;
    padding: 13px 24px;
    font-size: 16px;
  }

  body .cky-consent-container.cky-box-bottom-left .cky-notice .cky-btn-customize {
    order: 2;
    width: auto;
    align-self: center;
    padding: 12px 16px;
    font-size: 14px;
    text-align: center;
  }
}
