Is it permissible for a woman or a man to eat at a restaurant where there is no gender segregation?
According to the practice of generations of Muslims from among the predecessors and successors, the mere presence of males and females in the same place is not prohibited in itself. Rather, the prohibition concerns the manner of their gathering if it contradicts the rulings of Islamic law. This includes, for example, women uncovering what they have been commanded to cover in Islamic law, gathering to commit an abominable act or sitting in unlawful privacy with the opposite sex. As for the prohibited mixing between the opposite sexes, it is that which involves touching and physical contact and not merely being present in the same place.
Ibn Batal on his commentary on al Bukhari said that the separation between males and females in places and dealings is not an obligation on Muslim women as it is was only a commandment on the wives of the Prophet.
In his commentary in Fath al Bari, al Hafiz ibn Hajar said that it is permissible for the wife to serve her husband and those he invites over to his home should she keep her dignity intact through wearing her hijab. In case of jeopardizing her dignity in any way or form, it is deemed impermissible for the woman to be surrounded with men.
In Sahih al Bukhari, it was narrated by Abu Juhaifah that the Prophet (peace be upon him) when he made alliances of brotherhood among the emigrants (al muhajereen) and the supporters (al ansar), Salman and Abu al Dardaa were allied so one time Salman went to visit Abu al Dardaa and he found his wife looking upset so he asked her “what is wrong with you” and she said “Abu al Dardaa has no desire in this world”. Form this narrative we conclude the permissibility of conversing between opposite sexes.
So we conclude that the sheer presence of men and women in one place does not render impermissibility as prohibition is only deemed relevant when the man and the woman seclude themselves in a place where no one can enter. Also the mere act of closing the door of an office or the like does not make it prohibited and is not considered an unlawful privacy because the door is not locked and anyone can easily go in and out of the room.