Covariant spacetime formalism for applications to thermo-hyperelasticity