Condolence for a distant relative
You did not know the deceased well, but your cousin is grieving. The goal is to acknowledge their pain without pretending a closeness that was not there.
Dear James,
I was saddened to hear about your mother. I know how close you were, and I want you to know I am thinking of you and your family during this time.
With sympathy,
Alex