Why is it 'ihrem'?
The preposition 'in' always takes either dative case or accusative. Here, dative. Dative is for less active cases (the action takes place fully in the restaurant), accusative is when there's motion (e.g., if they were going into the restaurant).
Would 'die' in front of Gast or Besucher not indicate a female guest?
"Gast" is always masculine, regardless of whether it refers to a male or female. "der Besucher" does have a feminine version: "die Besucherin".