Apply hover styles only when a device can hover

Use the CSS hover media feature to avoid mouse-only interactions on touchscreens and provide appropriate behavior for each input type.