/* v5.1.97 — mobile cookie banner/appbar overlap fix
   Keeps the theme notice and common WordPress consent-plugin banners fully
   visible and clickable above the fixed mobile appbar. */

@media (max-width: 900px) {
  html body.vlg-theme .vlg-cookie-notice,
  html body.vlg-theme #cookie-notice,
  html body.vlg-theme #cookie-law-info-bar,
  html body.vlg-theme .cookie-law-info-bar,
  html body.vlg-theme #moove_gdpr_cookie_info_bar,
  html body.vlg-theme .cky-consent-container,
  html body.vlg-theme .cmplz-cookiebanner,
  html body.vlg-theme .wpconsent-banner,
  html body.vlg-theme .rcb-banner,
  html body.vlg-theme #BorlabsCookieBox {
    top: auto !important;
    bottom: calc(var(--vlg-mobile-appbar-h, 78px) + 22px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 2147483200 !important;
    max-height: calc(100dvh - var(--vlg-mobile-appbar-h, 78px) - 42px - env(safe-area-inset-bottom, 0px)) !important;
  }

  /* The built-in theme notice is a floating card, so keep it inside the viewport. */
  html body.vlg-theme .vlg-cookie-notice {
    left: max(10px, env(safe-area-inset-left, 0px)) !important;
    right: max(10px, env(safe-area-inset-right, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    overflow: auto !important;
  }

  /* Cookie Notice (Hu-manity / dfactory) uses an inner container. */
  html body.vlg-theme #cookie-notice .cookie-notice-container,
  html body.vlg-theme #cookie-notice .cn-body,
  html body.vlg-theme #cookie-law-info-bar .cli-bar-container,
  html body.vlg-theme #moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container,
  html body.vlg-theme .cky-consent-container .cky-consent-bar,
  html body.vlg-theme .cmplz-cookiebanner {
    max-height: inherit !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
