Change width of Searchbox on Google Maps

I want to change the width of the searchbox on Google Maps, but only when the side panel is open (as shown in the screenshot linked below):

https://i.imgur.com/1y5UuX7.png

If the side panel is closed (i.e. the 'Hide All' button has been pressed and the side panel is collapsed) then I want the searchbox to be a different width.

What I'm trying to do is make the search box not so wide when you first open the Google maps page (and no side panel is showing). But, if you open the side panel, the reduced width search box gets bigger to fit the width of the side panel. Once you close the side panel, the smaller search box size is shown again.

I can set a reduced width using id #searchbox, but this is applied whether the side panel is open or not.
Sign In or Register to comment.