I’m using search in the menu bar and it works well on desktop and tablet landscape mode. In portrait mode or phone when the menu is open the search box is as big as the menu. How can I make sure the search box is only as big as the nav bar (first line) even if the complete menu is open? Alternatively is there a way to close the mobile menu after pressing the search icon and before the search box is displayed?
Picture with big search box as big as the open menu: