/**
 * 121 Platform
 * Button Interactions
 *
 * Shared interaction behaviour for WordPress Button blocks.
 *
 * @package 121_Platform
 */

.wp-block-button__link {
	box-shadow: var(--wp--preset--shadow--medium);

	transition:
		transform var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--easing-standard),
		box-shadow var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--easing-standard),
		background-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--easing-standard),
		border-color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--easing-standard),
		color var(--wp--custom--motion--duration-fast) var(--wp--custom--motion--easing-standard);
}

/* Accent is a light brand surface and requires dark foreground text. */
.wp-block-button__link.has-accent-background-color {
	color: var(--wp--preset--color--primary-dark);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	transform: translateY(calc(-1 * var(--wp--custom--motion--lift)));
	box-shadow: var(--wp--preset--shadow--large);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	transform: translateY(calc(-1 * var(--wp--custom--motion--lift)));
	box-shadow: var(--wp--preset--shadow--large);
	background-color: var(--wp--preset--color--primary-soft);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--wp--preset--color--primary);
	border-width: 1px;
}

.wp-block-button__link:focus-visible {
	outline: var(--wp--custom--focus--outline-width) solid var(--wp--preset--color--accent);
	outline-offset: var(--wp--custom--focus--outline-offset);
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link {
		transition: none;
	}

	.wp-block-button__link:hover {
		transform: none;
	}
}
