.uem-map-widget {
	background: var(--uem-bg, #ffffff);
	padding: clamp(24px, 3vw, 48px);
	border-radius: 24px;
	box-shadow: 0 20px 50px rgba(12, 23, 50, 0.08);
	font-family: "Inter", "Segoe UI", sans-serif;
	color: #0b1a2b;
}

.uem-map__header {
	max-width: 640px;
	margin-bottom: 28px;
}

.uem-map__title {
	margin: 0 0 8px;
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 800;
	color: var(--uem-primary, #2c5ea8);
}

.uem-map__subtitle {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: rgba(11, 26, 43, 0.7);
}

.uem-map__container {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 992px) {
	.uem-map__container {
		grid-template-columns: 1.2fr 1fr;
		align-items: start;
	}
}

.uem-list-wrap {
	background: #f8fafc;
	border-radius: 20px;
	padding: 24px;
	height: 600px;
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(44, 94, 168, 0.1);
}

.uem-list-filter {
	margin-bottom: 20px;
}

.uem-list-filter input {
	width: 100%;
	padding: 14px 18px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	font-size: 15px;
	font-family: inherit;
	background: #ffffff;
	transition: all 150ms ease;
	outline: none;
}

.uem-list-filter input:focus {
	border-color: var(--uem-primary, #2c5ea8);
	box-shadow: 0 0 0 3px rgba(44, 94, 168, 0.15);
}

.uem-list-scroll {
	flex: 1;
	overflow-y: auto;
	padding-right: 8px;
}

.uem-list-scroll::-webkit-scrollbar {
	width: 6px;
}

.uem-list-scroll::-webkit-scrollbar-track {
	background: transparent;
}

.uem-list-scroll::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 10px;
}

.uem-district-group {
	margin-bottom: 24px;
	transition: opacity 0.3s ease;
}

.uem-district-group.is-hidden {
	display: none;
}

.uem-district-header {
	font-weight: 700;
	color: var(--uem-primary, #2c5ea8);
	font-size: 16px;
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.uem-district-header span {
	background: rgba(44, 94, 168, 0.1);
	color: var(--uem-primary, #2c5ea8);
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 99px;
	font-weight: 600;
}

.uem-constituencies-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.uem-constituency-item {
	background: #ffffff;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	color: #334155;
	border: 1px solid #e2e8f0;
	transition: all 150ms ease;
}

.uem-constituency-item.is-hidden {
	display: none;
}

.uem-constituency-item:hover {
	border-color: var(--uem-accent, #f2b705);
	background: rgba(242, 183, 5, 0.05);
}

.uem-district-group.is-highlighted .uem-district-header {
	color: var(--uem-accent, #f2b705);
}

.uem-district-group.is-highlighted .uem-district-header span {
	background: rgba(242, 183, 5, 0.15);
	color: var(--uem-accent, #f2b705);
}

.uem-map__svg-wrap {
	width: 100%;
	border-radius: 20px;
	background: rgba(44, 94, 168, 0.06);
	padding: clamp(12px, 2vw, 24px);
}

.uem-map__svg {
	width: 100%;
	height: auto;
	display: block;
}

.uem-map__district {
	fill: rgba(44, 94, 168, 0.18);
	stroke: var(--uem-primary, #2c5ea8);
	stroke-width: 2;
	cursor: pointer;
	transition: fill 150ms ease, transform 150ms ease, filter 150ms ease;
	transform-origin: center;
}

.uem-map__district:hover {
	fill: var(--uem-hover, #f2b705);
	filter: drop-shadow(0 6px 10px rgba(44, 94, 168, 0.2));
}

.uem-map__district.is-active {
	fill: var(--uem-accent, #f2b705);
}

.uem-map__tooltip {
	position: absolute;
	background: #0b1a2b;
	color: #ffffff;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -120%);
	transition: opacity 120ms ease;
	z-index: 3;
	white-space: nowrap;
	box-shadow: 0 8px 16px rgba(11, 26, 43, 0.2);
	line-height: 1.4;
}

.uem-map__tooltip.is-visible {
	opacity: 1;
}

.uem-map__popup {
	position: absolute;
	top: 24px;
	right: 24px;
	width: min(320px, 90%);
	background: #ffffff;
	border-radius: 18px;
	padding: 18px;
	box-shadow: 0 18px 40px rgba(11, 26, 43, 0.18);
	border: 1px solid rgba(44, 94, 168, 0.15);
	display: none;
	z-index: 2;
}

.uem-map__popup.is-visible {
	display: block;
}

.uem-map__popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(220, 38, 38, 0.1);
	color: #dc2626;
	font-size: 28px;
	line-height: 1;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 150ms ease;
	padding-bottom: 4px;
}

.uem-map__popup-close:hover {
	background: #dc2626;
	color: #ffffff;
}

.uem-map__popup-title {
	font-weight: 800;
	font-size: 18px;
	margin-bottom: 6px;
	color: var(--uem-primary, #2c5ea8);
}

.uem-map__popup-meta {
	font-size: 13px;
	color: rgba(11, 26, 43, 0.65);
	margin-bottom: 12px;
}

.uem-map__popup-coordinator {
	font-weight: 600;
	margin-bottom: 12px;
}

.uem-map__popup-focus {
	margin: 0 0 16px;
	padding-left: 18px;
	display: grid;
	gap: 6px;
	color: rgba(11, 26, 43, 0.7);
}

.uem-map__popup-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--uem-primary, #2c5ea8);
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.uem-map__popup-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 20px rgba(44, 94, 168, 0.25);
	background: #214a84;
}

@media (max-width: 1024px) {
	.uem-map__popup {
		position: relative;
		top: auto;
		right: auto;
		width: 100%;
		margin-top: 18px;
	}
}

@media (max-width: 640px) {
	.uem-map-widget {
		padding: 20px;
	}

	.uem-map__popup {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: 12px;
		top: auto;
		width: auto;
		border-radius: 20px;
	}
}
