Impact of nuclear vibrations on van der Waals and Casimir interactions at zero and finite temperature