Remember when Democrats predicted the imminent decline of the GOP?

The theory was that Republicans were so out of touch with women and ethnic minorities that they would soon be relegated to the status of a “permanent minority” — supported only by Southern white men and incapable of recapturing the White House.

Donald Trump’s victory has put an end to this fantasy. Now it’s the Democrats who are facing their own “doomsday” scenario.

A recent analysis conducted by Third Way — a self-described “centrist” think tank — argues that Democrats are evolving into a “coastal” party. They have strong bases in California, New York and Massachusetts but are slowly ceding the rest of the country to Republicans.

Third Way compared 2016 election results in the two areas and found an astounding asymmetry:

In California, New York and Massachusetts, home to roughly 24 million voters, voters chose Hillary Clinton over Donald Trump by a large margin, 65% to 35%.

But in the remaining 47 states, home to 105 million voters, voters broke for Trump by a decisive 52% to 48% margin.

The geographic concentration of the pro-Hillary vote is one reason Clinton’s supposed popular vote “victory” rings so hollow. Clinton ran up the score in a liberal state like California, where she bested Trump by some 4.3 million votes.

But that single-state advantage is simply not reflective of the broader national pattern, which favored Trump, Third Way found.

Recent voting patterns in Congress point to another disastrous trend for Democrats: They are fast becoming a “two-region” party.

Democrats have a 3-1 lead over the GOP in California, New York and Massachusetts and a 3-1 lead over Republicans in the Pacific Northwest and the Mid-Atlantic (also known as the “Acela Corridor”). However, those regions account for less than 20% of the total numbers of House members.

By contrast, if you focus on the American South, the Heartland, and the Southwest — about 80% of the country — the GOP leads Democrats by more than 2-1.

Overall, that translates into a decisive GOP advantage in the House of Representatives — one that is not likely to shift anytime soon.

There are other powerful signs that the Democrats are losing their grip on power.

The vast majority of state legislatures — 32, a record — are in GOP hands, as are a majority of the state houses. And Democrats face enormous challenges in the U.S. Senate in 2018 because they must defend at least 10 seats in states that Trump won in 2016 — while the GOP occupies virtually none that are considered vulnerable to reversal.

One bellwether contest will be the battle of liberal Sen. Elizabeth Warren for re-election in Massachusetts. A recent statewide poll found that 46% of voters would support someone else for her seat — her weakest showing yet.

Other vulnerable Senate Democrats include party stalwarts like North Dakota’s Heidi Heitkamp, Missouri’s Claire MCCaskill, Montana’s Jon Tester, and even Clinton’s running mate, Tim Kaine, in Virginia.

One top Democratic strategist recently told Politico Magazine: “It’s going to be a disaster.”

Another major quandary for Democrats is their national leadership. Without Obama at the helm, the party has fallen prey to fierce ideological, gender and ethnic divisions.

Nancy Pelosi (D-CA) managed to impose herself as party leader yet again, beating back a powerful challenge from Rep. Tim Ryan (D-OH), who blamed Pelosi and her ardent followers, many of them dependent on her fundraising support, for leading Democrats astray.

Since then, the party has found itself increasingly divided over the nomination of Muslim Rep. Keith Ellison (D-MN) to become Democratic National Committee chair. Former presidential candidate Bernie Sanders and more recently, former vice-president Joe Biden have joined the fray, but each supports a different candidate, further complicating the dispute.

It’s becoming a race to the bottom. Ellison and his emerging rival Tom Perez, Obama’s former labor secretary, are virtual unknowns outside the party. Sanders and Biden, who might have fared better against Trump than Clinton, are too old to lead the Democrats moving forward. Warren herself will be 71 in 2024.

The party could well find itself without a viable White House challenger to Trump in 2020.

And then there’s the Supreme Court. Trump has just announced his candidate to replace Judge Antonin Scalia, Neil Gorsuch. A staunch conservative who once clerked for Anthony Kennedy, the leading “swing” vote on the Court, he’s hard to pigeon-hole politically.

And despite threats to block Gorsuch, the Democrats have become victims of their own hubris. Under Obama, they altered the rules so that only 51 Senate votes were needed to confirm a judicial appointee. The Republicans now have 52, making Gorsuch a shoo-in.

For the GOP, regaining a 5-4 majority in the Supreme Court would amount to a political crown jewel: The party will dominate every branch and level of government for the first time in modern history.

For Democrats, who’ve grown accustomed to having their way in national politics, it’s like staring into the abyss.