How is the restricted amount used when I take money to a game?

When you are taking money to a game for which there is a restricted balance, then the required funds will be taken from the restricted balance first. If the buy-in amount is greater than the current restricted amount for that specific game, then the balance will be taken from your available balance.