Resize popup to match the content