A transcript of oral arguments in a US Supreme Court case about job discrimination, heard Tuesday, mentions bathrooms 17 times.

The case the justices were debating has nothing to do with bathrooms.

In fact, the case is about whether an employee who is fired for being gay or trans is covered by the federal ban on sex discrimination.

The justices focused on the bathroom issue, they said, because they believed they would eventually be asked whether it is constitutional for authorities to control which bathrooms trans people can use.

There are women "who would feel intruded upon if someone who still had male characteristics walked into their bathroom," Justice Sonia Sotomayor said. "That's why we have different bathrooms. So the hard question is, 'How do we deal with that?'"

At its heart, the case heard Tuesday by the US Supreme Court on workplace discrimination against gay and trans people is simple.

It asks, if an employee is fired for being gay or trans, is that covered by the ban on sex discrimination in the Civil Rights Act of 1964?

Advocates for the workers say yes, because the descriptors gay and trans are inherently related to one's sex.

The conservative and religious employers in the case are arguing that the court should apply the law strictly, based on the text of the act, which mentions only "sex" and does not specifically mention people who are gay or trans.

Read more: The Supreme Court is about to hear 3 cases that could decide if people can be fired for being LGBTQ. Here's everything you need to know.

The justices, however, were more interested in bathrooms.

In oral arguments, bathrooms were mentioned 17 times, always at the behest of the justices, according to the transcript. Much of the debate was taken up by justices on both liberal and conservative sides of the court asking how they would resolve the trans bathroom issue, which centers on whether business owners or lawmakers can mandate which bathrooms trans people can use.

Justice Sonia Sotomayor put it most bluntly: "Let's not avoid the difficult issue, OK? You have a transgender person who rightly is identifying as a woman and wants to use the women's bathroom, rightly, wrongly, not a moral choice, but this is what they identify with. Their need is genuine.

"I'm accepting all of that. And they want to use the women's bathroom. But there are other women who are made uncomfortable, and not merely uncomfortable, but who would feel intruded upon if someone who still had male characteristics walked into their bathroom. That's why we have different bathrooms. So the hard question is, 'How do we deal with that?'"

The US Supreme Court. Associated Press/J. Scott Applewhite

To be clear, bathrooms are not an issue in this case.

David Cole, the American Civil Liberties Union lawyer for the trans worker, tried repeatedly to move the justices away from their bathroom obsession. "Well, that is — that is — that is a question," he told Sotomayor. "It is not the question in this case."

Justice Samuel Alito was insistent. "It is not before us, but it will be coming," he said.

Cole took a stab at it: "The question would be, does imposing that restroom policy, which is obviously because of sex, impose a discriminatory injury on an individual? And if you require me to go to the women's restroom, that's a serious issue."

Read more: Half of LGBTQ employees say they have experienced verbal discrimination at work

John Bursch, the lawyer for the employers, took the opposite view, painting a future in which people with traditionally male characteristics end up using women's bathrooms:

"Gender identity is a broad concept. You could have a male employee who identifies as a woman but doesn't dress as a woman, looks like a man, showing up in the shower and the locker room, and, again, the employer wouldn't be able to do anything about that because under Mr. Cole's theory, but for the fact he was a man, he could be there. And it's stereotyping to say men cannot be in the women's bathroom."

As usual, the justices offered few clues as to how they would rule. But they didn't demonstrate much sympathy with the idea that because the 1964 act doesn't specifically say "gay" and "trans" that those issues aren't about sex discrimination.

Rather, their focus on bathrooms showed they were girding to hear a case on it and create new law in the future.

"Once we decide the case in your favor, then that question is inevitable," Sotomayor said, referring to a hypothetical scenario.

That case will probably be Grimm v. Gloucester County School Board, in which a trans student was required to use the girls' bathroom at Gloucester High School even though he had previously used the boys' facilities without incident.

Sotomayor's "hard question" about women "who would feel intruded upon" suggests she does not see the answer as clear cut.