/* Election Results Widget – frontend styles
   Matches WPForms poll visual: party name left, result right, full-width bar below.
   All sizing/colours overrideable via Elementor style controls.
*/

.erw-wrapper {
	width: 100%;
	font-family: inherit;
}

.erw-title {
	font-size: 1.4em;
	font-weight: 700;
	margin-bottom: 1.2em;
	color: #1a1a2e;
}

.erw-party-row {
	margin-bottom: 20px;
}

.erw-party-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 6px;
	gap: 12px;
}

.erw-party-name {
	font-size: 1em;
	font-weight: 600;
	color: #1a1a2e;
	flex: 1 1 auto;
	min-width: 0;
}

.erw-result {
	font-size: 0.9em;
	color: #1a1a2e;
	white-space: nowrap;
	flex: 0 0 auto;
}

.erw-result strong {
	font-weight: 700;
}

.erw-vote-count {
	font-weight: 400;
	color: #666;
	margin-left: 2px;
}

/* Bar track – the full-width background */
.erw-bar-track {
	width: 100%;
	height: 24px;
	background-color: #e8e4dc;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
}

/* Bar fill – coloured portion */
.erw-bar-fill {
	height: 24px;
	border-radius: 12px;
	transition: width 0.4s ease;
	min-width: 0;
	/* Colour set inline per party */
}

/* Zero-vote bars: render as a dot/stub so the track still shows */
.erw-bar-fill[style*="width: 0%"] {
	display: none;
}

/* Total line */
.erw-total {
	margin-top: 1em;
	font-size: 0.85em;
	color: #888;
	text-align: right;
}

/* Empty state */
.erw-empty {
	color: #888;
	font-style: italic;
}
