.animation-text-hover {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.animation-text-hover__placeholder {
	margin: 0;
	color: var(--wp--preset--color--grey-500);
	font-style: italic;
}

.animation-text-hover__item {
	cursor: default;
}

.animation-text-hover__title {
	margin: 0;
	transition: color 0.55s cubic-bezier(0.22, 1, 0.36, 1);
	font-weight: 400;
	cursor: pointer;
	color: var(--wp--preset--color--grey-400);
}

.animation-text-hover__text {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	margin-top: 0;
	transition:
		grid-template-rows 0.6s cubic-bezier(0.22, 1, 0.36, 1),
		opacity 0.5s ease,
		margin-top 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.animation-text-hover__text-inner {
	overflow: hidden;
	min-height: 0;
}

.animation-text-hover__text-inner > :first-child {
	margin-top: 0;
}

.animation-text-hover__text-inner > :last-child {
	margin-bottom: 0;
}

.animation-text-hover__item.is-active .animation-text-hover__title,
.animation-text-hover__item:hover .animation-text-hover__title {
	color: var(--wp--preset--color--primary);
}

.animation-text-hover__item.is-active .animation-text-hover__text,
.animation-text-hover__item:hover .animation-text-hover__text {
	grid-template-rows: 1fr;
	opacity: 1;
	margin-top: 0.5rem;
}

.animation-text-hover:has(.animation-text-hover__item:hover) .animation-text-hover__item:not(:hover) .animation-text-hover__title {
	color: var(--wp--preset--color--grey-400);
}

.animation-text-hover:has(.animation-text-hover__item:hover) .animation-text-hover__item:not(:hover) .animation-text-hover__text {
	grid-template-rows: 0fr;
	opacity: 0;
	margin-top: 0;
}

.animation-text-hover--editor .animation-text-hover__title {
	color: var(--wp--preset--color--primary);
}

.animation-text-hover--editor .animation-text-hover__text {
	grid-template-rows: 1fr;
	opacity: 1;
	margin-top: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
	.animation-text-hover__title,
	.animation-text-hover__text {
		transition-duration: 0.01ms;
	}
}
