/**
 * Scroll Fix Module v2.0.0
 * SIMPLIFIED: Remove all conflicting scroll locks
 * Let preloader.css handle its own locks, then clean up properly
 */

/* Default: ensure scrolling always works */
html {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* ONLY allow preloader.css to lock scroll via its own rules */
/* DO NOT duplicate scroll locks here - causes conflicts */

/* Emergency unlock: if anything goes wrong, this forces scroll back */
body[data-aiwp-scroll-emergency-unlock] {
  overflow: auto !important;
  position: static !important;
  height: auto !important;
}

html[data-aiwp-scroll-emergency-unlock] {
  overflow: auto !important;
  position: static !important;
  height: auto !important;
}

/*
 * Universal unlock override (ALL devices):
 * If JS marks data-aiwp-scroll-unlock, it MUST win over
 * preloader-active or any stale lock classes.
 */
html[data-aiwp-scroll-unlock='true'],
body[data-aiwp-scroll-unlock='true'] {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  position: static !important;
  height: auto !important;
  max-height: none !important;
  overscroll-behavior: auto !important;
  touch-action: pan-y !important;
}

html[data-aiwp-scroll-unlock='true'].preloader-active,
body[data-aiwp-scroll-unlock='true'].preloader-active {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  position: static !important;
  height: auto !important;
  max-height: none !important;
}
