Random phase approximation for complex charged systems: Application to copolyelectrolytes (polyampholytes)