
If the search bar is to go directly above the logo (I'm assuming this is the site branding logo?), then instead of
beans_add_smart_action( 'beans_menu[_navbar][_social-menu]_prepend_markup', 'myprefix_primary_menu_search' );
couldn't you use
beans_add_smart_action( 'beans_site_branding_prepend_markup', 'myprefix_primary_menu_search' );
Whatever you put there should go directly before the branding logo - some styling should put it nicely in the area above.