Navbar search field does not expand properly when user is not logged in

Summary

In !84187 (merged) we introduced a change to expand the navbar search field on focus to provide the user with additional room with searches. However, when a user is not logged in, the search field is not transitioning as it should (screen capture below).

Steps to reproduce

  1. View a page where the search bar is present while not logged in
  2. Focus the search field

What is the current bug behavior?

The search field does not stay right aligned to the content while growing in size when focused.

What is the expected correct behavior?

The search field should remain anchored to the right and grow in size to the left (matching how it functions for logged in users).

Additional considerations

Since we also have less content in the navbar for non-logged in users, we can also consider not hiding the logo/menu for smaller screens like we do now. However, I'm thinking we should probably wait and handle that in a separate issue once !86348 (merged) has been decided/merged, as that will change the spacing we have (and may make it so we can do this for both logged in/non-logged in users).

Relevant logs and/or screenshots

Kapture_2022-05-16_at_08.30.17

/cc @tbulva @JohnMcGuire

Edited by Nick Brandt