At the appearance of the minor before the court at the detention or shelter care hearing, the court shall receive all relevant information and evidence, including affidavits concerning the allegations made in the petition. Evidence used by the court in its findings or stated in or offered in connection with this Section may be by way of proffer based on reliable information offered by the State or minor. All evidence shall be admissible if it is relevant and reliable regardless of whether it would be admissible under the rules of evidence applicable at a trial. No hearing may be held unless the minor is represented by counsel and no hearing shall be held until the minor has had adequate opportunity to consult with counsel.
If the court finds that it is a matter of immediate and urgent necessity for the protection of the minor or of the person or property of another that the minor be detained or placed in a shelter care facility or that the minor is likely to flee the jurisdiction of the court, the court may prescribe detention or shelter care and order that the minor be kept in a suitable place designated by the court or in a shelter care facility designated by the Department of Children and Family Services or a licensed child welfare agency; otherwise it shall release the minor from custody. If the court prescribes shelter care, then in placing the minor, the Department or other agency shall, to the extent compatible with the court's order, comply with Section 7 of the Children and Family Services Act. In making the determination of the existence of immediate and urgent necessity, the court shall consider among other matters:
If the court prescribes detention, and the minor is a youth in care of the Department of Children and Family Services, a hearing shall be held every 14 days to determine whether there is an urgent and immediate necessity to detain the minor for the protection of the person or property of another. If urgent and immediate necessity is not found on the basis of the protection of the person or property of another, the minor shall be released to the custody of the Department of Children and Family Services. If the court prescribes detention based on the minor being likely to flee the jurisdiction, and the minor is a youth in care of the Department of Children and Family Services, a hearing shall be held every 7 days for status on the location of shelter care placement by the Department of Children and Family Services. Detention shall not be used as a shelter care placement for minors in the custody or guardianship of the Department of Children and Family Services.
The order together with the court's findings of fact in support of the order shall be entered of record in the court.
Once the court finds that it is a matter of immediate and urgent necessity for the protection of the minor that the minor be placed in a shelter care facility, the minor shall not be returned to the parent, custodian or guardian until the court finds that the placement is no longer necessary for the protection of the minor.
The clerk shall set the matter for hearing not later than 14 days after such motion is filed. In the event that the court modifies or vacates a temporary order but does not vacate its finding of probable cause, the court may order that appropriate services be continued or initiated on behalf of the minor and the minor's family.
705 ILCS 405/5-501