Washington (CNN) A new biography of the first woman on the Supreme Court details Justice Sandra Day O'Connor's agonizing struggle with her husband's dementia in the years before she retired and her later angst as she watched the court lunge rightward and faced her own declining health.

Veteran author Evan Thomas captures in "First," released Tuesday, the woman who lived much of her life in the spotlight yet who, in the quiet of her home, struggled with common health difficulties and the vicissitudes of age.

He writes that O'Connor, who will be 89 on March 26 and has Alzheimer's disease, generally declined to discuss cases and her approach to the law. But he adds details to familiar court dramas such as Bush v. Gore, the Florida election dispute that culminated the presidential election in 2000.

The 5-to-4, conservative-versus-liberal decision, with O'Connor in the majority, ensured the end of recounts and secured Republican George W. Bush's victory over Democrat Al Gore. Thomas writes that O'Connor took the lead to craft its legal grounds and inserted a key line in the unsigned opinion limiting it "to the present circumstances" or, as Thomas characterizes it, "a one-time ticket to get out of a jam."

"Asked if she had any regrets about Bush v. Gore, as she sat in a wheelchair at her assisted living facility," Thomas recounts of a January 2017 exchange, "she answered, 'I'm sure I did, but second thoughts don't do you a lot of good. It looked like a party-line vote, I know.' Her craggy face softened and grew sad."

Thomas also writes that retired Justice John Paul Stevens told him O'Connor regretted stepping down when she did, in January 2006, and Stevens added, "The Court has never been this far to the right."

History-making icon

When President Ronald Reagan appointed O'Connor in 1981, the Arizona state court judge, then 51, offered a fresh image of female achievement.

She had a compelling personal story and exuded a superwoman persona: the child of a pioneering ranch family in Arizona, she graduated from high school at age 16 and attended Stanford University; then after law school, when male-run law firms rejected her, she set up her own office; she became a state senator then a trial and appeals court judge, all while raising three boys and engaging in vigorous social and sporting life with husband John.

Her competitiveness -- in everything -- became legendary.

On the Supreme Court from September 1981 to January 2006, O'Connor became a crucial swing vote, steadying the bench and influencing the law from abortion rights and affirmative action, to criminal due process and checks on the Bush administration's post-September 11, 2001 war on terrorism.

Difficulties of husband's dementia

Her home life was more complicated in the late 1990s when John first showed signs of his Alzheimer's. In the early 2000s, she feared leaving him alone at home and brought him to her chambers at the court.

She had met John when they were students together at Stanford law school, and he gave up a thriving law practice in Phoenix to move to Washington in 1981. It was a difficult role, O'Connor acknowledged to Thomas, saying in January 2017, "being the husband of me was not an easy job."

Social events became awkward as John's condition worsened. "At a dinner party, Sandra had to stop him from eating a stick of butter, which he had mistaken for cheese," writes Thomas. At another meal with a friend, in 2004, as they watched John just seated, staring, Thomas writes, O'Connor nodded toward John and quietly told her friend, "I'm going to have to step down."

The retirement dilemma

By the fall of 2004, another factor was in the mix: Chief Justice William Rehnquist was suffering from thyroid cancer. O'Connor and Rehnquist knew that two justices should not leave at the same time and aggravate the already politicized confirmation process.

As the annual court session was ending in June 2005, Rehnquist told O'Connor he believed he could last another year. That prompted her to seal her retirement decision to retire and she revealed it in a letter to Bush on July 1.

But then Rehnquist died, on September 3.

Thomas writes that O'Connor had lingering concerns about her interactions with Rehnquist.

"According to two friends who knew her well," the author writes, "she was bothered by a troubling thought: In their tortured conversations about who should go first, had the chief justice been fully honest with her? He had not told her the severity of his disease; she did not know that his doctors had given him no more than a year to live when he was diagnosed in October 2004."

Justice Stevens, who retired in 2010 at age 90, told Thomas, "She expressed regret to me. She wished she had it to do all over again. ... She was too deferential to Bill [Rehnquist]. She should have stayed on."

Photos: Photos: Former Supreme Court Justice Sandra Day O'Connor gives testimony before a hearing of the Senate Judiciary Committee in July 2012. Hide Caption 1 of 8 Photos: O'Connor takes a photo with the rest of the Supreme Court justices in December 2003. Seated, from left, are Antonin Scalia, John Paul Stevens, Chief Justice William Rehnquist, O'Connor and Anthony Kennedy. Standing, from left, are Ruth Bader Ginsburg, David Souter, Clarence Thomas and Stephen Breyer. Hide Caption 2 of 8 Photos: O'Connor attends the installation ceremonies for U.S. Attorney General Alberto Gonzales in February 2005. Hide Caption 3 of 8 Photos: President George W. Bush, left, watches as Homeland Security Secretary Michael Chertoff, right, is sworn in by O'Connor in March 2005. Chertoff's wife, Meryl, is holding the Bible. Hide Caption 4 of 8 Photos: O'Connor talks at a judicial conference in Spokane, Washington, shortly after announcing her retirement in July 2005. Hide Caption 5 of 8 Photos: O'Connor talks with then-Solicitor General Elena Kagan at the Georgetown University Law Center in May 2009. Kagan would go on to join the Supreme Court after being nominated by President Barack Obama. Hide Caption 6 of 8 Photos: California first lady Maria Shriver presents O'Connor with the Minerva Award at the Women's Conference in October 2010. Hide Caption 7 of 8 Photos: From left, Gordon Wood, O'Connor, Jim Lehrer and Colin Campbell receive the Churchill Bell, the Colonial Williamsburg Foundation's highest accolade for citizenship, in Williamburg, Virginia, in April 2011. Hide Caption 8 of 8

O'Connor and Rehnquist had been friends since their Stanford law days, when they dated. Thomas had last October made public a letter he found among O'Connor's papers of Rehnquist proposing marriage to the young Sandra. She turned him down, and Thomas writes in his book that when O'Connor later revealed her relationship with John to Rehnquist in a special delivery letter, he responded: "Sandy, you are 22 years of age, and it is about time you realized that you've got to put some rein on your impulses as a gesture of decency."

Rehnquist and O'Connor were able to resume their friendship, and in time their respective families socialized together in Phoenix and in Washington.

Looking at the court since she retired

Thomas details O'Connor's criticism of the current Supreme Court, her disappointment in the 2010 Citizens United ruling, for example, that lifted regulations on corporate and labor union election contributions, and unhappiness with Justice Samuel Alito, her far more conservative successor who voted to reverse some of her moderate rulings.

"She was cross about her successor," Thomas writes and decried "the Court's lurch to the right after her departure."

In October 2018, O'Connor's family released a letter that revealed her Alzheimer's. Thomas documents in his book signs of related memory and behavior issues beginning about five years earlier.

One of the final anecdotes in the book occurred after O'Connor had been retired for nearly five years. The setting was the annual Alfalfa Club dinner in Washington, a year after husband John's 2009 death, with President Barack Obama in attendance. It was vintage O'Connor.

"Toasting John again the year after he died, she brought down the house of movers and shakers by ending her talk with one of his favorite quips: 'As my dear husband John used to say, you don't have to drink to have fun. But why take a chance?' Coming to the podium after her, a still laughing President Obama asked, 'Who does not love this woman?' The crowd stood and roared."