/**
 * District Map styles — compiled from the old site's SCSS partial.
 *
 * SCSS nesting is compiled out here since the plugin enqueues plain CSS
 * (no build step). Rules are otherwise a faithful translation.
 *
 * Scoping: .district-map and .mta-district-map-wrap sit on the SAME element, so
 * every selector is prefixed with .mta-district-map-wrap to guarantee nothing
 * reaches outside the map subtree on the host WordPress theme.
 */

/* ---------- SVG map ---------- */

.mta-district-map-wrap #district-svg-container svg {
	width: 100%;
	height: 100%;
}

.mta-district-map-wrap #district-svg-container tspan {
	pointer-events: none;
	fill: white !important;
	filter: drop-shadow(1.5px 1px 1px black);
	font-size: 8px !important;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.mta-district-map-wrap #district-svg-container path {
	cursor: pointer;
}

/* This is what produces the hover highlight — the town goes transparent
   rather than changing color. Note it overrides the fill that JS sets from
   the sheet's color column, which is why hover reads as "cut out". */
.mta-district-map-wrap #district-svg-container path:hover {
	fill: none;
	pointer-events: all;
}

/* ---------- popup ---------- */

.mta-district-map-wrap .close {
	position: absolute;
	top: -40px;
	right: -5px;
	z-index: 99;
	width: 25px;
	height: 25px;
	cursor: pointer;
	color: #fff;
	display: inline-block;
}

.mta-district-map-wrap .popup {
	opacity: 0; /* JS sets this to 1 on town click */
	width: 50%;
	height: 25%;
	margin: auto;
	text-align: center;
	background: white;
	box-shadow: 0px 0px 10px 0px black;
	padding-bottom: 1px;
	margin-bottom: 2rem;
}

.mta-district-map-wrap .popup .popup-list {
	padding-left: 0;
}

.mta-district-map-wrap .popup .popup-list li {
	background: #cccccc;
	font-weight: 600;
	border: 1px solid black;
	margin-bottom: 0;
}

.mta-district-map-wrap .popup .popup-list li:not(:first-child) {
	border-top: none;
}

.mta-district-map-wrap .popup .popup-list li.active {
	background: #4d9fdb;
}

.mta-district-map-wrap .popup .popup-list li:hover {
	background: #4d9fdb;
}

.mta-district-map-wrap .popup .popup-list li a {
	color: #fff;
	display: block;
	width: 100%;
	filter: drop-shadow(1.5px 1px 1px black);
}

/* Kept from the original: suppresses a theme-injected list bullet.
   Worth leaving in — the new WP theme may well add its own. */
.mta-district-map-wrap .popup .popup-list li:before {
	content: "";
}

.mta-district-map-wrap .popup h2 {
	font-size: 15px;
	height: 50px;
	line-height: 50px;
	color: #fff;
	background: rgb(24, 108, 209);
}

/* ---------- search ---------- */

.mta-district-map-wrap .search-section {
	margin-bottom: 20px;
}

.mta-district-map-wrap .search-section span#townName {
	font-size: 24px;
	text-transform: capitalize;
	font-weight: bold;
	text-align: center;
	position: fixed;
	background: #fff;
	border: 1px solid black;
	padding: 0 10px;
}

/* ---------- zoom buttons (markup not present — see notes) ---------- */

.mta-district-map-wrap .button {
	width: 50px;
	height: 50px;
	color: #fff;
	font-weight: bolder;
	border-radius: 10px;
	background: silver;
}

.mta-district-map-wrap .plus-minus {
	pointer-events: none;
	-webkit-user-select: none; /* was missing its leading dash in the source */
	-ms-user-select: none;
	user-select: none;
}

/* ---------- plugin-added ---------- */

.mta-district-map-wrap .mta-district-map-error {
	padding: .5rem;
	border-left: 3px solid #d63638;
	background: #fcf0f1;
}

.mta-district-map-wrap .mta-district-map-admin-tools {
	font-size: 13px;
}
