min-height: 400px; /* prevents popup "jump" before form loads - adjust to your form size */
/* Prevent Elementor popup from clipping the form */
// hsforms script not ready yet, retry shortly
// Give the DOM a tick to actually paint the injected form
// 1. Trigger a resize so any listeners recalculate layout
// 2. Manually recenter the Elementor popup content wrapper
// 3. If Elementor's own popup module exposes a reposition method, call it too
// HubSpot form is loaded fresh every time popup opens (Elementor re-renders widget content),
// so this runs on page load. If your popup keeps the form in DOM and just toggles visibility,
// also hook into Elementor's popup "show" event as a backup trigger: