We already knew MGA Entertainment had run up an immense legal tab defending itself against copyright claims and winning a trade secrets trial against toymaker Mattel over the once-ubiquitous Bratz dolls. Now we know the full, staggering figure. All told, according to a ruling issued Friday in litigation against MGA’s insurers, the company spent about $175 million in fees and costs on a parade of lawyers, mainly from Skadden, Arps, Meagher, Slate & Flom, O’Melveny & Myers, and Orrick, Herrington & Sutcliffe. Skadden, meanwhile, appears to be at odds with MGA over a deal that would cap its fees in the Mattel litigation at just $11 million.

In a 59-page decision, Santa Ana, Ca. federal district judge David Carter ruled that MGA’s chief insurance providers, Evanston Insurance Company and parent companies Markel Corporation and Markel Underwriting Managers, could not reduce their obligation to cover a share of about $95 million of MGA’s legal bills. Judge Carter, who confirmed in a January ruling that MGA’s insurers were on the hook for the company’s litigation fees and costs, also concluded that Evanston was obligated to cover nearly $9.5 million in fees that MGA never actually paid its lawyers because of negotiated discounts.

The National Law Journal’s Amanda Bronstad has a detailed report on what Friday’s decision and a related order mean for MGA’s insurers. For us, the ruling’s most enticing sections deal with MGA’s battles with its own lawyers.

It’s old news by now that MGA has had a turbulent history with Orrick and O’Melveny in the Mattel litigation. Apparently the company is also in the midst of disagreement with Skadden over the firm’s fees. According to the judge, who referred to sealed court documents, Skadden and MGA reached an agreement capping Skadden’s fees at $11 million. But in its attempt to maximize its insurance recovery, MGA cited a deposition by the company’s general counsel in which she stated that Skadden contends the $11 million settlement is void because MGA breached its terms.

As of last August, MGA’s Skadden bills totaled a shade over $24 million, and Evanston sought a declaration that it shouldn’t have to cover the $13 million difference between that total and the negotiated $11 million fee cap. Judge Carter agreed, although he ruled that MGA could still seek more from the insurer “if the MGA Plaintiffs become obligated to pay Skadden more than $11 million for the work already completed in the underlying litigation.” We left messages seeking comment with Skadden’s Thomas Nolan but didn’t hear back.

Judge Carter also concluded that the insurers had not proven that $766,948 MGA claimed it incurred when it swapped its O’Melveny lawyers for Skadden predated Evanston’s duty to defend MGA. (O’Melveny, you may recall, sued MGA for $10.2 million in unpaid fees in July 2010 before settling last October.) And he ruled that Evanston could not avoid reimbursing MGA for the $3.5 million that’s currently at the center of a fee dispute between Orrick and MGA.

Evanston’s lawyers, Paul Gale and Sean Hanifan of Troutman Sanders, did not respond to requests for comment. Neither did MGA counsel Michael Bidart and Ricardo Echeverria of Shernoff Bidart Echeverria Bentley.