Expressing condolences can be a challenge when you never met the deceased. Instead of first hand observations, you can draw on the previous conversations you've had with the bereaved. Use those stories and anecdotes as the basis for your note of sympathy, as in the following example:
You have my deepest sympathy on the death of your mom. I know how important she was in your life and your care and support during these last few years must have brought her great comfort. Your relationship was quite special and while this makes the loss so very painful, I do believe that your closeness and warm memories will bring you comfort. Know that I am thinking of you and your mom.
Used with permission from www.legacy.com