Build a header that grows when you expand a submenu in the nav

I am trying to build a floating header where, when you open a nested menu, the header div grows and the links display below the top level links rather than a new panel popping out with the submenu in it (default behavior). The floating header is built but not the dropdown behavior and styles.

Currently in my header container, which has a height:auto, a background color and margin around it to float it, I have logo container left and my menu container right. I am using a Nav Nestable module.

On your header div:

%root%:has(.brxe-dropdown.open) {
    /* Style to make header grow */
}