/**
 * Hover effect — a card that answers the pointer.
 *
 * Written by the Hover effect select (assets/editor/hover-controls.js) as one
 * plain class on the card. The amounts are the theme's settings.custom.hover
 * tokens; the fallbacks keep the effect on a theme that has none.
 *
 * Also on :focus-within, so a keyboard user gets the same cue. Off on touch
 * screens (no hover to leave) and for reduced motion. Front end only.
 */

.hover--lift,
.hover--scale,
.hover--zoom .wp-block-cover__image-background,
.hover--zoom .wp-block-cover__video-background {
	transition: transform var(--wp--custom--hover--transition, 200ms ease);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.hover--lift:hover,
	.hover--lift:focus-within {
		transform: translateY(var(--wp--custom--hover--lift, -0.25rem));
	}

	.hover--scale:hover,
	.hover--scale:focus-within {
		transform: scale(var(--wp--custom--hover--scale, 1.02));
	}

	/* Zoom image: the Cover clips its own overflow, so only the picture
	   grows. The class sits on the card, or on the Cover when it is the card. */
	.hover--zoom:hover .wp-block-cover__image-background,
	.hover--zoom:focus-within .wp-block-cover__image-background,
	.hover--zoom:hover .wp-block-cover__video-background,
	.hover--zoom:focus-within .wp-block-cover__video-background {
		transform: scale(var(--wp--custom--hover--zoom, 1.05));
	}
}
