@TitsalinaBumSquash
Sorry to hear about your mum. I am part of the cardiac theatre team, so have sadly seen this happen on quite a number of occasions.
It's not really possible to tell how long it took after the machines were switched off for your mum's body to completely shut down. It depends a bit on what stage they were at in the operation and also it just varies a bit between different people. If she was still on the heart/lung machine when the decision was made to withdraw treatment, then it's likely that she died extremely quickly, because she would have gone from complete support to nothing in a short space of time.
If she was in the later stages of the operation, so her heart had been supporting her circulation to an extent, then it can take a bit longer, maybe a few minutes for the heart to stop completely. Please be reassured that she would have known absolutely nothing about it.
As I say, I've been involved in quite a large number of cases where the patient didn't survive surgery and I always made sure that I or another team member was holding their hand as they slipped away. I hope all cardiac theatre teams would do the same. After a patient passes away a surgeon closes the wound and puts a dressing on. If we know that the patient will be having a post mortem then sometimes just the outside will be stitched, rather than wiring the breast bone together, so that the pathologist can see more easily what had happened during the operation. As far as I know then after the PM the wound is closed as normal.
When a patient dies during an operation the whole team is very affected by it. None of us just carries on as usual, we really do feel very sad for the patient and their family. The patient is treated with the utmost care and respect afterwards. I sometimes shed a few tears, to be perfectly honest with you.
I hope this is some comfort/help to you. Please ask if you have any other questions.