/* Hover effects for buttons and text links. Add ashv-fx-<name> to the .ashv-pair (or to a lone .ashv-btn, .ashv-ghost or .ashv-link). effects.js adds the inner parts an effect needs. One effect from each family can be combined. See docs/buttons-and-menus.md. */
[class*="ashv-fx-"] {
	--fx-s: var(--ashv-hover-speed, 1);
	--fx-t: calc(300ms * var(--fx-s));
	--fx-ease: var(--ashv-ease, cubic-bezier(0.23, 1, 0.32, 1));
	--fx-in-out: var(--ashv-ease-in-out, cubic-bezier(0.77, 0, 0.175, 1));
	--fx-back: var(--ashv-ease-back, cubic-bezier(0.34, 1.56, 0.64, 1));
	--fx-accent: var(--wp--preset--color--ember);
	position: relative;
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;
}

:where(.ashv-btn, .ashv-ghost, .ashv-link) {
	--fx-fill-default: var(--wp--preset--color--ember-700);
	--fx-stripe-default: var(--wp--preset--color--ember-600);
	--fx-text-default: var(--wp--preset--color--white);
}

:where(.ashv-btn--light) {
	--fx-fill-default: var(--wp--preset--color--charcoal);
	--fx-stripe-default: var(--wp--preset--color--charcoal-800);
}

:where(.ashv-btn--charcoal) {
	--fx-fill-default: var(--wp--preset--color--ember);
	--fx-stripe-default: var(--wp--preset--color--ember-600);
}

:where(.ashv-ghost) {
	--fx-fill-default: var(--wp--preset--color--limestone);
	--fx-stripe-default: var(--wp--preset--color--sand);
	--fx-text-default: var(--wp--preset--color--charcoal);
}

:where(.ashv-chip) {
	--fx-chip-on: var(--wp--preset--color--ember);
	--fx-chip-on-text: var(--wp--preset--color--white);
}

:where(.ashv-chip--light) {
	--fx-chip-on: var(--wp--preset--color--white);
	--fx-chip-on-text: var(--wp--preset--color--ember);
}

/* Movement uses translate, rotate and scale so it never fights the press feedback, which uses transform. */
.ashv-pair[class*="ashv-fx-"],
:is(.ashv-btn, .ashv-ghost):is([class*="ashv-fx-"], [class*="ashv-fx-"] > *),
[class*="ashv-fx-"] > .ashv-chip {
	transition:
		translate var(--fx-t) var(--fx-ease),
		rotate var(--fx-t) var(--fx-ease),
		scale var(--fx-t) var(--fx-ease),
		color var(--fx-t) var(--fx-ease),
		background-color var(--fx-t) var(--fx-ease),
		border-color var(--fx-t) var(--fx-ease),
		border-radius calc(450ms * var(--fx-s)) var(--fx-ease),
		box-shadow var(--fx-t) var(--fx-ease),
		transform 140ms var(--fx-ease);
}

:is(.ashv-btn, .ashv-ghost):is([class*="ashv-fx-"], [class*="ashv-fx-"] > *) {
	position: relative;
	isolation: isolate;
}

:is(.ashv-btn, .ashv-ghost):is([class*="ashv-fx-"]:active, [class*="ashv-fx-"]:active > *) { transform: scale(0.97); }
[class*="ashv-fx-"]:active > .ashv-chip { transform: scale(0.94); }

.ashv-fx__label {
	position: relative;
	display: inline-block;
	transition: translate var(--fx-t) var(--fx-ease), font-weight var(--fx-t) var(--fx-ease);
}

.ashv-fx__char { display: inline-block; }

.ashv-fx__swap,
.ashv-fx__icon {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	border-radius: inherit;
}

.ashv-fx__swap { overflow: hidden; }
.ashv-fx__icon > svg { width: var(--fx-icon-size, 20px); height: var(--fx-icon-size, 20px); }

[class*="ashv-fx-"] > .ashv-chip :is(svg, .ashv-fx__icon) {
	transition:
		transform calc(350ms * var(--fx-s)) var(--fx-ease),
		translate calc(350ms * var(--fx-s)) var(--fx-ease),
		rotate calc(350ms * var(--fx-s)) var(--fx-ease),
		scale calc(350ms * var(--fx-s)) var(--fx-ease),
		opacity var(--fx-t) var(--fx-ease);
}

