How long will a keg hold carbonation if it is disconnected from the CO2 tank?
Does the type of keg matter?
Indefinitely is right assuming your seal is good, but the beer will need to have absorbed CO2 to the point of "equilibrium", meaning it has absorbed all it can for the pressure you have it set at. If this is not the case, the pressure will drop to zero.
Also, It absorbs faster and reaches equilibrium more quickly when the beer is cold.
As long as all of seals are good, it should hold pressure indefinitely.
Yes, in theory, it should hold pressure indefinitely. If you don't already, perform a "soap bubble leak test" by pressurizing the keg (10 PSI should do it) then brushing or spraying on a water/ soap solution. If there is a leak, large bubbles will form where the leak is. The solution should be mostly water with a bit of dish soap or something similar. If the solution has too much soap in it, it will bubble just from being applied. I do a quick "spray soap" after I've cleaned and assembled my keg for use but before I sanitize it. It's also a good idea to check the keg connections (ball or pin lock connections) and your hose connections at the regulator and any other transition piece (regulator to tank connection, splitters, ect.).