Nonequilibrium phase transitions in chemical reactions