/**
 * Key figures widget.
 *
 * Colours follow the Elementor kit (primary for the text, secondary for the
 * arrows), with the current values as fallbacks.
 */

.akf {
	--akf-gap: 40px;
	--akf-per-view: 3;
	--akf-size: 270px;
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--e-global-color-primary, #1d3d91);
}

.akf__track {
	display: flex;
	gap: var(--akf-gap);
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.akf__track::-webkit-scrollbar {
	display: none;
}

.akf__track:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.akf__item {
	display: flex;
	justify-content: center;
	flex: 0 0 calc((100% - (var(--akf-per-view) - 1) * var(--akf-gap)) / var(--akf-per-view));
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
}

.akf__item::before,
.akf__item::marker {
	content: none;
}

.akf__circle {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: min(var(--akf-size), 100%);
	aspect-ratio: 1;
	padding: 24px;
	text-align: center;
	background: #fff;
	border-radius: 50%;
	box-sizing: border-box;
}

.akf__value {
	display: block;
	font-size: 46px;
	font-weight: 700;
	line-height: 1.05;
	white-space: nowrap;
}

.akf__label {
	display: block;
	margin-top: 4px;
	font-size: 25px;
	font-weight: 600;
	line-height: 1.2;
}

/*
 * (0,2,0) on purpose: the Elementor kit and the child theme style the bare
 * `button` element and would win otherwise.
 */
.akf .akf__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 48px;
	min-width: 0;
	height: 48px;
	padding: 0;
	color: var(--e-global-color-secondary, #74a4bd);
	background: transparent;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
}

.akf .akf__nav:hover,
.akf .akf__nav:focus-visible {
	color: var(--e-global-color-primary, #1d3d91);
	background: rgba(29, 61, 145, 0.08);
}

.akf .akf__nav:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.akf__nav--next svg {
	transform: scaleX(-1);
}

/* Everything fits: no arrows needed. */
.akf--static .akf__nav {
	visibility: hidden;
}

@media (max-width: 1024px) {
	.akf {
		--akf-per-view: 2;
		--akf-gap: 24px;
	}
}

@media (max-width: 767px) {
	.akf {
		--akf-per-view: 1;
		--akf-size: 240px;
		gap: 4px;
	}

	.akf .akf__nav {
		width: 40px;
		height: 40px;
	}

	.akf__value {
		font-size: 40px;
	}

	.akf__label {
		font-size: 22px;
	}
}
