I think this is the required order.

If modal is above ., the modal doesn't show (just a black screen).