When the father dies...
When the father dies, the mother has greater right of custody than anyone else until the child reaches the age of maturity. 581 . When the mother dies during the term of her custody, the father gets the exclusive custody. 582 . Just as custody is a right of the father and the mother, it is also the right of the child, in the sense that if they refuse to take the custody [and fulfill their duties towards him], they can be forced to comply. 583 .
If both parents disappear, the right of custody belongs to the paternal grandfather. 584 . Whoever from the two parents or others have the right of custody is allowed to delegate it to a third party, ensuring that they would fulfill their responsibility as required by Islamic Law. 585 . The person —parents or others— who shall have the custody of the child, must be Muslim, sane, and trustworthy to ensure the safety of the child.
So, if the father is a non-Muslim and the mother is a Muslim , the child is considered as a Muslim and the mother shall have the sole custody of the child. Similarly, if the father is a Muslim while the mother is a non-Muslim, the father shall have the right of custody. 586 . It is obligatory on the son to provide for the parents. 587 . It is obligatory on the father to provide for the child, male as well as female. 588 .
The obligation of providing for a person who is closely related to you is conditional on him being poor, in the sense that he does not have the basic necessities of life like bread, food, clothing, bedding, comforter, shelter, etc. 589 . In Islamic law, there is no fixed amount for providing to those who are closely related to you. What is obligatory is to provide whatever is needed to sustain them, i.e.
bread, food, clothing, shelter, and other things in line with his status as well as the standard of living for that place and time. 590 . If a person who is obliged to provide for the needs of his close relation refuses to provide [e.g., a husband refuses to provide for his wife], it is permissible for the one who has the right to force him to do so, even by resorting to the courts.
If it is not possible to force him to provide maintenance and he has some wealth [that is easily accessible], the person who has the right can take the rightful amount from it after seeking the permission of the mujtahid .