/* Kerman SVG Map v2 */
.dhy-mapv2 {
	--map-primary: #13a89e;
	--map-primary-d: #0a6b64;
	--map-accent: #c06c50;
	--map-secondary: #e6ccb2;
	--map-ink: #2c3e50;
	--map-muted: #5a6b7a;
	--map-paper: #fcf9f2;
	--map-white: #ffffff;
	--map-border: #e0ddd6;
	--map-hover: rgba(19, 168, 158, 0.18);
	direction: rtl;
	font-family: var(--dhy-font-family, inherit);
	color: var(--map-ink);
}

.dhy-mapv2__title {
	margin: 0 0 4px;
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--map-ink);
}

.dhy-mapv2__help {
	margin: 0 0 1rem;
	font-size: 0.92rem;
	color: var(--map-muted);
}

.dhy-mapv2__layout {
	display: grid;
	grid-template-columns: minmax(260px, 340px) 1fr;
	gap: 0;
	border: 1px solid var(--map-border);
	border-radius: 14px;
	overflow: hidden;
	background: var(--map-white);
	box-shadow: 0 16px 48px rgba(44, 62, 80, 0.08);
}

/* ---- Panel ---- */
.dhy-mapv2__panel {
	background: var(--map-white);
	border-left: 1px solid var(--map-border);
	padding: 1.1rem 1rem;
	min-height: 420px;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.dhy-map__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8rem;
}

.dhy-map__crumb {
	background: transparent;
	border: 0;
	padding: 2px 4px;
	color: var(--map-primary);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	transition: color 0.15s ease;
}

.dhy-map__crumb:hover {
	color: var(--map-primary-d);
}

.dhy-map__crumb-sep {
	color: #b0aa9d;
	margin: 0 0.12rem;
}

.dhy-mapv2__panel-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.dhy-map__back {
	border: 1px solid var(--map-border);
	background: var(--map-paper);
	color: var(--map-ink);
	border-radius: 999px;
	padding: 0.28rem 0.85rem;
	cursor: pointer;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.dhy-map__back:hover {
	background: var(--map-hover);
	border-color: var(--map-primary);
}

.dhy-mapv2__panel-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
}

.dhy-map__list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow: auto;
	flex: 1;
	max-height: 520px;
}

.dhy-map__item {
	width: 100%;
	text-align: right;
	border: 1px solid transparent;
	background: var(--map-paper);
	border-radius: 10px;
	padding: 0.72rem 0.9rem;
	margin-bottom: 0.4rem;
	cursor: pointer;
	font: inherit;
	font-size: 0.92rem;
	font-weight: 500;
	color: inherit;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.dhy-map__item:hover,
.dhy-map__item:focus {
	background: var(--map-hover);
	border-color: rgba(19, 168, 158, 0.4);
	transform: translateX(-2px);
	outline: none;
}

.dhy-map__empty,
.dhy-map__loading,
.dhy-map__error {
	margin: 0;
	font-size: 0.9rem;
	color: var(--map-muted);
}

.dhy-map__error {
	color: var(--map-accent);
	list-style: none;
}

/* ---- SVG Canvas ---- */
.dhy-svgmap-wrap {
	position: relative;
	background:
		radial-gradient(circle at 30% 25%, rgba(19, 168, 158, 0.06) 0, transparent 55%),
		radial-gradient(circle at 75% 75%, rgba(192, 108, 80, 0.05) 0, transparent 50%),
		var(--map-paper);
	min-height: 420px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
}

.dhy-svgmap__svg {
	width: 100%;
	height: auto;
	max-height: 720px;
}

/* County polygons */
.dhy-svgmap__county {
	fill: rgba(19, 168, 158, 0.2);
	stroke: var(--map-primary-d);
	stroke-width: 1;
	cursor: pointer;
	transition: fill 0.22s ease, stroke-width 0.22s ease;
}

.dhy-svgmap__county.is-hover {
	fill: rgba(19, 168, 158, 0.42);
	stroke-width: 2;
	filter: drop-shadow(0 4px 12px rgba(19, 168, 158, 0.25));
}

.dhy-svgmap__county.is-selected {
	fill: rgba(192, 108, 80, 0.35);
	stroke: var(--map-accent);
	stroke-width: 2.5;
	filter: drop-shadow(0 6px 18px rgba(192, 108, 80, 0.2));
}

/* Labels */
.dhy-svgmap__label {
	font-family: var(--dhy-font-family, inherit);
	font-size: 9px;
	font-weight: 700;
	fill: var(--map-ink);
	text-anchor: middle;
	dominant-baseline: central;
	pointer-events: none;
	opacity: 0.85;
}

/* Tooltip */
.dhy-svgmap__tooltip {
	position: absolute;
	padding: 6px 14px;
	background: rgba(44, 62, 80, 0.92);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	border-radius: 8px;
	pointer-events: none;
	white-space: nowrap;
	z-index: 10;
	backdrop-filter: blur(4px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	transition: opacity 0.15s ease;
}

.dhy-svgmap__tooltip[hidden] {
	opacity: 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.dhy-mapv2__layout {
		grid-template-columns: 1fr;
	}

	.dhy-mapv2__panel {
		border-left: 0;
		border-bottom: 1px solid var(--map-border);
		min-height: auto;
		order: 2;
	}

	.dhy-svgmap-wrap {
		order: 1;
		min-height: 300px;
	}

	.dhy-map__list {
		max-height: 260px;
	}

	.dhy-svgmap__label {
		font-size: 7.5px;
	}
}

@media (max-width: 480px) {
	.dhy-svgmap-wrap {
		padding: 4px;
	}

	.dhy-svgmap__label {
		font-size: 6px;
	}

	.dhy-mapv2__panel {
		padding: 0.75rem;
	}

	.dhy-map__item {
		padding: 0.6rem 0.7rem;
		font-size: 0.85rem;
	}
}
