.hd4d-progress-bar-wrapper {
	display: flex;
}

.hd4d-progress-bar-wrapper.left {
	justify-content: flex-start;
}

.hd4d-progress-bar-wrapper.center {
	justify-content: center;
}

.hd4d-progress-bar-wrapper.right {
	justify-content: flex-end;
}

.hd4d-progress-circle {
	position: relative;
	display: inline-block;
}

.hd4d-progress-ring {
	display: block;
	width: 100%;
	height: 100%;
	/* SVG circles start their stroke at "3 o'clock" (angle 0) and run
	   clockwise by default. Rotating -90deg moves the start to "12
	   o'clock" so the ring visually fills starting from the top. */
	transform: rotate(-90deg);
	transform-origin: 50% 50%;
}

.hd4d-progress-ring-track {
	stroke-linecap: butt;
}

.hd4d-progress-ring-segment {
	/* Hidden by default (0-length dash); frontend.js / editor.js draw the
	   real length in once the block is in view / mounted. */
	stroke-dasharray: 0 9999;
	stroke-linecap: butt;
	transition: none;
}

.hd4d-progress-circle-content {
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	transform: translateY(-50%);
	text-align: center;
	padding: 0 8px;
	box-sizing: border-box;
}

.hd4d-progress-title {
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	max-width: 80%;
	margin: 8px auto;
}

.hd4d-progress-count-wrap,
.hd4d-progress-count {
	font-size: 28px;
	font-weight: 700;
	line-height: 1;
}

.hd4d-progress-postfix {
	font-size: 0.55em;
	margin-left: 2px;
	font-weight: 400;
}

.hd4d-progress-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 18px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	width: 100%;
}

.hd4d-progress-legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	line-height: 1.4;
}

.hd4d-progress-legend-swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.hd4d-progress-legend-value {
	opacity: 0.7;
}

/* Inspector controls (editor only — harmless if this file is ever loaded
   on the frontend too, since these classes never render there). */
.hd4d-segment-row {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e0e0e0;
}

.hd4d-segment-row-header {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin-bottom: 8px;
}

.hd4d-segment-row-header > .components-base-control {
	flex: 1 1 auto;
}

.hd4d-segment-color-input,
.hd4d-color-row input[type="color"] {
	-webkit-appearance: none;
	appearance: none;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: none;
	cursor: pointer;
	flex: 0 0 auto;
}

.hd4d-segment-color-input::-webkit-color-swatch-wrapper,
.hd4d-color-row input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 2px;
}

.hd4d-segment-color-input::-webkit-color-swatch,
.hd4d-color-row input[type="color"]::-webkit-color-swatch {
	border: none;
	border-radius: 3px;
}

.hd4d-color-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.hd4d-segment-total-hint {
	font-size: 12px;
	opacity: 0.7;
	margin: 4px 0 12px;
}

.hd4d-control-title {
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 16px 0 8px;
}
