(705 ILCS 405/5-501)
    Sec. 5-501. Detention or shelter care hearing. 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.
    (1) If the court finds that there is not probable cause to believe that the minor is a delinquent minor, it shall release the minor and dismiss the petition.
    (2) If the court finds that there is probable cause to believe that the minor is a delinquent minor, the minor, the minor's parent, guardian, custodian and other persons able to give relevant testimony may be examined before the court. The court may also consider any evidence by way of proffer based upon reliable information offered by the State or the minor. All evidence, including affidavits, shall be admissible if it is relevant and reliable regardless of whether it would be admissible under the rules of evidence applicable at trial. After such evidence is presented, the court may enter an order that the minor shall be released upon the request of a parent, guardian or legal custodian if the parent, guardian or custodian appears to take custody.
    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: (a) the nature and seriousness of the alleged offense; (b) the minor's record of delinquency offenses, including whether the minor has delinquency cases pending; (c) the minor's record of willful failure to appear following the issuance of a summons or warrant; (d) the availability of non-custodial alternatives, including the presence of a parent, guardian or other responsible relative able and willing to provide supervision and care for the minor and to assure the minor's compliance with a summons. If the minor is ordered placed in a shelter care facility of a licensed child welfare agency, the court shall, upon request of the agency, appoint the appropriate agency executive temporary custodian of the minor and the court may enter such other orders related to the temporary custody of the minor as it deems fit and proper.
    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.
    (3) Only when there is reasonable cause to believe that the minor taken into custody is a delinquent minor may the minor be kept or detained in a facility authorized for juvenile detention. This Section shall in no way be construed to limit subsection (4).
    (4)(a) Minors 12 years of age or older must be kept separate from confined adults and may not at any time be kept in the same cell, room or yard with confined adults. This paragraph (4) shall only apply to confinement pending an adjudicatory hearing and shall not exceed 40 hours, excluding Saturdays, Sundays, and court designated holidays. To accept or hold minors during this time period, county jails shall comply with all monitoring standards adopted by the Department of Corrections and training standards approved by the Illinois Law Enforcement Training Standards Board.
    (b) To accept or hold minors, 12 years of age or older, after the time period prescribed in clause (a) of subsection (4) of this Section but not exceeding 7 days including Saturdays, Sundays, and holidays, pending an adjudicatory hearing, county jails shall comply with all temporary detention standards adopted by the Department of Corrections and training standards approved by the Illinois Law Enforcement Training Standards Board.
    (c) To accept or hold minors 12 years of age or older after the time period prescribed in clause (a) and (b) of this subsection, county jails shall comply with all county juvenile detention standards adopted by the Department of Juvenile Justice.
    (5) If the minor is not brought before a judicial officer within the time period as specified in Section 5-415, the minor must immediately be released from custody.
    (6) If neither the parent, guardian, or legal custodian appears within 24 hours to take custody of a minor released from detention or shelter care, then the clerk of the court shall set the matter for rehearing not later than 7 days after the original order and shall issue a summons directed to the parent, guardian, or legal custodian to appear. At the same time the probation department shall prepare a report on the minor. If a parent, guardian, or legal custodian does not appear at such rehearing, the judge may enter an order prescribing that the minor be kept in a suitable place designated by the Department of Human Services or a licensed child welfare agency. The time during which a minor is in custody after being released upon the request of a parent, guardian, or legal custodian shall be considered as time spent in detention for purposes of scheduling the trial.
    (7) Any party, including the State, the temporary custodian, an agency providing services to the minor or family under a service plan pursuant to Section 8.2 of the Abused and Neglected Child Reporting Act, foster parent, or any of their representatives, may file a motion to modify or vacate a temporary custody order or vacate a detention or shelter care order on any of the following grounds:
        (a) It is no longer a matter of immediate and urgent
    
necessity that the minor remain in detention or shelter care; or
        (b) There is a material change in the circumstances
    
of the natural family from which the minor was removed; or
        (c) A person, including a parent, relative, or legal
    
guardian, is capable of assuming temporary custody of the minor; or
        (d) Services provided by the Department of Children
    
and Family Services or a child welfare agency or other service provider have been successful in eliminating the need for temporary custody.
    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.
    (8) Whenever a petition has been filed under Section 5-520, the court can, at any time prior to trial or sentencing, order that the minor be placed in detention or a shelter care facility after the court conducts a hearing and finds that the conduct and behavior of the minor may endanger the health, person, welfare, or property of the minor or others or that the circumstances of the minor's home environment may endanger the minor's health, person, welfare, or property.
(Source: P.A. 102-654, eff. 1-1-23; 102-813, eff. 5-13-22; 103-22, eff. 8-8-23.)