(a)
(1) the term "covered juvenile" means—
(A) a juvenile who—
(i) is being proceeded against under this chapter for an alleged act of juvenile delinquency; or
(ii) has been adjudicated delinquent under this chapter; or
(B) a juvenile who is being proceeded against as an adult in a district court of the United States for an alleged criminal offense;
(2) the term "juvenile facility" means any facility where covered juveniles are—
(A) committed pursuant to an adjudication of delinquency under this chapter; or
(B) detained prior to disposition or conviction; and
(3) the term "room confinement" means the involuntary placement of a covered juvenile alone in a cell, room, or other area for any reason.
(b)
(1)
(2)
(A)
(i)
(I) talking with the covered juvenile in an attempt to de-escalate the situation; and
(II) permitting a qualified mental health professional to talk to the covered juvenile.
(ii)
(I) explain to the covered juvenile the reasons for the room confinement; and
(II) inform the covered juvenile that release from room confinement will occur—
(aa) immediately when the covered juvenile regains self-control, as described in subparagraph (B)(i); or
(bb) not later than after the expiration of the time period described in subclause (I) or (II) of subparagraph (B)(ii), as applicable.
(B)
(i) immediately when the covered juvenile has sufficiently gained control so as to no longer engage in behavior that threatens serious and immediate risk of physical harm to himself or herself, or to others; or
(ii) if a covered juvenile does not sufficiently gain control as described in clause (i), not later than—
(I) 3 hours after being placed in room confinement, in the case of a covered juvenile who poses a serious and immediate risk of physical harm to others; or
(II) 30 minutes after being placed in room confinement, in the case of a covered juvenile who poses a serious and immediate risk of physical harm only to himself or herself.
(C)
(i) the covered juvenile shall be transferred to another juvenile facility or internal location where services can be provided to the covered juvenile without relying on room confinement; or
(ii) if a qualified mental health professional believes the level of crisis service needed is not currently available, a staff member of the juvenile facility shall initiate a referral to a location that can meet the needs of the covered juvenile.
(D)