; (ii) in subparagraph (B), by striking and at the end; (iii) in subparagraph (C)— (I) in clause (i), by striking and at the end; (II) in clause (ii), by adding and at the end; and (III) by adding at the end the following: (iii) if such court determines the status offender should be placed in a secure detention facility or correctional facility for violating such order— (I) the court shall issue a written order that— (aa) identifies the valid court order that has been violated; (bb) specifies the factual basis for determining that there is reasonable cause to believe that the status offender has violated such order; (cc) includes findings of fact to support a determination that there is no appropriate less restrictive alternative available to placing the status offender in such a facility, with due consideration to the best interest of the juvenile; (dd) specifies the length of time, not to exceed 7 days, that the status offender may remain in a secure detention facility or correctional facility, and includes a plan for the status offender's release from such facility; and (ee) may not be renewed or extended; and (II) the court may not issue a second or subsequent order described in subclause (I) relating to a status offender unless the status offender violates a valid court order after the date on which the court issues an order described in subclause (I); and ; and (iv) by adding at the end the following: (D) there are procedures in place to ensure that any status offender held in a secure detention facility or correctional facility pursuant to a court order described in this paragraph does not remain in custody longer than 7 days or the length of time authorized by the court, whichever is shorter; ; (S) in paragraph (26)— (i) by inserting and in accordance with confidentiality concerns, after maximum extent practicable,