/**
 * Modern CTA treatment for core Button blocks.
 *
 * Colors come from theme.json (accent-3 = brand-700 #078143, white label — 4.96:1 AA).
 * This layer adds what theme.json can't express: a semibold label, soft brand-tinted
 * elevation, smooth hover-lift / active-press micro-interactions, an arrow affordance
 * that nudges forward on hover, and an accessible focus ring. Reduced-motion honored.
 * Scoped to .wp-block-button so the custom review/course CTAs are untouched.
 */

.wp-block-button__link,
.wp-element-button {
	font-weight: 600;
	letter-spacing: 0.005em;
	transition:
		transform 180ms cubic-bezier(0.3, 0.8, 0.4, 1),
		box-shadow 180ms ease,
		background-color 160ms ease;
}

/* Filled buttons: elevation + press mechanics (outline/ghost variants stay flat). */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link,
.wp-block-button:not(.is-style-outline) > .wp-element-button {
	box-shadow:
		0 1px 2px rgba(6, 46, 23, 0.16),
		0 10px 22px -12px rgba(7, 129, 67, 0.55);
}

.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
.wp-block-button:not(.is-style-outline) > .wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow:
		0 3px 6px rgba(6, 46, 23, 0.18),
		0 18px 30px -12px rgba(7, 129, 67, 0.62);
}

.wp-block-button:not(.is-style-outline) > .wp-block-button__link:active,
.wp-block-button:not(.is-style-outline) > .wp-element-button:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(6, 46, 23, 0.2);
}

/* Accessible focus ring on top of theme.json's outline. */
.wp-block-button__link:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid var(--focus, #0ea457);
	outline-offset: 3px;
}

/* Forward-motion arrow affordance on filled CTAs. */
.wp-block-button:not(.is-style-outline) > .wp-block-button__link::after,
.wp-block-button:not(.is-style-outline) > .wp-element-button::after {
	content: "\2192";
	display: inline-block;
	margin-left: 0.5em;
	transition: transform 180ms cubic-bezier(0.3, 0.8, 0.4, 1);
}

.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover::after,
.wp-block-button:not(.is-style-outline) > .wp-element-button:hover::after {
	transform: translateX(3px);
}

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

	.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover,
	.wp-block-button:not(.is-style-outline) > .wp-element-button:hover,
	.wp-block-button:not(.is-style-outline) > .wp-block-button__link:hover::after,
	.wp-block-button:not(.is-style-outline) > .wp-element-button:hover::after {
		transform: none;
	}
}
