.scf-pie-chart {
	display: flex;
	align-items: center;
	gap: 2rem;
	width: 100%;
}

.scf-pie-chart--right {
	flex-direction: row-reverse;
}

.scf-pie-chart__graphic {
	display: flex;
	flex: 0 1 40%;
	align-items: center;
	justify-content: center;
	max-width: 40%;
	min-width: 0;
}

.scf-pie-chart__svg {
	display: block;
	width: 260px;
	max-width: 100%;
	height: auto;
	overflow: visible;
}

.scf-pie-chart__segment {
	stroke: #fff;
	stroke-width: 0.7;
	stroke-linejoin: round;
}

.scf-pie-chart__center {
	font-size: 8px;
	font-weight: 600;
}

.scf-pie-chart__content {
	flex: 1 1 0;
	min-width: 0;
}

.scf-pie-chart__title {
	margin: 0 0 0.5rem;
}

.scf-pie-chart__subtitle {
	margin: 0 0 0.75rem;
}

.scf-pie-chart__description {
	margin-block: 0.75rem;
}

.scf-pie-chart__description p:last-child {
	margin-bottom: 0;
}

.scf-pie-chart__legend {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1.25rem 1.5rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

.scf-pie-chart__legend-item {
	display: grid;
	grid-template-columns: 0.9rem auto minmax(0, 1fr);
	align-items: start;
	gap: 0.75rem;
}

.scf-pie-chart__swatch {
	width: 0.85rem;
	height: 0.85rem;
	margin-top: 0.25em;
	border-radius: 50%;
	background: var(--scf-pie-color, #2f6f8f);
}

.scf-pie-chart__legend-text {
	display: grid;
	gap: 0.2rem;
}

.scf-pie-chart__legend-value {
	text-align: left;
	white-space: nowrap;
}

.scf-pie-chart__legend-percentage {
	font-variant-numeric: tabular-nums;
}

.scf-pie-chart--animated .scf-pie-chart__graphic--animated {
	animation: scf-pie-chart-enter 650ms ease-out both;
}

@keyframes scf-pie-chart-enter {
	from {
		opacity: 0;
		transform: scale(0.92);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

@media (max-width: 767px) {
	.scf-pie-chart,
	.scf-pie-chart--right {
		flex-direction: column;
		align-items: stretch;
	}

	.scf-pie-chart__graphic {
		flex-basis: 100% !important;
		max-width: 100% !important;
		width: 100%;
	}

	.scf-pie-chart__content {
		width: 100%;
	}

	.scf-pie-chart__legend-item {
		grid-template-columns: 0.9rem minmax(0, 1fr);
	}

	.scf-pie-chart__legend-value {
		grid-column: 2;
		text-align: left;
		white-space: normal;
	}
}

@media (prefers-reduced-motion: reduce) {
	.scf-pie-chart--animated .scf-pie-chart__graphic--animated {
		animation: none;
	}
}