.ashv-fx__svg {
	position: absolute;
	overflow: visible;
	pointer-events: none;
}

.ashv-fx__svg :is(path, rect) {
	fill: none;
	stroke: var(--fx-accent);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 1;
}

.ashv-fx__spark {
	position: absolute;
	z-index: 2;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--wp--preset--color--flame);
	opacity: 0;
	pointer-events: none;
}

.ashv-fx__spark:nth-of-type(2n) { width: 5px; height: 5px; background: var(--wp--preset--color--ember); }

.ashv-fx__mark {
	position: absolute;
	pointer-events: none;
	fill: currentColor;
}

.ashv-fx__mark path {
	clip-path: inset(100% 0 0 0);
	transition: clip-path calc(420ms * var(--fx-s)) var(--fx-ease);
}

.ashv-fx__mark path:nth-child(2) { transition-delay: calc(70ms * var(--fx-s)); }
.ashv-fx__mark path:nth-child(3) { transition-delay: calc(140ms * var(--fx-s)); }

/* Fills. The colour layer is the pill's ::before (and ::after for the two-part ones). Colours: --fx-fill, --fx-text. */
:is(.ashv-btn, .ashv-ghost):is(:is([class*="ashv-fx-fill-"], .ashv-fx-circle-flood), :is([class*="ashv-fx-fill-"], .ashv-fx-circle-flood) > *) {
	overflow: hidden;
}

:is(.ashv-btn, .ashv-ghost):is(:is([class*="ashv-fx-fill-"], .ashv-fx-circle-flood), :is([class*="ashv-fx-fill-"], .ashv-fx-circle-flood) > *)::before,
:is(.ashv-btn, .ashv-ghost):is(:is(.ashv-fx-fill-halves, .ashv-fx-fill-doors), :is(.ashv-fx-fill-halves, .ashv-fx-fill-doors) > *)::after {
	content: "";
	position: absolute;
	inset: -2px;
	z-index: -1;
	background: var(--fx-fill, var(--fx-fill-default));
	pointer-events: none;
	transition:
		transform calc(480ms * var(--fx-s)) var(--fx-ease),
		clip-path calc(480ms * var(--fx-s)) var(--fx-ease),
		opacity var(--fx-t) var(--fx-ease);
}

:is(.ashv-fx-circle-flood, .ashv-fx-circle-flood > .ashv-btn)::before,
:is(.ashv-fx-fill-chip, .ashv-fx-fill-chip > .ashv-btn)::before {
	inset: auto;
	left: var(--fx-x, 50%);
	top: var(--fx-y, 50%);
	width: 300%;
	aspect-ratio: 1;
	border-radius: 50%;
	transform: translate(-50%, -50%) scale(0);
	transition-duration: calc(450ms * var(--fx-s));
}

:is(.ashv-fx-fill-chip, .ashv-fx-fill-chip > .ashv-btn)::before { left: 100%; top: 50%; transition-duration: calc(600ms * var(--fx-s)); }

:is(.ashv-fx-fill-sweep, .ashv-fx-fill-sweep > .ashv-btn)::before { transform: translateX(-101%); }
:is(.ashv-fx-fill-side, .ashv-fx-fill-side > .ashv-btn)::before { transform: scaleX(0); transform-origin: var(--fx-origin, 0) 50%; }
:is(.ashv-fx-fill-rise, .ashv-fx-fill-rise > .ashv-btn)::before { transform: translateY(101%); }
:is(.ashv-fx-fill-diagonal, .ashv-fx-fill-diagonal > .ashv-btn)::before { inset: -2px -30%; transform: translateX(-112%) skewX(-22deg); }
:is(.ashv-fx-fill-middle, .ashv-fx-fill-middle > .ashv-btn)::before { clip-path: inset(0 50% round var(--wp--custom--radius--button, 6px)); }
:is(.ashv-fx-fill-halves, .ashv-fx-fill-halves > .ashv-btn)::before { bottom: 50%; transform: translateY(-101%); }
:is(.ashv-fx-fill-halves, .ashv-fx-fill-halves > .ashv-btn)::after { top: 50%; transform: translateY(101%); }
:is(.ashv-fx-fill-doors, .ashv-fx-fill-doors > .ashv-btn)::before { right: 50%; transform: translateX(-101%); transition-timing-function: var(--fx-in-out); }
:is(.ashv-fx-fill-doors, .ashv-fx-fill-doors > .ashv-btn)::after { left: 50%; transform: translateX(101%); transition-timing-function: var(--fx-in-out); }

