Knowing the classic recipe that creates emotional affairs will help you avoid falling into a trap.

Have you ever had the feeling that a relationship with a coworker has crossed some invisible line? It might not be physical at all, but maybe your relationship has reached a level of emotional intimacy that could constitute infidelity if either of you are married. Maybe you're having an emotional affair. Not many women would admit it, but many more women today are admitting to affairs than they were nearly three decades ago.

In her 2017 book, State of Affairs: Rethinking Infidelity, Esther Perel notes that since 1990, the rate of married women who report they've been unfaithful has increased by 40 percent, while the rate among men has remained the same. And according to decades of research by acclaimed infidelity researcher Dr. Shirley Glass, most of today’s affairs are starting in workplaces, simply because that’s where people are most likely to spend a significant amount of time around others of the opposite sex. “Good people in good marriages—men and women who say they're happily married—are unwittingly crossing the line between platonic friendship and romantic love,” Dr. Glass wrote in her 2003 book Not Just Friends. We are right to be wary when we hear our partners assert, ‘I'm telling you, we're just friends.’”

The truth is that most people don’t intend to leave their spouse. Once reality hits and they see the enormity of their mistake and what they could lose, they can choose to work on their marriage. But before you get to that enormous mistake, there are ways to prevent yourself from even getting into the danger zone.

Here are some signs to watch out for to determine whether you’re falling into an emotional affair with a coworker.

01. Breaking down boundaries and increasing intimacy

You spend more quality time with your coworker than your spouse. Not only do you jokingly call this man your “work husband,” but the quality of your time is better with him than with your spouse. While you and your husband may mostly talk about logistics, you use the time with your coworker to get to know him more intimately. You text outside of work about personal matters. You share about the day, check in about events in each other’s lives, and share intimate details.

You care more about your appearance in case you run into him. Where before it took you five minutes to get ready for work, now you take care to look your best. You find yourself more frequently breaking off from group lunches to have lunch together. Over time, this may turn into getting drinks and then dinners. Or after a work happy hour, everybody else leaves, but you two linger over drinks.

02. Hiding the risk from yourself and others

You’ve stopped talking about your coworker to your spouse—or can’t shut up about him. You downplay the threat. You tell yourself that he’s a friend and that you would never cheat, so there’s nothing wrong with what you’re doing. There’s sexual tension that isn’t acted upon. You still kid yourself into thinking that you haven’t done anything wrong because you haven’t actually had sex or physical contact. That kiss doesn’t count, either, because it was “just a kiss.”

You keep your coworker a secret. If he was just a friend, you would be able to talk openly about him to your husband. Secrecy fuels passion, so not telling anyone about him only makes him more desirable and your interactions more exhilarating.

03. Increasing comparison

You unfairly compare your spouse to your coworker. You think your husband isn’t as understanding and supportive as your coworker. You think your coworker is smarter, funnier, better at listening, and so on. You begin to more frequently bash your spouse to your coworker. You find yourself increasingly finding fault with your spouse and share these faults with your coworker.

You doubt your love for your spouse. If you are able to feel so strongly for someone else, that means you can’t possibly truly love your spouse, right? No. Attractions are normal and just because you find someone desirable—as a lover or a partner—doesn’t mean your feelings for your current spouse are invalid. Also, in scenarios like this, you’re in the attachment phase of love with your spouse, while you have lust and infatuation with your coworker.

Uh oh. Now what do I do?

If you found yourself nodding your head to most of the above signs, you’re in an emotional affair. If you have a few of them, you may be on the cusp of one. So what can you do to extricate yourself from this?

Tell your coworker it’s time to cool it. If you end things without an explanation, it might make them pursue you more. Be clear and concise that things have gone too far and that you are committed to your marriage. Keep communication to work-related matters. Sharing about personal matters, especially to someone who conveys understanding, can build intimacy.

Avoid being alone with your coworker. Don’t have lunch or drinks alone, don’t deliberately seek him out in his office, and avoid any late night meetings, even if deadlines are looming. Especially avoid drinking alone with him. Ask yourself, “Would I say or do this in front of my spouse?” If you imagine your spouse standing next to you as you interact with your coworker, would you still say or do what you want to do? If not, then don’t do it.

Ask yourself if you’re conflict avoidant. People who cheat have a tendency of avoiding conflict with their spouse. This is significant because you risk not being as satisfied in any relationship because you don’t speak up for what you need. Also, you may be unfairly comparing and blaming your spouse for your unhappiness, when really you may not have made clear to him what’s important to you and given him the opportunity to address your concerns.

Ask yourself what you’re missing from your marriage, and/or who you get to be in this relationship with your coworker. Sometimes people miss things from their marriage and haven’t put in the effort to keep those things alive. Sometimes a new interest or relationship awakens something long dead in them or something they’ve been denying.

Reinvest in your marriage. Devote the amount of quality time with your spouse that you shared with your coworker. Put in the energy and the effort, but make sure it’s quality—spending time talking about logistics doesn’t count. Do the things you used to do when you first dated. Talk about each other’s needs and how you can meet them. Renegotiate your marriage and your roles if necessary.

Also, remember that no person is without problems or differences. In a workplace affair, you only see the best in your coworker. Imagine your life with bills, chores, and shuffling children back and forth between two (maybe four) houses. Most relationships that start as affairs don’t withstand the dose of reality once they try a “real” relationship.

Single women should remember that workplace infidelity can happen just as easily when it’s the man who’s married. In those cases, he may tell you his marriage is on the rocks, but keep in mind all we just discussed above. Each piece of advice can be inverted to reflect the attention he should be putting to his marriage, instead of fostering an emotional affair with you. Remember also, if he’s already showing unfaithful behavior, there’s reason to believe he might not be fully truthful or fair when he disses his wife to you.

If you find yourself in a situation like this, remember it’s not a unique meet-cute of star-crossed co-workers; it’s an automated concoction of feelings that develop like clockwork under the conditions described above. Educate yourself so you can identify problematic behaviors as they’re starting, so you can avoid falling into a trap. Because when something based on secrets and easy lunches out starts replacing your relationship based on commitment and long-haul sacrifice, it’s not a fair comparison. An emotional-affair-based relationship often feels too good to be true precisely because it is.