; (II) a protective custody unit described in paragraph (3); or (III) a mental health treatment program as described in subsection (c)(2); (B) the inmate is lesbian, gay, bisexual, transgender (as defined in section 115.5 of title 28, Code of Federal Regulations, or any successor thereto), intersex (as defined in section 115.5 of title 28, Code of Federal Regulations, or any successor thereto), or gender nonconforming (as defined in section 115.5 of title 28, Code of Federal Regulations, or any successor thereto), if the placement is solely on the basis of such identification or status; or (C) the inmate is HIV positive, if the placement is solely on the basis of the HIV positive status of the inmate. (5) Limitations on the use of restraints and other requirements The Director of the Bureau of Prisons and the Director of the United States Marshals Service, or any facility that contracts with the Bureau of Prisons or the United States Marshals Service, shall ensure that— (A) no inmate, including individuals in solitary confinement, shall be placed in restraints during out-of-cell time, unless— (i) determined to be necessary for safety, security, or mitigation of flight risk during the transportation of an inmate; (ii) an individualized determination is made at the time that restraints are necessary to prevent a specific, significant, and unreasonable risk of imminent serious physical injury to other inmates or staff based on concrete and reasonable evidence of such risk; and (iii) the least restrictive form of restraints shall be used for no longer than necessary to abate such imminent harm, provided that— (I) restraints may not be used for more than 2 hours unless a determination is made that there is an ongoing significant and serious threat of imminent serious physical injury to other inmates or staff, at which time the regional director shall be notified about the continued use of restraints