:is(.ashv-fx-fill-wave, .ashv-fx-fill-wave > .ashv-btn)::before {
	inset: auto;
	left: -20px;
	right: -20px;
	top: 100%;
	height: calc(100% + 18px);
	mask: radial-gradient(circle 8px at 8px 8px, #000 97%, #0000) 0 0 / 16px 16px repeat-x, linear-gradient(#000 0 0) 0 8px / 100% 100% no-repeat;
	transition-duration: calc(700ms * var(--fx-s));
}

:is(.ashv-fx-fill-hazard, .ashv-fx-fill-hazard > .ashv-btn)::before {
	inset: -2px -24px;
	background: repeating-linear-gradient(-45deg, var(--fx-fill, var(--fx-fill-default)) 0 10px, var(--fx-stripe, var(--fx-stripe-default)) 10px 20px);
	transform: translateX(-101%);
	transition-duration: calc(600ms * var(--fx-s));
}

:is(.ashv-fx-fill-blueprint, .ashv-fx-fill-blueprint > .ashv-btn)::before {
	--grid: color-mix(in srgb, var(--fx-text, var(--fx-text-default)) 16%, transparent);
	background:
		linear-gradient(var(--grid) 1px, transparent 1px) 50% 50% / 14px 14px,
		linear-gradient(90deg, var(--grid) 1px, transparent 1px) 50% 50% / 14px 14px,
		var(--fx-fill, var(--fx-fill-default));
	opacity: 0;
	transform: scale(1.25);
}

.ashv-btn:is(.ashv-fx-spotlight, .ashv-fx-spotlight > *),
.ashv-btn:is(.ashv-fx-shine, .ashv-fx-shine > *),
.ashv-btn:is(.ashv-fx-heat, .ashv-fx-heat > *),
.ashv-btn:is(.ashv-fx-signal, .ashv-fx-signal > *) {
	overflow: hidden;
}

.ashv-btn:is(.ashv-fx-spotlight, .ashv-fx-spotlight > *)::before,
.ashv-btn:is(.ashv-fx-heat, .ashv-fx-heat > *)::before {
	content: "";
	position: absolute;
	inset: -2px;
	z-index: -1;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--fx-t) var(--fx-ease), transform calc(500ms * var(--fx-s)) var(--fx-ease);
}

.ashv-btn:is(.ashv-fx-spotlight, .ashv-fx-spotlight > *)::before {
	background: radial-gradient(circle 80px at var(--fx-x, 50%) var(--fx-y, 50%), color-mix(in srgb, var(--fx-glow, var(--wp--preset--color--flame)) 60%, transparent), transparent);
}

.ashv-btn:is(.ashv-fx-heat, .ashv-fx-heat > *)::before {
	background: linear-gradient(0deg, color-mix(in srgb, var(--fx-glow, var(--wp--preset--color--flame)) 65%, transparent), transparent 75%);
	transform: translateY(40%);
}

.ashv-btn:is(.ashv-fx-shine, .ashv-fx-shine > *)::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 40%;
	background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.35), transparent);
	transform: translateX(-130%);
	transition: transform calc(800ms * var(--fx-s)) var(--fx-ease);
	pointer-events: none;
}

:is(.ashv-btn, .ashv-ghost):is(.ashv-fx-border-flood, .ashv-fx-border-flood > *) {
	box-shadow: inset 0 0 0 0 var(--fx-fill, var(--fx-fill-default));
	transition: box-shadow calc(500ms * var(--fx-s)) var(--fx-ease), color var(--fx-t) var(--fx-ease), transform 140ms var(--fx-ease);
}

