/* ---- *
 * fast-counter — animated counter widget
 * ---- */

.fast-counter {
	--fast-ct-gap: 8px;
	--fast-ct-title-gap: 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--fast-ct-gap);
	text-align: center;
}

/* ---------------------------------------------------------- icon */

.fast-counter__icon {
	display: block;
	line-height: 1;
	font-size: 32px;
	color: inherit;
}

.fast-counter--icon-beside {
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: calc(var(--fast-ct-gap) * 1.5);
}

.fast-counter--icon-beside .fast-counter__icon {
	font-size: 48px;
}

/* ---------------------------------------------------------- number */

.fast-counter__number {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 2px;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
	line-height: 1.1;
}

.fast-counter__prefix,
.fast-counter__suffix {
	font-size: 0.6em;
	opacity: 0.85;
}

.fast-counter__value {
	font-weight: 700;
}

/* ---------------------------------------------------------- title */

.fast-counter__title {
	margin: 0;
	font-weight: 600;
	opacity: 0.85;
}

.fast-counter--title-above .fast-counter__title {
	margin-bottom: var(--fast-ct-title-gap);
	order: -1;
}

.fast-counter--title-below .fast-counter__title {
	margin-top: var(--fast-ct-title-gap);
}

/* ---------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
	.fast-counter__value {
		transition: none !important;
	}
}
