Coherent perfect absorption and transparency in lossy and loss/gain metasurface-embedding structures