Sounds kinda like she might have CRD, Chronic Respiratory Disease or MG.
Mycoplasma gallisepticum is contagious and can also be transmitted vertical via the egg. She may have hatch with this disease! It is mild with her as she has no swelling of the face or eyes.
What you described with her having diarrhea periodically, and the 'clicking' noise coming from her lungs while breathing are symptoms often overlooked by backyard quail enthusiasts.
There is no cure, if she recovers from this spell, (doesn't sound good) she will be a carrier the rest of her life. Some medications will relieve the symptoms but will not cure. Tetracycline, and Oxytetracycline work best for relieving symptoms.