(1) Before making an order for costs against a lawyer or other person who is not a party to a proceeding, the court must give the lawyer or other person a reasonable opportunity to be heard.
(2) If a party who is represented by a lawyer is not present when an order is made that costs are to be paid by the party or the party's lawyer, the party's lawyer must give the party written notice of the order and an explanation of the reason for the order.