Resize and recenter the modal when a format is selected