/**
 * Gauge Blocks for Elementor
 *
 * Deliberately minimal. The SVG carries no viewBox, so nothing is scaled:
 * font sizes are real and Elementor's typography controls act directly on
 * these classes.
 */

.gauge-block {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gauge-block__title,
.gauge-block__value,
.gauge-block__desc {
	margin: 0;
}

.gauge-block__value {
	font-size: 1.75em;
	line-height: 1.1;
}

/* Without min-width the SVG refuses to shrink inside a flex row. */
.gauge-block__chart {
	min-width: 0;
}

.gauge-block--horizontal .gauge-block__chart {
	flex: 1 1 auto;
}

.gauge-block--vertical .gauge-block__chart {
	flex: 0 0 auto;
}

.gauge {
	color: currentColor;
	max-width: 100%;
}

.gauge__bound {
	font-size: 12px;
	fill: currentColor;
	opacity: 0.7;
}

@media (prefers-reduced-motion: no-preference) {
	.gauge__fill,
	.gauge__marker {
		transition: all 0.4s ease;
	}
}

/**
 * Panel icon.
 *
 * Drawn as a mask rather than a background image so it inherits the
 * panel's text color and stays legible in both light and dark editor
 * themes.
 *
 * The <i> itself is inline-flex, not just its ::before. Elementor's tile
 * centres its contents with text-align, which a block-level ::before
 * would ignore, pinning the icon to the left edge.
 *
 * Escaping matters here: the SVG uses single quotes because double ones
 * would close the CSS string, and < > are percent-encoded.
 */
.gauge-blocks-icon {
	--u: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='black' stroke-linecap='round'%3E%3Crect x='0.8' y='0.8' width='18.4' height='10.4' rx='5.2' stroke-width='1.6'/%3E%3Cpath stroke-width='1.5' d='M4.0 2.3v7.4M8.0 2.3v7.4M12.0 2.3v7.4M16.0 2.3v7.4'/%3E%3Ccircle cx='12.0' cy='6' r='1.8' stroke-width='1.2'/%3E%3C/svg%3E");
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1em;
	height: 1em;
	vertical-align: middle;
}

.gauge-blocks-icon::before {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	background-color: currentColor;
	-webkit-mask: var(--u) center / contain no-repeat;
	mask: var(--u) center / contain no-repeat;
}
