rework animations for modal and popup