Adaptive modal window