/* SCREENS_B_1 Б6: cookie notice (Klaro of the core gdpr add-on) on every storefront page — own CSS; the gdpr core files and the
   Klaro config are not changed. Klaro puts <div id="klaro"><div class="klaro"><div class="cookie-notice …"> at the end of <body>.
   - The wrappers #klaro / .klaro get display: contents, the notice itself position: sticky instead of fixed: it stays at the bottom
     of the window as before, but it is in the normal flow at the very end of the page — while it is visible, the page has exactly
     its height of extra room at the bottom, so any button («Proceed to checkout», «Place order») can be scrolled above it.
     Hidden by Klaro (class cookie-notice-hidden → display: none) — no box, no extra room.
   - display: flow-root — the notice keeps the margins of its text inside (as a fixed box does), the look does not change.
   - ≥ 1024 px: on the left, 20 px from the edges (was on the right — over «Proceed to checkout»).
   Connected in hooks/index/head_scripts.post.tpl: {style src="addons/go4trans_design/cookie_notice.css?v=N"}. */
#klaro,
#klaro > .klaro {
  display: contents;
}

#klaro > .klaro > .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded):not(.cookie-notice-hidden) {
  display: flow-root;
  position: sticky;
  bottom: 0;
}

/* SCREENS_B_2 Ш7: phone (nova shows its bottom bars below 768 px) — the notice sticks above them, not over them: the menu bar
   #navbar_mobile on every page plus «Add to cart» (#product_bottom_fixed) on a product / «Checkout» (#cart_bottom_fixed) on the
   cart. Their height is nova's own sum calc(--ty-tygh-padding-bottom-1 + --ty-tygh-padding-bottom-2) (the padding of .ty-tygh);
   + 2px — their top borders. margin-top 2px: the same 2px of extra room at the end of the page, so the last line of the page is
   not under the notice either. From 768 px — as before. */
@media (max-width: 767px) {
  #klaro > .klaro > .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded):not(.cookie-notice-hidden) {
    bottom: calc(var(--ty-tygh-padding-bottom-1, 0px) + var(--ty-tygh-padding-bottom-2, 0px) + 2px);
    margin-top: 2px;
  }
}

@media (min-width: 1024px) {
  #klaro > .klaro > .cookie-notice:not(.cookie-modal-notice):not(.cn-embedded):not(.cookie-notice-hidden) {
    bottom: 20px;
    left: auto;
    right: auto;
    margin: 0 0 20px 20px;
  }
}
