.ec-poll-map {
	--ec-border: #cbd5df;
	--ec-blue: #244a70;
	box-sizing: border-box;
	margin: 24px 0;
	padding: 20px;
	border: 1px solid var(--ec-border);
	border-radius: 5px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(20, 42, 63, 0.08);
}

.ec-poll-map *,
.ec-poll-map *::before,
.ec-poll-map *::after {
	box-sizing: border-box;
}

.ec-map-heading-row {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 14px;
}

.ec-map-heading-row h2 {
	margin: 0 0 5px;
	color: #102f4e;
	font-size: 25px;
}

.ec-map-heading-row p {
	margin: 0;
}

.ec-map-state-picker {
	display: block;
	min-width: 210px;
	color: #24384b;
	font-size: 13px;
	font-weight: 700;
}

.ec-map-state-picker span {
	display: block;
	margin-bottom: 4px;
}

.ec-map-state-picker select {
	width: 100%;
	min-height: 40px;
	padding: 6px 30px 6px 9px;
	border: 1px solid #aebdcc;
	background: #fff;
	font-size: 15px;
}

.ec-map-legend {
	display: flex;
	align-items: center;
	gap: 7px 13px;
	flex-wrap: wrap;
	margin: 0 0 16px;
	padding: 10px 12px;
	border: 1px solid #dce3e9;
	background: #f6f8fa;
	font-size: 12px;
}

.ec-map-legend strong {
	margin-right: 3px;
	color: #24384b;
}

.ec-map-legend span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

.ec-map-legend i {
	display: inline-block;
	width: 15px;
	height: 15px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 2px;
}

.ec-map-layout {
	display: grid;
	grid-template-columns: minmax(0, 2.25fr) minmax(230px, 0.75fr);
	gap: 18px;
	align-items: stretch;
	height: 360px;
}

.ec-map-canvas {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 360px;
	height: 360px;
	box-sizing: border-box;
	padding: 8px;
	border: 1px solid #dce3e9;
	background: #f8fafb;
}

.ec-map-svg {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
}

.ec-map-svg .ec-map-state {
	cursor: pointer;
	transition: filter 120ms ease, opacity 120ms ease;
	stroke: #fff;
	stroke-width: 0.8;
	vector-effect: non-scaling-stroke;
}

.ec-map-svg .ec-map-state:hover,
.ec-map-svg .ec-map-state:focus,
.ec-map-svg .ec-map-selected {
	filter: brightness(1.1);
	stroke: #102f4e;
	stroke-width: 2.2;
	outline: none;
}

.ec-map-svg [data-close-key="1900"], .ec-key-1900 { fill: #f2c94c; background: #f2c94c; }
.ec-map-svg [data-close-key="1930"], .ec-key-1930 { fill: #e9a83e; background: #e9a83e; }
.ec-map-svg [data-close-key="2000"], .ec-key-2000 { fill: #e6863d; background: #e6863d; }
.ec-map-svg [data-close-key="2030"], .ec-key-2030 { fill: #d6613b; background: #d6613b; }
.ec-map-svg [data-close-key="2100"], .ec-key-2100 { fill: #b84a62; background: #b84a62; }
.ec-map-svg [data-close-key="2200"], .ec-key-2200 { fill: #7b4f8f; background: #7b4f8f; }
.ec-map-svg [data-close-key="2300"], .ec-key-2300 { fill: #4a5fa8; background: #4a5fa8; }
.ec-map-svg [data-close-key="0000"], .ec-key-0000 { fill: #2f6f8f; background: #2f6f8f; }
.ec-map-svg [data-close-key="0100"], .ec-key-0100 { fill: #244a70; background: #244a70; }

.ec-map-tooltip {
	position: absolute;
	z-index: 3;
	max-width: 185px;
	padding: 7px 9px;
	border-radius: 3px;
	background: rgba(16, 47, 78, 0.96);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	pointer-events: none;
	opacity: 1;
	transition: opacity 100ms ease;
}

.ec-map-tooltip[aria-hidden="true"] {
	opacity: 0;
}

.ec-map-details {
	min-height: 360px;
	height: 360px;
	box-sizing: border-box;
	padding: 17px;
	border-top: 5px solid var(--ec-blue);
	background: #f3f6f9;
	overflow: auto;
}

.ec-map-details-prompt {
	margin: 0;
	color: #526577;
}

.ec-map-state-title-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	margin: 0 0 8px;
}

.ec-map-details h3 {
	margin: 0;
	color: #102f4e;
	font-size: 22px;
}

.ec-map-details dl,
.ec-map-details dd {
	margin: 0;
}

.ec-map-details dl > div {
	padding: 9px 0;
	border-top: 1px solid #d6dfe7;
}

.ec-map-details dt {
	color: #526577;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.ec-map-details dd {
	margin-top: 2px;
	color: #172b3d;
	font-size: 16px;
	font-weight: 700;
}

.ec-map-state-note {
	margin: 10px 0;
	padding: 9px 10px;
	border-left: 3px solid #d29b35;
	background: #fff8e9;
	font-size: 13px;
	line-height: 1.4;
}

.ec-map-official-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: #244a70;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.ec-map-official-link:hover,
.ec-map-official-link:focus {
	color: #102f4e;
	text-decoration: underline;
}

.ec-map-methodology {
	margin: 15px 0 0;
	padding-top: 13px;
	border-top: 1px solid #dce3e9;
	color: #44586b;
	font-size: 13px;
	line-height: 1.5;
}

@media (max-width: 767px) {
	.ec-poll-map {
		margin: 18px 0;
		padding: 14px 12px;
	}

	.ec-map-heading-row {
		display: block;
	}

	.ec-map-heading-row h2 {
		font-size: 22px;
	}

	.ec-map-state-picker {
		margin-top: 13px;
		min-width: 0;
	}

	.ec-map-layout {
		display: block;
		height: auto;
	}

	.ec-map-canvas {
		display: block;
		min-height: 0;
		height: auto;
		padding: 4px;
	}

	.ec-map-svg {
		height: auto;
		max-height: none;
	}

	.ec-map-details {
		margin-top: 12px;
		min-height: 0;
		height: auto;
		overflow: visible;
	}

	.ec-map-state-title-row {
		align-items: center;
	}

	.ec-map-tooltip {
		display: none;
	}

	.ec-map-legend {
		gap: 6px 10px;
		padding: 9px;
	}

	.ec-map-legend strong {
		width: 100%;
	}
}
