How to add a button to the header area?

You also can make the search bar out of the flow with absolute position.
You won’t need margin anymore.

.floating-search-input-wrapper {
   position: absolute;
   left: 0;
   top: calc((4em - 2.6rem - 2px - 2px) / 2);  /* header height - search height - margin - border */
   width: 100%;
}

You might need to add a media query to control the width on lower resolution and ensure it doesn’t overlap with other elements.