As more states legalize or move toward legalizing medicinal or recreational cannabis, many may assume that they’re free to partake in accordance with the law. But, for employees, smoking or otherwise ingesting marijuana could possibly lead to disciplinary action or termination by your employer—even if you get high on your own time.

According to the National Cannabis Industry Association, 33 states have laws legalizing medical cannabis, and 11 of those also have legalized recreational use. But, even if it’s legal at the state level, federal law still prohibits cannabis use. That can lead to complicated compliance issues, especially for companies that need to meet certain federal requirements for their contracts.

“Let’s say you’re a truck driver and your employer’s required to abide by Department of Transportation regulations. We’ve got this kind of crossover and interplay that employees and employers have to be mindful of, in terms of how the federal law and the state laws intersect,” says Melissa Ferrara, a labor and employment attorney at Reed Smith and a member of the law firm’s cannabis team. Employers may also be fearful of liability if an employee has an accident or safety issue and then has a positive drug test.

The test and time

Unlike alcohol, which is typically metabolized relatively quickly, tetrahydrocannabinol, or THC—the psychoactive component in marijuana—can remain detectable in your system for weeks. But that doesn’t mean that you’re still feeling its effects. “There’s not necessarily a metric like there is for alcohol—this is when you’re intoxicated and this is when you’re not,” Ferrara says.

While blood tests can be used to detect marijuana, urinalysis is the most common form of drug testing because it’s easier and far less invasive, says Curtis Graves, attorney and manager of the Employers Council, a membership organization that offers legal, HR, and other consulting services. “[Urinalysis is] the test that picks up marijuana for weeks after last ingestion, depending on how much the person uses,” he says. Last year, the federal government said it would accept oral fluid testing, which is cheaper and typically only detects usage within a few days, he adds.

While oral fluid testing has been available, the federal government’s failure to adopt it made it unpopular. “But now that they’ve changed their posture on that, I think it’s going to become the test of record, if you will, over the next couple of years because it’s cheaper, less invasive, it’s got a lot of upsides,” Graves adds.

Employees’ expanding rights

Some states, such as Arizona and Montana, have protections for employees with regard to drug testing. Ironically, while Colorado has been at the forefront of marijuana legalization, it doesn’t currently have such protections. Colorado state assemblyman Jovan Melton is attempting to change that. This year, he introduced HB20-1089, the Employee Protection Lawful Off-Duty Activities bill, which prohibits an employer from terminating an employee for the employee’s lawful off-duty activities that are lawful under state law even if those activities are not lawful under federal law. The bill has not yet made it to committee, and Melton says his team is working on language that would allow companies with federal contracts to enact policies that would allow them to keep those contracts.