Why have Mexico's judicial reforms upset investors?

President Andres Manuel Lopez Obrador’s controversial judicial reforms making Mexico the world’s only country to elect all its judges by popular vote have spooked financial markets and investors.

What are the implications of the changes for Latin America’s second-largest economy?