Re: "a warm pat on the back"
1. Lit. to pat someone's back to show praise.
2. Fig. to praise someone for something.
Does the word hug give us a hint that the intended meaning of the underlined part is literary?
First, I think "Lit." stands for "Literal", rather than "Literary". Nevertheless, I agree with your interpretation - although both a hug and a (literal) pat on the back are both enhanced when accompanied by some kind words.
I'm not a teacher of English, but I have spoken it for (almost) all of my life....