/* v1.5.3 Staging-only accessibility fix for the native Product Engine filter drawer.
 * The background must remain locked while the drawer is open; its inner
 * native filter form MUST remain scrollable by mouse wheel/touch/keyboard.
 * No styles are applied to the catalog grid or its product cards. */
body.te-preview-body .te-pe-filter-drawer__panel,
body.te-db-search-preview .te-pe-filter-drawer__panel {
  display:flex !important;
  flex-direction:column !important;
  max-height:100vh !important;
  max-height:100dvh !important;
  overflow:hidden !important;
  min-height:0 !important;
}
body.te-preview-body .te-pe-filter-drawer__head,
body.te-preview-body .te-pe-filter-drawer__footer,
body.te-db-search-preview .te-pe-filter-drawer__head,
body.te-db-search-preview .te-pe-filter-drawer__footer {
  flex-shrink:0 !important;
}
body.te-preview-body .te-pe-filter-drawer__panel .te-pe-filter-form,
body.te-db-search-preview .te-pe-filter-drawer__panel .te-pe-filter-form {
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:100% !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;
}

/* Category preview only: preview.css isolates the shared catalog for the
 * approved homepage look. That containment traps the native FIXED filter drawer
 * below the category page header (z-index:10) and the WP admin bar, even when
 * the drawer itself requests z-index:100001. Lift ONLY this stacking-context
 * restriction on category previews; do not change the homepage or search. */
body.te-db-world-body .te-db-world-catalog .te-preview-catalog-area {
  isolation:auto !important;
}
/* Admin-only: place the ORIGINAL modal above WordPress admin controls once
 * its parent no longer isolates it. Do not change drawer coordinates, header,
 * footer, apply button or the scrollable native form. */
body.admin-bar.te-db-world-body .te-pe-filter-drawer,
body.admin-bar.te-db-world-body .te-pe-filter-drawer__panel {
  z-index:100001 !important;
}
