How long does it take for steam to reject a gift automatically if the receiver don't confirm receipt?

If you buy a game with extra copies and donate one of the copies, then there's no expiration (Steam support page).

Otherwise gifts expire in thirty days (Steam support page).

Gifting to more expensive regions might be impossible if the price difference is too high. Other restrictions are listed on the store page. I can't find any information that a sale would affect gifting refunds.