Judge Brett Kavanaugh listens to Sen. Rob Portman, R-Ohiom talk about Kavanaugh's qualifications before a meeting in the Russell Senate Office Building on Capitol Hill July 11, 2018 in Washington, D.C.

But Democrats' judicial problems started long before they lost the 2016 elections. Republicans have been working for decades to get to where they are now — on the cusp of cementing a conservative majority on the Supreme Court for a generation.

How did they get here?

"For conservatives, there has to be a long game," says Leonard Leo, executive vice president of the Federalist Society, because a Supreme Court vacancy is about much more than just overturning Roe v. Wade. "What is important for conservatives is a court that will respect and enforce all the limits on governmental power and control contained in the Constitution."

Leo, an architect of conservatives' long game for the courts, says that's a big difference between the way the right and left have approached the courts: Liberals, Leo says, are outcome-oriented, while conservatives are more interested in the courts' role in society. For the right, outcomes, or a decision in a specific case, matter less than ensuring the next generation of judges shares a judicial philosophy, Leo also said.

Conservative concentration, liberal complacency

Brian Fallon, who runs Demand Justice, a liberal group focused on the courts, says Republicans made it to this place by playing the long game.

"This is the product of 40 years of Republicans stoking grievance about the sense that the courts were completely a runaway institution that was promoting liberal values," Fallon says.

While conservatives were becoming aggrieved with the courts, says Fallon, liberals were getting complacent.

"On the progressive side of things, [we] think of the courts as an institution for good. We don't worry about it so much [because] we think that judges will naturally do the right thing because that's what history has shown us," he says.

Indeed, for the last 40 years, liberals have had reason to feel confident in the Supreme Court.

After all, civil rights, voting rights, abortion rights — even Obamacare to some degree — were all upheld. Same-sex marriage is the law of the land thanks to the Supreme Court.

So instead, liberals focused their efforts on specific advocacy issues rather than institutions.

Meanwhile, conservatives made a reliably conservative Supreme Court their top priority.

Resources and infrastructure

Guy Cecil, chairman of Priorities USA, a Democratic advocacy group, says Republicans have had the resources and capacity to build specific infrastructure around the courts to move them ideologically over time.

Deep-pocketed donors like the Koch brothers have helped provide those resources — which essentially created a pipeline of young, conservative law clerks who would go on to become young conservative judges.

"You have the Koch Brothers, who every two years announce they're going to fund $300 and $400 million operations," Cecil says. "Those aren't just candidate operations, those are building policy infrastructure, legislative infrastructure, candidate infrastructure [and] when you are putting $400 million into this system, you get a say in who the nominee is. We can pretend that it's otherwise, but that is absolutely true."

Nan Aron, the president of the Alliance for Justice, an association of over 130 civil rights public interest organizations, also recognizes that conservative donors know how to play the long game.

"Over the years, big business, together with groups on the right, have amassed a huge war chest devoted specifically to remaking the courts in their image," she says. "On the left, that war chest has not existed."

Not because the left doesn't have their own billionaires — big Democratic donors like George Soros and Tom Steyer, for example, have not made the courts a priority. And there's another problem with resources on the left, says Guy Cecil, when donations do roll in from Democrats, he points out, they come too late.

Not only is that war chest non-existent, when donations do roll in from Democrats, Cecil points out, they come too late.

"When [liberals] care about issues or candidates, [they] give when those issues or those candidates come," he says. "Whereas the right, they fund these programs 365 days a year."

Activated voters

Also helpful for the right has been the activist grassroots base of voters who deeply care about the courts because of their hopes to one day overturn Roe v. Wade and to shift the courts overall in a more conservative direction.

Conservative voters care more about the court than liberal voters do. In the 2016 election, twice as many people who said the courts were their number one issue voted for Trump than for Clinton.

Then-candidate Donald Trump capitalized on that passion during the 2016 campaign and made appointing judges to the Supreme Court one of his talking points. It worked.

"I think it's one of the reasons I got elected. I think the people of this country did not want to see what was happening with the Supreme Court," said Trump, shortly before his inauguration in 2017.

But their support had to be earned. In order to prove to conservatives that he would follow through on his commitment to appoint judges they would like, Trump announced a list of judges from which he promised to pick his Supreme Court nominees.

The creators of that list were the Federalist Society and the Heritage Foundation — two of the most important organizations in the conservative political universe.

"And I wanted to put this list out because I wanted to quell any fears that people may have. I mean this is a list of people that I got them from people I most respect," said Trump in an interview with Fox News host Sean Hannity during the 2016 campaign.

Intellectual framework

But the long game is more than just money, organization and activated voters, says Fallon.

"Equally as important for the right in the last several decades as their infrastructure building has been the sort of intellectual horsepower contributed by people like the late Antonin Scalia and framing their whole judicial philosophy around the principle of originalism, which has given, in my view, an intellectual hook to something that is really just a way of cloaking a conservative judicial philosophy," says Fallon.

In other words, creating a specific philosophy framed in academic terms has helped groom a new generation of conservatives lawyers with not just job prospects, but a legal worldview.

Leo says that nurturing the right's judicial philosophy and view of the high court's role in society is "an inter-generational challenge that requires a constant renewal, starting with law students. You're inculcating an underlying philosophical understanding about the nature of government and the courts. That's different than saying are you in favor of this right or that right, this outcome or that outcome."

For liberals, says Leo, "When you get the outcomes you want, it's less of a long game about building infrastructure and inculcating values early on in one's legal education and career. It's more of a political game of getting people who will uphold gay marriage. Then you fall into a false sense of complacency."

Brian Fallon of Demand Justice says the left needs to match that approach by developing and disseminating its own judicial worldview. He and other liberal activists expect the progressive base of the Democratic Party to coalesce over the next several years to prioritize building up institutions, education and outreach around the courts.

But that takes time.

It took conservatives nearly 45 years from being on the losing end of Roe to being on the verge of ensuring a durable, conservative majority on the high court.