McHUGH, Judge:
¶ 1 Jerry Warnick appeals the trial court's order denying his request for attorney fees incurred in defending against a legal action brought against him by the law firm Anderson & Karrenberg (A & K). In particular, Warnick contends that he was the prevailing party in the action, that the action was based upon a written contract containing a unilateral attorney fees provision, and that he is therefore entitled to his fees pursuant to Utah Code section 78B-5-826 (the Reciprocal
¶ 2 Warnick entered into an agreement (the Agreement) with A & K, which provides that he would pay attorney fees and costs associated with A & K's representation of him in certain legal matters (the Co-Connect Dispute). The Agreement states, "In the event that sums payable under this agreement become the subject of litigation, your signature constitutes your agreement to pay all collection costs, including attorneys' fees, incurred in the enforcement of [the Agreement]." After Warnick executed the Agreement, A & K entered an appearance on his behalf in the Co-Connect Dispute, which was eventually resolved through settlement.
¶ 3 Subsequently, a dispute arose over the attorney fees due under the Agreement and A & K filed a complaint against Warnick asserting breach of contract and unjust enrichment (the Collection Action). On its breach of contract claim, A & K sought a judgment of $50,810 in principal, $2,323 in accrued interest, and continuing interest at 18% per annum as provided in the Agreement. In addition, A & K sought reimbursement of the "[a]ttorneys' fees and costs incurred by [it] in [the Collection Action]." With respect to its unjust enrichment claim, A & K requested judgment against Warnick for the principal amount of $50,810, accrued interest of $7,141, and continuing interest of 10% per annum at the legal interest rate, but did not seek the attorney fees incurred in the Collection Action.
¶ 4 In response, Warnick filed an answer and counterclaim. Warnick's answer denied the allegations in the complaint and alleged that A & K had promised that the attorney fees incurred in the Co-Connect Dispute would not exceed $20,000. Warnick also claimed that he was entitled to recover his attorney fees incurred in the Collection Action because it had been filed in bad faith. In addition, Warnick's counterclaim alleged that A & K had fraudulently induced him to enter into the Agreement. As relief, Warnick sought actual and consequential damages of $100,000, punitive damages of $1 million, and the reimbursement of attorney fees that he incurred in the Collection Action.
¶ 5 Approximately three weeks later, A & K filed a motion and supporting memorandum for summary judgment on Warnick's fraud counterclaim and on his claim that the Collection Action had been filed in bad faith. After full briefing and argument, the trial court entered a judgment and order granting A & K's motion for summary judgment and dismissing Warnick's counterclaim for fraud, as well as his request for attorney fees under Utah Code section 78B-5-825. The trial court reasoned that Warnick had "failed to establish three essential elements of [his] claim ... for fraud" and that he had "failed to show that [the Collection Action] was filed in bad faith." Warnick has not challenged this ruling on appeal.
¶ 6 The case proceeded to trial on A & K's breach of contract and unjust enrichment claims against Warnick. The jury returned a special verdict finding that Warnick had contracted to pay attorney fees to A & K in connection with the Co-Connect Dispute and that those fees were not capped at $20,000. Nevertheless, the jury found that A & K inexcusably failed to perform its obligations under the Agreement and that Warnick did not owe A & K any unpaid attorney fees.
¶ 7 After trial, Warnick filed a motion and supporting memorandum, seeking an award of his attorney fees incurred "as the prevailing party" in the Collection Action. A & K filed an opposition memorandum, arguing that Warnick was not the prevailing party because his fraud claim and his request for bad faith attorney fees had been summarily resolved in A & K's favor before trial. A & K also argued that under section 78B-5-826, the trial court had the discretion to award
¶ 8 On appeal, Warnick challenges the trial court's ruling that he was not entitled to his attorney fees under the Reciprocal Fee Statute because he was not the prevailing party in the Collection Action. See Utah Code Ann. § 78B-5-826 (LexisNexis 2008). "Whether attorney fees are recoverable in an action is a question of law, which we review for correctness." Valcarce v. Fitzgerald, 961 P.2d 305, 315 (Utah 1998). In contrast, "we review a trial court's determination of whether there is a prevailing party under an abuse of discretion standard." Reighard v. Yates, 2012 UT 45, ¶ 12, 285 P.3d 1168 (citing R.T. Nielson Co. v. Cook, 2002 UT 11, ¶ 25, 40 P.3d 1119).
¶ 9 As a general rule, attorney fees are recoverable only if authorized by contract or statute. See id. ¶ 41 (citing Prince v. Bear River Mut. Ins. Co., 2002 UT 68, ¶ 52, 56 P.3d 524). Here, the attorney fees provision in the Agreement is unilateral, providing that Warnick is obligated to pay A & K's attorney fees but not conferring a reciprocal right on Warnick. Thus, Warnick cannot establish a contractual right to attorney fees. Instead, he claims fees pursuant to the Reciprocal Fee Statute, which provides,
Utah Code Ann. § 78B-5-826.
¶ 10 The plain language of the Reciprocal Fee Statute indicates that "a court may award costs and attorney fees to a prevailing party in a civil action if two main conditions are met." Bilanzich v. Lonetti, 2007 UT 26, ¶ 14, 160 P.3d 1041. The first condition is that "the civil action must be `based upon any ... written contract,'" and the second is that the contract "must `allow at least one party to recover attorney's fees.'" Id. (quoting Utah Code Ann. § 78-27-56.5 (Michie 2002)) (current version at id. § 78B-5-826 (LexisNexis 2008)); see also Hooban v. Unicity Int'l, Inc. (Hooban II), 2012 UT 40, ¶ 12, 285 P.3d 766 (citing Utah Code Ann. § 78B-5-826). A prerequisite to either of these conditions, however, is that the party requesting fees prevailed in a civil action based upon a written agreement. See Utah Code Ann. § 78B-5-826 (providing that the court may award attorney fees to a "party that prevails"); see also Hooban II, 2012 UT 40, ¶ 12, 285 P.3d 766.
¶ 11 "Which party is the prevailing party is an appropriate question for the trial court" and "depends, to a large measure, on the context of each case." R.T. Nielson Co., 2002 UT 11, ¶ 25, 40 P.3d 1119. We defer to the trial court on the question of which party
Id. We refer to these factors as the Nielson factors. See id. This case-by-case approach affords the trial court the "flexibility to handle circumstances where both, or neither, parties may be considered to have prevailed." See id.
¶ 12 Here, the trial court adopted a "flexible and reasoned" approach to deciding the prevailing party issue. The trial court's written decision begins with an overview of the facts and the relevant law, including the Nielson factors. It then uses a table illustrating the outcomes of the claims and counterclaims (the Table) to support its conclusion that "neither party is a `prevailing party.'" Although the Table lacks detail, it is adequate to illustrate the trial court's reasoning for purposes of our review. Compare A.K. & R. Whipple Plumbing & Heating v. Guy, 2004 UT 47, ¶¶ 28-30, 94 P.3d 270 (stating that "[a]lthough lacking in detail, the trial court's explanation of its rationale [was] adequate because it demonstrates that the court correctly considered common sense factors in addition to the new judgment" in reaching its determination that neither party was the "successful party") with J. Pochynok Co. v. Smedsrud, 2005 UT 39, ¶ 12, 116 P.3d 353 (holding that it is inappropriate for an appellate court to rely on "conjecture" and requiring that the record give some indication "that the trial court made inferences and conclusions" in its determination regarding the successful party).
¶ 13 The Table indicates that Warnick had asserted a counterclaim for fraud and a claim for bad faith against A & K, and that both of these claims were resolved in favor of A & K on summary judgment. In addition, the Table reflects that the jury found against A & K on its breach of contract and unjust enrichment claims against Warnick. Accordingly, the Table illustrates that while neither party prevailed on its own claims, each was successful in defending against the claims asserted against it. Based on this illustration and citing the Nielson factors, the trial court concluded that "neither party is entitled to an award of fees." See R.T. Nielson Co. v. Cook, 2002 UT 11, ¶ 25, 40 P.3d 1119.
¶ 14 We cannot conclude that the trial court exceeded its broad discretion in reaching this conclusion. Contrary to Warnick's contention that the trial court simply "count[ed] the captions in the pleadings," the court was familiar with the claims advanced, the allegations made, and the damages requested by each party. We are also unconvinced that the fact that A & K "was awarded absolutely nothing it sought" indicates that Warnick "obtained most of what he sought." As the trial court's Table indicates, Warnick did not simply defend against A & K's claims by asserting affirmative defenses. He brought a counterclaim for fraud in which he sought compensatory and punitive damages that greatly exceeded the amounts A & K claimed were due under the Agreement. The Table also indicates that Warnick asserted a claim for his attorney fees on the ground that the Collection Action was filed in bad faith. He did not obtain what he requested on those claims. Moreover, irrespective of whether Warnick was represented by counsel at the time that he filed his answer and counterclaim, A & K was required to respond to the allegations and otherwise defend against a million-dollar claim for punitive damages. The trial court's decision indicates that it considered the parties' lack of success on these competing claims and the Nielson factors in determining that neither had prevailed.
¶ 15 Even if Warnick is correct that the trial court should have considered only the claims covered by the contractual attorney fees provision, an issue we need not decide, the trial court's reasoning remains valid.
¶ 16 In contrast, A & K's unjust enrichment claim was not based on the Agreement. See Robertson's Marine, Inc. v. I4 Solutions, Inc., 2010 UT App 9, ¶ 14, 223 P.3d 1141 (holding that a contractual attorney fees provision did not support an award of fees to a party who succeeded on an unjust enrichment claim because "unjust enrichment ... seeks payment in equity and is not based on a breach of the parties' contract"). Indeed, the unjust enrichment claim could not have succeeded if the Agreement was valid. See United States Fid. v. United States Sports Specialty, 2012 UT 3, ¶ 11, 270 P.3d 464 (footnote omitted) ("Under our precedent, a claim of unjust enrichment cannot arise where there is an express contract governing the `subject matter' of a dispute."). Thus, the only attorney fees that Warnick could recover are also those related to the breach of contract claim. See Home Abstract & Title Co., Inc. v. American Pension Servs., Inc., 2012 UT App 165, ¶ 5, 282 P.3d 1015 (mem.) (holding that the prevailing party could not recover reciprocal fees under the Reciprocal Fee Statute because the action was based on an oral agreement, not the trust deed containing the fees provision); Bilanzich v. Lonetti, 2007 UT 26, ¶ 20, 160 P.3d 1041 ("[I]n the spirit of leveling the playing field, courts should avoid using [the Reciprocal Fee Statute] to expose one party to a disproportionate risk of paying attorney fees that would result in a windfall to the other party.").
¶ 17 Furthermore, Warnick's argument that A & K brought the Collection Action in bad faith was a claim for the statutory attorney fees under section 78B-5-825, not an action to enforce or invalidate the Agreement. See Utah Code Ann. § 78B-5-825 (LexisNexis 2008) (providing for the award of attorney fees to the prevailing party where the action is without merit and not brought in good faith). Before any right to fees could arise under this statute, Warnick had to succeed in defending against the substantive claims brought by A & K and further establish that they were without merit and that A & K did not bring them in good faith. See Gallegos v. Lloyd, 2008 UT App 40, ¶ 9, 178 P.3d 922.
Id. (internal quotation marks omitted); see also Utah Code Ann. § 78B-5-825. Unlike Warnick's fraud claim, the bad faith allegation does not challenge the validity of the Agreement; it attacks A & K's motives in bringing the Collection Action. Because of the statutory "prevailing party" requirement, Warnick could not recover fees under section 78B-5-825 unless he first prevailed on the contract claim, see Utah Code Ann. § 78B-5-825. In turn, his request for fees is irrelevant to the merits of the breach of contract claim. Therefore, the claim for attorney fees
¶ 18 The claims covered by the Agreement's fees provision, and therefore the Reciprocal Attorney Fees statute, were the breach of contract claim and the counterclaim for fraud. See PC Crane Serv., LLC v. McQueen Masonry, Inc., 2012 UT App 61, ¶ 23, 273 P.3d 396 ("[Section 78B-5-826] affords to the party not benefitted by a contractual attorney fee provision the same access to attorney fees that the provision explicitly affords the other party."). Even if the references to A & K's unjust enrichment claim and Warnick's claim for bad faith attorney fees are eliminated, the trial court's reasoning as set forth in the Table still supports its conclusion that neither party prevailed. The Table indicates that A & K did not prevail on its breach of contract claim and that Warnick failed to recover on his counterclaim for fraud. Thus, although the number of claims is reduced, the mutual lack of success remains the same.
¶ 19 Although the trial court does not explain how it evaluated each of the Nielson factors, it was aware of the nature of the competing claims and the amounts sought by each party. The claims advanced framed a dispute over whether Warnick was entitled to damages due to A & K's fraud or, instead, was obligated to pay attorney fees to A & K for its efforts on his behalf in the Co-Connect Dispute. Neither party succeeded on its own claim. Furthermore, the trial court was aware that Warnick's counterclaim seeking $100,000 in compensatory damages and $1 million in punitive damages was significant in comparison with A & K's claim for approximately $50,000, plus interest, for unpaid fees. Under these circumstances, we cannot conclude that the trial court exceeded its discretion in determining that neither party prevailed.
¶ 20 Affirmed.
¶ 21 WE CONCUR: WILLIAM A. THORNE JR. and MICHELE M. CHRISTIANSEN, Judges.