/* Chip effects. Each needs the round arrow chip beside the pill. */
[class*="ashv-fx-chip-"] > .ashv-chip { position: relative; }

.ashv-fx-chip-loop .ashv-fx__icon + .ashv-fx__icon { transform: translate(-120%, 120%); }
.ashv-fx-chip-swap .ashv-fx__icon + .ashv-fx__icon { transform: translateX(-130%); }
.ashv-fx-chip-down .ashv-fx__icon + .ashv-fx__icon { transform: translateY(-130%); }

.ashv-fx-chip-roll > .ashv-chip { transition-duration: calc(600ms * var(--fx-s)); }
.ashv-fx-chip-grow > .ashv-chip,
.ashv-fx-chip-dock > .ashv-chip { transition-timing-function: var(--fx-back); transition-duration: calc(380ms * var(--fx-s)); }
.ashv-fx-chip-flip > .ashv-chip { transition-duration: calc(600ms * var(--fx-s)); }

.ashv-fx-chip-fill > .ashv-chip { isolation: isolate; overflow: hidden; }

.ashv-fx-chip-fill > .ashv-chip::before {
	content: "";
	position: absolute;
	inset: -1px;
	z-index: -1;
	border-radius: inherit;
	background: var(--fx-chip-on);
	transform: translateY(101%);
	transition: transform calc(420ms * var(--fx-s)) var(--fx-ease);
}

.ashv-fx-chip-stretch > .ashv-chip { isolation: isolate; overflow: visible; }

.ashv-fx-chip-stretch > .ashv-chip::after {
	content: "";
	position: absolute;
	inset: 0 -16px 0 0;
	z-index: -1;
	border-radius: var(--wp--custom--radius--button, 6px);
	background: inherit;
	clip-path: inset(0 16px 0 0 round var(--wp--custom--radius--button, 6px));
	transition: clip-path calc(380ms * var(--fx-s)) var(--fx-ease);
}

.ashv-fx-chip-signal > .ashv-chip .ashv-fx__mark { inset: 0; margin: auto; width: 44%; height: auto; }
.ashv-fx-chip-signal > .ashv-chip :is(svg:not(.ashv-fx__mark), .ashv-fx__icon) { transition-timing-function: var(--fx-ease); }

.ashv-fx-chip-sparks > .ashv-fx__spark { right: 22px; top: 4px; }
.ashv-fx-chip-sparks > .ashv-fx__spark:nth-of-type(2) { --spark-x: 22px; --spark-y: -22px; }
.ashv-fx-chip-sparks > .ashv-fx__spark:nth-of-type(3) { --spark-x: -6px; --spark-y: -30px; }

/* Label effects. effects.js wraps the label so it can move on its own. */
.ashv-fx-label-roll .ashv-fx__label {
	overflow: hidden;
	padding-block: 0.25em;
	margin-block: -0.25em;
}

.ashv-fx-label-roll .ashv-fx__roll { display: block; transition: transform calc(380ms * var(--fx-s)) var(--fx-ease); }

.ashv-fx-label-roll .ashv-fx__label::after {
	content: attr(data-label);
	position: absolute;
	left: 0;
	top: 0.25em;
	transform: translateY(150%);
	transition: transform calc(380ms * var(--fx-s)) var(--fx-ease);
}

.ashv-fx-label-letters .ashv-fx__label { display: inline-flex; height: 1.4em; overflow: hidden; line-height: 1.4; }

.ashv-fx-label-letters .ashv-fx__char {
	text-shadow: 0 1.4em 0 currentColor;
	transition: transform calc(380ms * var(--fx-s)) var(--fx-ease) calc(var(--i) * 18ms * var(--fx-s));
}

.ashv-fx-label-thicken .ashv-fx__label {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
}

.ashv-fx-label-thicken .ashv-fx__label::after {
	content: attr(data-label);
	height: 0;
	overflow: hidden;
	visibility: hidden;
	font-weight: 800;
}

.ashv-fx-label-underline .ashv-fx__label::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -5px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: 100% 50%;
	transition: transform calc(380ms * var(--fx-s)) var(--fx-ease);
}

