Adjust modal max-height dynamically