POPUP 1
Looks like it’s setup fine, no changes needed
POPUP 2
I’d setup this way;
Give it a background screen, same as popup one, but make it clear instead of tinted. It needs to be there for click capture but popup 1’s screen is already visible.
Set it up the same as popup 1’s, but your click interaction will be separate, since it will only hide popup 2 and popup 2’s screen.
Popup 2’s height should probably be wet as something like max 90vh, with a scrollable inner div to allow your form to scroll.