.ashv-fx-label-marker .ashv-fx__label::before {
	content: "";
	position: absolute;
	inset: -0.3em -0.4em;
	z-index: -1;
	border-radius: 0.3em;
	background: var(--fx-marker, color-mix(in srgb, currentColor 22%, transparent));
	transform: scaleX(0) rotate(-1.5deg);
	transform-origin: 0 50%;
	transition: transform calc(420ms * var(--fx-s)) var(--fx-ease);
}

.ashv-fx-label-arrow .ashv-fx__arrow {
	position: absolute;
	right: 14px;
	top: calc(50% - 9px);
	width: 18px;
	height: 18px;
	opacity: 0;
	translate: -8px 0;
	transition: translate var(--fx-t) var(--fx-ease), opacity var(--fx-t) var(--fx-ease);
}

/* Whole-button effects. */
.ashv-fx-grow,
.ashv-fx-tilt { transition-timing-function: var(--fx-back); transition-duration: calc(320ms * var(--fx-s)); }

.ashv-btn:is(.ashv-fx-outline-draw, .ashv-fx-pen-circle, .ashv-fx-sparks) { overflow: visible; }

.ashv-fx-outline-draw > .ashv-fx__svg { inset: -5px; width: calc(100% + 10px); height: calc(100% + 10px); }
.ashv-fx-outline-draw > .ashv-fx__svg rect { transition: stroke-dashoffset calc(800ms * var(--fx-s)) var(--fx-in-out); }

.ashv-fx-pen-circle > .ashv-fx__svg { inset: -9px -12px; width: calc(100% + 24px); height: calc(100% + 18px); opacity: 0; transition: opacity calc(120ms * var(--fx-s)) var(--fx-ease); }
.ashv-fx-pen-circle > .ashv-fx__svg path { stroke-width: 2.5; transition: stroke-dashoffset calc(700ms * var(--fx-s)) var(--fx-ease); }

.ashv-fx-sparks > .ashv-fx__spark { left: 62%; top: 0; }
.ashv-fx-sparks > .ashv-fx__spark:nth-of-type(2) { left: 38%; --spark-x: -10px; --spark-y: -26px; }
.ashv-fx-sparks > .ashv-fx__spark:nth-of-type(3) { left: 78%; --spark-x: 14px; --spark-y: -22px; }

.ashv-btn:is(.ashv-fx-signal, .ashv-fx-signal > *) > .ashv-fx__mark {
	right: 2px;
	bottom: -8%;
	z-index: -1;
	height: 96%;
	width: auto;
	opacity: 0.18;
}

/* Text links. */
:is(.ashv-fx-link-grow, .ashv-fx-link-underline, .ashv-fx-link-thick, .ashv-fx-link-pen) { padding-bottom: 3px; }

.ashv-link[class*="ashv-fx-link-"] svg {
	transition: transform var(--fx-t) var(--fx-ease), translate var(--fx-t) var(--fx-ease), background-color var(--fx-t) var(--fx-ease), box-shadow var(--fx-t) var(--fx-ease), color var(--fx-t) var(--fx-ease);
}

:is(.ashv-fx-link-grow, .ashv-fx-link-underline, .ashv-fx-link-thick)::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: 100% 50%;
	transition: transform calc(350ms * var(--fx-s)) var(--fx-ease);
}

.ashv-fx-link-grow::after { transform: scaleX(0.35); }
.ashv-fx-link-thick::after { height: 1px; transform: none; transform-origin: 50% 100%; }

.ashv-fx-link-pen::after {
	content: "";
	position: absolute;
	left: -2px;
	right: -2px;
	bottom: -5px;
	height: 8px;
	background: var(--fx-accent);
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9C40 3 90 3 130 7s55 4 68-3' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	clip-path: inset(0 100% 0 0);
	transition: clip-path calc(500ms * var(--fx-s)) var(--fx-ease);
}

.ashv-fx-link-marker::before {
	content: "";
	position: absolute;
	inset: 0 -6px;
	z-index: -1;
	border-radius: 6px;
	background: var(--fx-marker, var(--wp--preset--color--ember-100));
	transform: scaleX(0) rotate(-1deg);
	transform-origin: 0 50%;
	transition: transform calc(420ms * var(--fx-s)) var(--fx-ease);
}

