/* Optional core styles. Decorative layers never capture input or replace focus. */
.wp-block-button.is-style-button-shimmer > .wp-block-button__link {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: var(--wp--custom--effects--shimmer--background);
	color: var(--wp--custom--effects--shimmer--text);
	overflow-wrap: anywhere;
}
.wp-block-button.is-style-button-shimmer > .wp-block-button__link::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(var(--wp--custom--effects--shimmer--angle), var(--wp--custom--effects--shimmer--clear), var(--wp--custom--effects--shimmer--highlight), var(--wp--custom--effects--shimmer--clear));
	opacity: 0;
	transform: translateX(var(--wp--custom--effects--shimmer--start));
}
.wp-block-group.is-style-card-glow {
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	overflow-wrap: anywhere;
}
.wp-block-group.is-style-card-glow::after {
	content: '';
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	border: var(--wp--custom--effects--glow--width) solid var(--wp--custom--effects--glow--light);
	border-radius: inherit;
	pointer-events: none;
	opacity: 0;
}
@supports (mask-composite: exclude) {
	.wp-block-group.is-style-card-glow::after {
		border: 0;
		padding: var(--wp--custom--effects--glow--width);
		background: linear-gradient(var(--wp--custom--effects--glow--angle), var(--wp--custom--effects--glow--light), var(--wp--preset--color--focus), var(--wp--custom--effects--glow--light));
		mask: linear-gradient(var(--wp--custom--effects--glow--text) 0 0) content-box, linear-gradient(var(--wp--custom--effects--glow--text) 0 0);
		mask-composite: exclude;
	}
}
/* Focus contrast is independent of the decorative layers and surrounding section. */
.wp-block-button.is-style-button-shimmer > .wp-block-button__link:focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--custom--effects--shimmer--text);
	outline-offset: calc(-1 * var(--wp--custom--focus--width));
}
.wp-block-group.is-style-card-glow:focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--custom--effects--glow--text);
	outline-offset: calc(-1 * var(--wp--custom--focus--width));
}
.wp-block-group.is-style-card-glow :is(h1, h2, h3, h4, h5, h6, p) {
	color: var(--wp--custom--effects--glow--text);
}
.wp-block-group.is-style-card-glow a:not(.wp-element-button) {
	color: var(--wp--custom--effects--glow--link);
}
.wp-block-group.is-style-card-glow :is(a, button, input, select, textarea, summary):focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--custom--effects--glow--focus);
	outline-offset: var(--wp--custom--focus--offset);
}
/* A nested shimmer button retains its inner, high-contrast outline. */
.wp-block-group.is-style-card-glow .wp-block-button.is-style-button-shimmer > .wp-block-button__link:focus-visible {
	outline-color: var(--wp--custom--effects--shimmer--text);
	outline-offset: calc(-1 * var(--wp--custom--focus--width));
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
	.wp-block-button.is-style-button-shimmer > .wp-block-button__link:hover::before {
		animation: forge-button-shimmer var(--wp--custom--motion--duration--long) var(--wp--custom--motion--easing) var(--wp--custom--motion--delay) 1;
	}
	.wp-block-group.is-style-card-glow:hover::after {
		animation: forge-card-glow var(--wp--custom--motion--duration--long) var(--wp--custom--motion--easing) var(--wp--custom--motion--delay) 1;
	}
}
@media (prefers-reduced-motion: no-preference) {
	.wp-block-button.is-style-button-shimmer > .wp-block-button__link:focus-visible::before {
		animation: forge-button-shimmer var(--wp--custom--motion--duration--long) var(--wp--custom--motion--easing) var(--wp--custom--motion--delay) 1;
	}
}
@keyframes forge-button-shimmer {
	from { transform: translateX(var(--wp--custom--effects--shimmer--start)); opacity: 0; }
	50% { opacity: calc(1 - var(--wp--custom--effects--shimmer--base-opacity)); }
	to { transform: translateX(var(--wp--custom--effects--shimmer--end)); opacity: 0; }
}
@keyframes forge-card-glow {
	from { opacity: 0; }
	50% { opacity: var(--wp--custom--effects--glow--peak-opacity); }
	to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-button.is-style-button-shimmer > .wp-block-button__link::before,
	.wp-block-group.is-style-card-glow::after {
		animation: none !important;
		opacity: 0;
	}
}
