/* Restore the native fixed popup overlay: Elementor makes admin-bar dialogs sticky.
   Width, content height, columns and spacing remain native popup/container controls. */
body:is(.elementor-page-1713, .elementor-page-1170) #elementor-popup-modal-1763 {
  position: fixed;
  inset: var(--wp-admin--admin-bar--height, 0px) 0 0;
  height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}

.allyx-menu-lines { position: relative; }
.allyx-menu-raster { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.allyx-menu-raster span { position: absolute; width: 10px; height: 10px; background: #000; }

/* The existing sitewide testset popup shares the native fixed-overlay safeguard. */
#elementor-popup-modal-1094 {
  position: fixed;
  inset: var(--wp-admin--admin-bar--height, 0px) 0 0;
  height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
}
#elementor-popup-modal-1094 .dialog-message {
  max-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px) - 20px);
  overflow-x: hidden;
  overflow-y: auto;
}

/* Keep Elementor's native popup lifecycle; soften only this menu's motion. */
#elementor-popup-modal-1763 .dialog-widget-content.fadeIn {
  animation-name: allyx-menu-enter;
  animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}
#elementor-popup-modal-1763 .dialog-widget-content.fadeOut {
  animation-name: allyx-menu-exit;
  animation-direction: normal;
  animation-timing-function: ease-in-out;
}
@keyframes allyx-menu-enter {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes allyx-menu-exit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) {
  #elementor-popup-modal-1763 .dialog-widget-content:is(.fadeIn, .fadeOut) {
    animation-name: none;
  }
}
