Can a monster take legendary actions while surprised?

I am wild shaped as a bear and lose some max hp. If I wild shape again to a “new” bear…

Can a 5th level ranger using Horde Breaker attack four times in a round?

Does Protection From Good & Evil protect against a non-evil undead or a non-good celestial?

Does something that is classed as a ‘reaction’ always occur before the trigger?

Can someone shield in response to being hit by a shocking grasp?

Can Spiritual Weapon gets advantage because of flanking creature?

Does a Warlock need proficient in pact weapon?