Bug 1022102 - Polish search bar interaction any styling

This includes the changes for bug 1040198, although it modifies some stuff on top of that. I'll need to clean up these commits.