How does selling buildings and bankruptcy work in Monopoly?
The rules:

House and hotels may be sold back to the Bank at any time for one-half the price paid for them.
All houses on one color-group must be sold one by one, evenly, in reverse of the manner in which they were erected.
All hotels on one color-group may be sold at once, or they may be sold one house at a time (one hotel equals five houses), evenly, in reverse of the manner in which they were erected.

What one by one here means is that you cannot sell a house from 1 property in a color group if another property in that color group already has more houses. You must sell evenly, just like you must build evenly. You can sell a hotel completely for the price of half of 5 houses, but you can't leave hotels on the other properties in the color group if you do that; they would need to be sold down to at most 1 house each.

A mortgaged property can be traded just like an unmortgaged property can, but that's up to the creditor to agree to that. The debtor cannot automatically use the mortgaged property instead of cash to pay rent.