/* h1p chat-button fix — quick task 260519-h1p.
 *
 * Hide the floating AAA chat widget (#ai-chat-widget-root) while the Ecomus
 * cart drawer (#cart-panel.offscreen-panel) is open, so the "View cart" /
 * "Checkout" buttons in the drawer are not obstructed.
 *
 * Theme JS (ecomus/assets/js/scripts.min.js, y.openOffCanvas) adds
 *   body.offcanvas-opened
 *   body.cart-panel-opened   <-- specific to #cart-panel; we key off THIS
 * when the drawer opens, and removes both when it closes. So the rule below
 * activates exactly when the cart drawer is visible, and only then.
 *
 * The chat widget mounts a top-level <div id="ai-chat-widget-root"> on
 * document.body with inline `position: fixed; zIndex: 2147483646`. That
 * z-index is why it overlays the drawer — display:none is the cleanest fix.
 *
 * We deliberately do NOT key off body.offcanvas-opened (generic) because
 * that class is also added by the mobile menu and filter sidebar panels.
 */

body.cart-panel-opened #ai-chat-widget-root,
body.cart-panel-opened #ai-chat-widget-root iframe {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
