handle classes on overlay and modal