Hide .panel in modals when they are hidden