The reasonable fees and costs of an attorney, a guardian ad litem, a physician, and a visitor appointed by the court for the minor shall be allowed, disallowed, or adjusted by the court and may be paid from the estate of the minor if the minor possesses an estate or, if not, shall be paid by the county in which the proceedings are brought or by the petitioner as costs of the action. An action under sections 30-2601 to 30-2661 may be initiated or defended in forma pauperis in accordance with sections 25-2301 to 25-2310. The court may assess attorney's fees and costs against the petitioner upon a showing that the action was frivolous in accordance with sections 25-824 to 25-824.03.