/**
 * ISSUE_3514: Emergency Overlay Fix
 * Force remove any overlay elements that cover navigation bar
 *
 * @package Nonassa
 * @since 1.0.0
 */

/* Remove all Shepherd.js elements */
.shepherd-modal-overlay-container,
.shepherd-modal-overlay-container *,
[class*="shepherd-modal"],
[class*="shepherd-overlay"],
.shepherd-element,
svg.shepherd-modal {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Remove shepherd-active backdrop */
body.shepherd-active::before,
body.shepherd-active::after {
  display: none !important;
  content: none !important;
}

/* Fix any inline-styled full-width overlays */
div[style*="position: fixed"],
div[style*="position: absolute"] {
  /* Only apply if it starts from left: 0 */
}

div[style*="position: fixed"][style*="left: 0px"],
div[style*="position: fixed"][style*="left:0"],
div[style*="position: absolute"][style*="left: 0px"],
div[style*="position: absolute"][style*="left:0"] {
  /* Check if it's a full-width overlay by z-index */
}

/* Specific fix for high z-index overlays starting from left: 0 */
div[style*="z-index"][style*="position: fixed"][style*="left: 0"],
div[style*="z-index"][style*="position: absolute"][style*="left: 0"] {
  left: var(--nona-nav-width, 230px) !important;
}

/* Remove any body classes that trigger overlays */
body.shepherd-active,
body.tour-active,
body.guide-active {
  /* Reset any overlay-related styles */
}

/* Ensure no SVG overlays */
svg[style*="position: fixed"],
svg[style*="position: absolute"] {
  display: none !important;
}

/* Debug: Make any remaining overlays visible but positioned correctly */
[class*="overlay"][style*="position: fixed"],
[class*="modal"][style*="position: fixed"] {
  /* If they exist, position them correctly */
  left: var(--nona-nav-width, 230px) !important;
  right: var(--assistant-current-width, 0) !important;
  top: var(--nona-header-height, 77px) !important;
}

/* Clean up any shepherd CSS remnants */
.shepherd-has-title .shepherd-content .shepherd-header,
.shepherd-text,
.shepherd-content,
.shepherd-footer {
  display: none !important;
}
