.elevation {
	--wp-components-elevation-border-radius: initial;

	background: transparent;
	border-radius: var(--wp-components-elevation-border-radius);
	display: block;
	inset: var(--wp-components-elevation-offset);
	margin: 0 !important;
	opacity: 1;
	pointer-events: none;
	position: absolute;
	will-change: box-shadow;

	@media not (prefers-reduced-motion) {
		transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
	}
}

.has-shadow {
	box-shadow: var(--wp-components-elevation-shadow);
}

// CSS-wide keywords must apply to border-radius itself, not to a custom property.
@each $keyword in inherit, initial, unset, revert, revert-layer {
	.border-radius-#{$keyword} {
		border-radius: $keyword;
	}
}

.has-hover {
	*:hover > & {
		box-shadow: var(--wp-components-elevation-hover-shadow);
	}
}

.has-focus {
	*:focus > & {
		box-shadow: var(--wp-components-elevation-focus-shadow);
	}
}

.has-active {
	*:active > & {
		box-shadow: var(--wp-components-elevation-active-shadow);
	}
}
