/* =================================================================
   Shell cookie-consent / overlay suppression (DEVS-6636)

   The shell injects its consent banner from JavaScript after the page has
   painted. Without a CSS rule that hides it the moment the node appears, the
   banner flashes until our own client script removes it. These rules used to
   live in vbstyles.css, which self-styled campaign pages skip via the
   '!vbstyles' sentinel — that is why /le-flocon-aura flashed and /faq did not.
   createHtmlPage now links this file on every page, sentinel or not.
   ================================================================= */

/* Hide cookie popups when consent stored in localStorage */
/* Note: Do NOT hide .ui-overlay as it's used by shell for header spacing on mobile */
body.vibe-consent-accepted #CookiePopUp,
body.vibe-consent-accepted .cookie-banner,
body.vibe-consent-accepted [id*="ookiePopUp"],
body.vibe-consent-accepted [id*="CookiePopUp"],
body.vibe-consent-accepted [class*="cookie-consent"],
body.vibe-consent-accepted [class*="cookies-consent"],
body.vibe-consent-accepted .cookies-consent-container,
body.vibe-consent-accepted .footer-cookies-consent,
body.vibe-consent-accepted .overlay.overlay-cookie,
body.vibe-consent-accepted .overlay-cookie,
body.vibe-consent-accepted [class*="cookie-popup"],
body.vibe-consent-accepted [class*="cookie-overlay"],
body.vibe-consent-accepted [class*="gdpr"],
body.vibe-consent-accepted [class*="privacy-popup"],
body.vibe-consent-accepted .modal-backdrop {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Scrolling is restored via JS (client-scripts.ts) which clears inline overflow styles */
/* CSS fallback: Force scrolling when consent is accepted (overrides shell's no-scroll) */
html.vibe-consent-accepted,
html.vibe-consent-accepted body,
body.vibe-consent-accepted {
  overflow-y: auto !important;
  position: static !important;
  height: auto !important;
}

/* Hide cookie overlays marked by JS with data-vibe-cookie-overlay attribute */
/* This attribute is only added to overlays containing cookie popups, not search/menu overlays */
/* Exclude .vibe-trust-overlay-active for trust popup */
body.vibe-consent-accepted .ui-overlay[data-vibe-cookie-overlay]:not(.vibe-trust-overlay-active),
.ui-overlay[data-vibe-cookie-overlay]:not(.vibe-trust-overlay-active) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Note: We removed the .ui-overlay.open and generic .overlay hiding rules */
/* because they were too broad and hiding the search overlay. */
/* The JS handles cookie overlays by: */
/*   1. Removing the .open class from overlays containing cookie popups */
/*   2. Setting inline display:none on specific cookie elements */
/* Only elements with data-vibe-cookie-overlay attribute are hidden by CSS above. */

/* Trust overlay should show with black background when active */
.ui-overlay.vibe-trust-overlay-active,
.overlay.vibe-trust-overlay-active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: rgba(0, 0, 0, 0.7) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9998 !important;
}

/* Trust popup content should appear in front of the overlay */
/* Only target Trusted Shops specific elements, not cookie popups */
.ts-info.ts-open,
#trustbadge-container,
.trustbadge-container {
  z-index: 9999 !important;
}
