(a) Costs may be awarded to either party as justice requires and in all cases the court, in its discretion, may require payment of costs at any time and may suspend or withhold any order until the costs are paid.
(b) The court may compel either party to pay attorney's fees and court costs reasonably necessary to enable the other party to prosecute or defend the action. An order for temporary relief awarding attorney's fees and court costs may be modified at any time during the pendency of the action, as the exigencies of the case or equity and justice may require, including, but not limited to, a modification which would require full or partial repayment of fees and costs by a party to the action to whom or on whose behalf payment of such fees and costs was previously ordered. If an appeal is taken or an intention to appeal is stated, the court may further order either party to pay attorney's fees and costs on appeal.
(c) When it appears to the court that a party has incurred attorney fees and costs unnecessarily because the opposing party has asserted unfounded claims or defenses for vexatious, wanton or oppressive purposes, thereby delaying or diverting attention from valid claims or defenses asserted in good faith, the court may order the offending party, or his or her attorney, or both, to pay reasonable attorney fees and costs to the other party.