If you are forced to go to court to obtain a financial settlement due to your ex being unreasonable in mediation. Can a judge award costs if they see that your offers at mediation were very reasonable and you had no alternative but to go to court.
In legal proceedings for financial remedy each party pays their own costs. An order for costs against one party is possible but pretty rare. It would normally only be considered where there has been serious litigation misconduct ie where the other party has failed to engage with the court process.
Offers etc discussed at mediation would not be seen by the judge at final hearing. They would however be able to see an open offer to settle. If an early open offer is made and a judge makes an order that is the same as or very similar to it, an application for costs could be made. Whether it would succeed would be up to the judge who has considered the circumstances of the matter.