  We investigate the nonconservative open-system dynamics of an atom in a
generic complex structured electromagnetic environment at temperature $T$. In
such systems, when the atom moves along a translation-invariant axis of the
environment, a frictional force acts on the particle. The effective viscosity
due to friction results from the nonequilibrium interaction with the
fluctuating (quantum) electromagnetic field, which effectively sets a
privileged reference frame. We study the impact of both quantum or thermal
fluctuations on the interaction and highlight how they induce qualitatively
different types of viscosity, i.e. quantum and black-body friction. To this
end, we develop a self-consistent non-Markovian description that contains the
latter as special cases. In particular, we show how the interplay between the
nonequilibrium dynamics, the quantum and the thermal properties of the
radiation, as well as the confinement of light at the vacuum-material interface
is responsible for several interesting and intriguing features. Our analyses is
relevant for a future experimental test of noncontact friction and the
resulting electromagnetic viscosity.
