When you click on the icon to add a class( in which pre-defined styles,e.g. 'active') to the search window and just hide the icon itself. Well for example so:
$('.btn-search').click(function() { $('.popup').addClass('active'); $(this).addClass('hide'); })