Media playback is unsupported on your device Media caption Melania Trump: "I want to help reunite children with their families"

The fate of hundreds of undocumented children taken from parents remains unclear a day after President Donald Trump moved to roll back his policy.

He ordered on Wednesday that the children be held with their parents while they are detained on charges of crossing the border illegally.

But under US law, migrant children cannot be detained more than 20 days by immigration officials.

The Pentagon has been asked to prepare up to 20,000 beds for children.

It comes amid US government inquiries into whether they can house unaccompanied children who cross the US-Mexico border on US military bases.

The Department of Health and Human Services (HHS) made the request to the Department of Defense hours after First Lady Melania Trump made a surprise visit to a child migrant detention centre.

Her tour of the federally funded facility in McAllen, Texas, housing dozens of Central American children, came as her husband's administration sought to quell the firestorm over migrant separations.

But Mrs Trump's visit was thrown into controversy after she was photographed wearing a jacket with the words "I don't really care do u?" as she boarded the plane to Texas.

Image copyright Getty Images Image caption Melania Trump was spotted in the jacket while boarding her flight to Texas

US officials have expressed mixed messages about what happens next to at least 2,300 children taken from their parents since 5 May after entering the country without documentation.

While the adults are held in custody pending court appearances, the children are being sent to holding cells, converted warehouses and desert tents under the "zero tolerance" policy introduced in April.

What does Trump's executive order say?

The president's executive order says adults who illegally enter the US with children still face prosecution. It also calls for:

Immigrant families to be detained together while their legal cases are considered

Expediting immigration cases involving families

Agencies, including the Pentagon, to construct facilities or make existing facilities available "for the housing and care of alien families"

Media playback is unsupported on your device Media caption Mayor on reuniting families: 'It's going to be a Herculean task'

Is there a time limit on detentions?

If the administration wants to detain migrant families together indefinitely while their cases churn through the legal system, it will need Congress or the courts to change the existing rules.

Under a 1997 ruling, the Flores settlement, undocumented children can be detained for no longer than 20 days by US immigration officials.

Mr Trump's executive order requests the modification of this judgement.

But analysts say it is unlikely the limit on detaining minors can be overturned within the next 20 days.

Image copyright Reuters Image caption Fleeing violence, migrant families make their way to the US border to apply for asylum

When will new policy take effect?

The New York Times reported that Gene Hamilton, a counsellor to Attorney General Jeff Sessions, mentioned an "implementation phase".

But an official for a division of the US Department of Health said no special effort would be made to reunite families already separated.

Ken Wolfe was speaking for the Administration of Children and Families (ACF), which oversees where children are placed after they are separated from their parents.

Media playback is unsupported on your device Media caption US youth shelter worker quit after being ordered to separate siblings

He was later contradicted by Brian Marriott, senior communications director of the ACF, who said Mr Wolfe "misspoke".

US Customs and Border Protection (CBP) said in a statement on Thursday it was taking "immediate steps" to implement the president's order and reunite the families.

'I never heard from my son'

Guatemalan undocumented immigrant Beata Mejia Mejia is suing the US government for allegedly violating her human rights when they took away her son, Darwin, after she crossed the US border.

After nearly two weeks in detention in Arizona she says she asked for her son and was given a phone number.

Media playback is unsupported on your device Media caption The sound of migrant children separated from parents

"I rang and rang and they never answered," she says, "I never heard from my son."

She told the BBC she was finally allowed to speak to him by phone after being freed on bail paid for by her lawyers on 15 June once her asylum bid was allowed to go ahead.

"I sensed he was very sad," she says. "Like all mothers, I know my children, and I felt he's not well."

Abuse allegations surface

Immigrant children held in a detention centre in Virginia say they were handcuffed, beaten, left nude in concrete cells and strapped to chairs with bags over their heads, the Associated Press reported.

The Shenandoah Valley Juvenile Center denies the allegations.

According to another lawsuit, migrant children say they were forcibly administered drugs at the Shiloh Treatment Center near Houston, Texas.

Children were allegedly made to take psychiatric medications, which were presented as vitamins.

Image copyright Getty Images Image caption A migrant mother seeking asylum waits at a shelter in Mexico

What will happen to new arrivals?

CBP said that "family unity will be maintained for families apprehended crossing the border illegally, and they will be transferred together to US Immigration and Customs Enforcement".

But there is only a current capacity of 3,335 beds in family detention centres run by US Immigration and Customs Enforcement, according to the federal budget figures.

Some 420 parents and children are crossing the US-Mexico border every day, according to CBP data cited by NBC News.