/* base.css gives every link a short underline; these two replace it. */
:is(.ashv-fx-link-marker, .ashv-fx-link-chip)::after { content: none; }

.ashv-fx-link-chip svg { border-radius: 50%; background-color: transparent; box-shadow: 0 0 0 0 transparent; }

@media (hover: hover) and (pointer: fine) {
	:is(.ashv-btn, .ashv-ghost):is(:is([class*="ashv-fx-fill-"], .ashv-fx-circle-flood, .ashv-fx-border-flood):hover, :is([class*="ashv-fx-fill-"], .ashv-fx-circle-flood, .ashv-fx-border-flood):hover > *) {
		color: var(--fx-text, var(--fx-text-default));
	}

	/* base.css fills the ghost button on hover; an effect replaces that fill. */
	.ashv-ghost:is([class*="ashv-fx-fill-"], .ashv-fx-circle-flood, .ashv-fx-border-flood):hover { background-color: transparent; border-color: var(--fx-fill, var(--fx-fill-default)); }

	:is(.ashv-fx-circle-flood:hover, .ashv-fx-circle-flood:hover > .ashv-btn)::before,
	:is(.ashv-fx-fill-chip:hover, .ashv-fx-fill-chip:hover > .ashv-btn)::before { transform: translate(-50%, -50%) scale(1); }

	:is(.ashv-fx-fill-sweep:hover, .ashv-fx-fill-sweep:hover > .ashv-btn)::before,
	:is(.ashv-fx-fill-rise:hover, .ashv-fx-fill-rise:hover > .ashv-btn)::before,
	:is(.ashv-fx-fill-hazard:hover, .ashv-fx-fill-hazard:hover > .ashv-btn)::before,
	:is(.ashv-fx-fill-halves:hover, .ashv-fx-fill-halves:hover > .ashv-btn)::before,
	:is(.ashv-fx-fill-halves:hover, .ashv-fx-fill-halves:hover > .ashv-btn)::after,
	:is(.ashv-fx-fill-doors:hover, .ashv-fx-fill-doors:hover > .ashv-btn)::before,
	:is(.ashv-fx-fill-doors:hover, .ashv-fx-fill-doors:hover > .ashv-btn)::after { transform: none; }

	:is(.ashv-fx-fill-side:hover, .ashv-fx-fill-side:hover > .ashv-btn)::before { transform: scaleX(1); }
	:is(.ashv-fx-fill-diagonal:hover, .ashv-fx-fill-diagonal:hover > .ashv-btn)::before { transform: skewX(-22deg); }
	:is(.ashv-fx-fill-middle:hover, .ashv-fx-fill-middle:hover > .ashv-btn)::before { clip-path: inset(0 0% round var(--wp--custom--radius--button, 6px)); }
	:is(.ashv-fx-fill-wave:hover, .ashv-fx-fill-wave:hover > .ashv-btn)::before { transform: translate(16px, -100%); }
	:is(.ashv-fx-fill-blueprint:hover, .ashv-fx-fill-blueprint:hover > .ashv-btn)::before { opacity: 1; transform: none; }

	.ashv-btn:is(.ashv-fx-spotlight:hover, .ashv-fx-spotlight:hover > *)::before { opacity: 1; }
	.ashv-btn:is(.ashv-fx-heat:hover, .ashv-fx-heat:hover > *)::before { opacity: 1; transform: none; }
	.ashv-btn:is(.ashv-fx-shine:hover, .ashv-fx-shine:hover > *)::after { transform: translateX(290%); }
	:is(.ashv-btn, .ashv-ghost):is(.ashv-fx-border-flood:hover, .ashv-fx-border-flood:hover > *) { box-shadow: inset 0 0 0 2em var(--fx-fill, var(--fx-fill-default)); }

	[class*="ashv-fx-chip-"]:not(.ashv-fx-chip-fill, .ashv-fx-chip-trade):hover > .ashv-chip {
		background-color: var(--fx-chip-on);
		color: var(--fx-chip-on-text);
	}

	.ashv-fx-chip-loop:hover > .ashv-chip { translate: 6px 0; rotate: -8deg; }
	.ashv-fx-chip-loop:hover .ashv-fx__icon:first-child { transform: translate(120%, -120%); }
	.ashv-fx-chip-swap:hover .ashv-fx__icon:first-child { transform: translateX(130%); }
	.ashv-fx-chip-down:hover .ashv-fx__icon:first-child { transform: translateY(130%); }
	:is(.ashv-fx-chip-loop, .ashv-fx-chip-swap, .ashv-fx-chip-down):hover .ashv-fx__icon + .ashv-fx__icon { transform: none; }
	.ashv-fx-chip-turn:hover > .ashv-chip svg { rotate: -45deg; }
	.ashv-fx-chip-roll:hover > .ashv-chip { translate: 10px 0; rotate: 360deg; }
	.ashv-fx-chip-dock:hover > .ashv-chip { translate: -9px 0; scale: 0.9; }
	.ashv-fx-chip-part:hover > .ashv-chip { translate: 8px 0; }
	.ashv-fx-chip-part:hover > .ashv-chip svg { translate: 2px 0; }
	.ashv-fx-chip-grow:hover > .ashv-chip { scale: 1.12; }
	.ashv-fx-chip-flip:hover > .ashv-chip { rotate: x 360deg; }
	.ashv-fx-chip-fill:hover > .ashv-chip { color: var(--fx-chip-on-text); }
	.ashv-fx-chip-fill:hover > .ashv-chip::before { transform: none; }
	.ashv-fx-chip-fill:hover > .ashv-chip svg { translate: 2px 0; }
	.ashv-fx-chip-stretch:hover > .ashv-chip::after { clip-path: inset(0 0 0 0 round var(--wp--custom--radius--button, 6px)); }
	.ashv-fx-chip-stretch:hover > .ashv-chip svg { translate: 8px 0; }
	.ashv-fx-chip-signal:hover > .ashv-chip :is(svg:not(.ashv-fx__mark), .ashv-fx__icon) { opacity: 0; scale: 0.6; }
	.ashv-fx-chip-signal:hover > .ashv-chip .ashv-fx__mark path { clip-path: inset(0); }
	.ashv-fx-chip-trade:hover > .ashv-btn { background-color: var(--fx-trade, var(--wp--preset--color--charcoal)); color: var(--wp--preset--color--white); }
	.ashv-fx-chip-trade:hover > .ashv-chip { background-color: var(--fx-chip-on); color: var(--fx-chip-on-text); }

	.ashv-fx-label-roll:hover .ashv-fx__roll { transform: translateY(-150%); }
	.ashv-fx-label-roll:hover .ashv-fx__label::after { transform: none; }
	.ashv-fx-label-letters:hover .ashv-fx__char { transform: translateY(-1.4em); }
	.ashv-fx-label-thicken:hover .ashv-fx__label { font-weight: 800; }
	.ashv-fx-label-underline:hover .ashv-fx__label::after { transform: none; transform-origin: 0 50%; }
	.ashv-fx-label-marker:hover .ashv-fx__label::before { transform: rotate(-1.5deg); }
	.ashv-fx-label-arrow:hover .ashv-fx__label { translate: -10px 0; }
	.ashv-fx-label-arrow:hover .ashv-fx__arrow { opacity: 1; translate: 0 0; }

	.ashv-fx-lift:hover { translate: 0 -3px; }
	:is(.ashv-btn, .ashv-ghost, .ashv-chip):is(.ashv-fx-lift:hover, .ashv-fx-lift:hover > *) { box-shadow: var(--wp--custom--shadow--deep-hover); }
	.ashv-fx-grow:hover { scale: 1.05; }
	.ashv-fx-tilt:hover { rotate: -2deg; scale: 1.03; }
	:is(.ashv-btn, .ashv-ghost, .ashv-chip):is(.ashv-fx-sharpen:hover, .ashv-fx-sharpen:hover > *) { border-radius: var(--wp--custom--radius--inner, 12px); }
	:is(.ashv-btn, .ashv-ghost, .ashv-chip):is(.ashv-fx-glow:hover, .ashv-fx-glow:hover > *) { box-shadow: 0 10px 28px -4px color-mix(in srgb, var(--fx-accent) 65%, transparent); }
	:is(.ashv-btn, .ashv-ghost, .ashv-chip):is(.ashv-fx-halo:hover, .ashv-fx-halo:hover > *) { box-shadow: 0 0 0 5px color-mix(in srgb, var(--fx-accent) 26%, transparent); }
	.ashv-fx-outline-draw:hover > .ashv-fx__svg rect { stroke-dashoffset: 0; }
	.ashv-fx-pen-circle:hover > .ashv-fx__svg { opacity: 1; }
	.ashv-fx-pen-circle:hover > .ashv-fx__svg path { stroke-dashoffset: 0; }
	.ashv-btn:is(.ashv-fx-signal:hover, .ashv-fx-signal:hover > *) > .ashv-fx__mark path { clip-path: inset(0); }

	.ashv-fx-link-grow:hover::after,
	.ashv-fx-link-underline:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
	.ashv-fx-link-thick:hover::after { transform: scaleY(3); }
	.ashv-fx-link-pen:hover::after { clip-path: inset(0); }
	.ashv-fx-link-marker:hover::before { transform: rotate(-1deg); }
	.ashv-fx-link-chip:hover svg { translate: 4px 0; background-color: var(--fx-accent); color: var(--wp--preset--color--white); box-shadow: 0 0 0 7px var(--fx-accent); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.ashv-fx-chip-hop:hover > .ashv-chip svg { animation: ashv-fx-hop calc(650ms * var(--fx-s)) var(--fx-ease); }
	.ashv-fx-chip-ring:hover > .ashv-chip { animation: ashv-fx-ring calc(800ms * var(--fx-s)) var(--fx-ease); }
	:is(.ashv-btn, .ashv-ghost, .ashv-chip):is(.ashv-fx-ring-pulse:hover, .ashv-fx-ring-pulse:hover > *) { animation: ashv-fx-ring calc(800ms * var(--fx-s)) var(--fx-ease); }
	.ashv-fx-label-hop:hover .ashv-fx__char { animation: ashv-fx-hop-up calc(420ms * var(--fx-s)) var(--fx-ease) calc(var(--i) * 24ms * var(--fx-s)); }
	:is(.ashv-fx-sparks, .ashv-fx-chip-sparks):hover > .ashv-fx__spark { animation: ashv-fx-spark calc(800ms * var(--fx-s)) var(--fx-ease); }
	:is(.ashv-fx-sparks, .ashv-fx-chip-sparks):hover > .ashv-fx__spark:nth-of-type(2) { animation-delay: calc(90ms * var(--fx-s)); }
	:is(.ashv-fx-sparks, .ashv-fx-chip-sparks):hover > .ashv-fx__spark:nth-of-type(3) { animation-delay: calc(180ms * var(--fx-s)); }
	.ashv-fx-link-swap:hover svg { animation: ashv-fx-arrow-swap calc(420ms * var(--fx-s)) var(--fx-ease); }
}

@keyframes ashv-fx-hop { 25% { translate: 5px 0; } 50% { translate: 0 0; } 72% { translate: 3px 0; } }
@keyframes ashv-fx-hop-up { 40% { translate: 0 -4px; } }
@keyframes ashv-fx-ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fx-accent) 55%, transparent); } to { box-shadow: 0 0 0 14px color-mix(in srgb, var(--fx-accent) 0%, transparent); } }
@keyframes ashv-fx-spark { 0% { opacity: 0; translate: 0 6px; scale: 0.5; } 25% { opacity: 1; } 100% { opacity: 0; translate: var(--spark-x, 6px) var(--spark-y, -30px); scale: 1; } }
@keyframes ashv-fx-arrow-swap { 45% { translate: 130% 0; opacity: 0; } 46% { translate: -130% 0; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
	[class*="ashv-fx-"],
	[class*="ashv-fx-"] *,
	[class*="ashv-fx-"]::before,
	[class*="ashv-fx-"]::after,
	[class*="ashv-fx-"] *::before,
	[class*="ashv-fx-"] *::after {
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
		translate: none !important;
		rotate: none !important;
		scale: none !important;
	}
}
