add transition and overlay effects for modal