They certainly did not lose for any lack of idealism, or dedication to its cause or beliefs, or bravery and still on the battlefield. Mainly the Southerners began losing faith in the cause because it really did not speak to them directly, and because the North and Abraham Lincoln were determined to win the Civil War. But the principal cause of the South losing the war was the fact that the South's armies did not win enough victories on the battlefield; especially enough victories in a row on the battlefield.
I would have to say another reason they lost is due to very bad military commanders. With people like Polk and Hardee you have got ranking generals in an army who deliberately sought to undermine their commanding general Braxton Bragg. With Wheeler you have got a subordinate general who on at least two occasions in the fall of 1863 and the fall of 1864 went off joy riding when he should have been obeying his orders from his army commander. And with Hood and Bragg you had two generals who were basically incompetent as army commanders. With Albert Sidney Johnston you had a general who underwent some kind of confidence crisis after Fort Donelson.
Both the Union and the Confederacy have their advantages and disadvantages. The Union had banking, factories, and ships. They also had more railroads to move supplies and men than the South did. A huge advantage of the North was their large Navy and their experienced government. Abraham Lincoln was clearly committed