/* Map Locations — front-end map */
.mlp-wrap {
	--mlp-accent: #2271b1;
	--mlp-height: 600px;
	position: relative;
	width: 100%;
	font-size: 14px;
	line-height: 1.45;
}
.mlp-wrap *,
.mlp-wrap *::before,
.mlp-wrap *::after {
	box-sizing: border-box;
}
.mlp-wrap .mlp-map{
	width: 100%;
	height: var(--mlp-height);
	border-radius: 4px;
	z-index: 0;
}
.mlp-wrap:fullscreen .mlp-map {
	height: 100%;
	border-radius: 0;
}


/*
 * Theme shield. Many themes style every img, svg and button on the page
 * (e.g. img { height: auto; max-width: 100% }), which resized markers and
 * restyled the map's buttons. These resets win over plain theme rules, and
 * every map rule below is scoped to .mlp-wrap so it wins over the resets.
 */
.mlp-wrap .leaflet-marker-icon img,
.mlp-wrap .leaflet-marker-icon svg,
.mlp-wrap .mlp-img-marker img {
	max-width: none !important;
	max-height: none !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: none !important;
	vertical-align: top !important;
}
.mlp-wrap button,
.mlp-wrap select {
	margin: 0;
	min-height: 0;
	width: auto;
	box-shadow: none;
	text-shadow: none;
	letter-spacing: normal;
	text-transform: none;
	line-height: inherit;
	font: inherit;
	border-radius: 0;
	background-image: none;
}
.mlp-wrap input[type="checkbox"] {
	width: auto;
	height: auto;
	margin: 0;
	box-shadow: none;
}
.mlp-wrap .leaflet-popup-content img:not(.mlp-image) {
	max-width: 100%;
}

/* Markers */
.mlp-wrap .mlp-marker{
	background: none;
	border: 0;
}
/* No box after a mouse click; keyboard users still get a clear focus ring. */
.mlp-wrap .leaflet-marker-icon.mlp-marker:focus{
	outline: none;
}
.mlp-wrap .leaflet-marker-icon.mlp-marker:focus-visible{
	outline: 2px solid var(--mlp-accent);
	outline-offset: 2px;
	border-radius: 4px;
}
.mlp-wrap .mlp-pin{
	display: block;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.mlp-wrap .mlp-shape{
	display: block;
	width: 18px;
	height: 18px;
	border: 2px solid #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.mlp-wrap .mlp-shape--circle{ border-radius: 50%; }
.mlp-wrap .mlp-shape--square{ border-radius: 3px; }

.mlp-wrap .mlp-img-marker{
	display: block;
	line-height: 0;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}
.mlp-wrap .mlp-img-marker img{
	display: block;
	max-width: none;
	object-fit: contain;
}
.mlp-wrap .mlp-img-marker--badge{
	padding: 4px;
	background: #fff;
	border-radius: 6px;
	filter: none;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

/* Clusters */
.mlp-wrap .mlp-cluster{
	background: none;
	border: 0;
}
.mlp-wrap .mlp-cluster span{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	color: #fff;
	font-weight: 700;
	font-size: 14px;
}

/* Names beside markers */
.mlp-wrap .leaflet-tooltip.mlp-label{
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0 2px;
	color: #1d2327;
	font-weight: 600;
	font-size: 12px;
	white-space: nowrap;
	text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff;
}
.mlp-wrap .leaflet-tooltip.mlp-label::before{
	display: none;
}
.mlp-wrap .mlp-dark .leaflet-tooltip.mlp-label{
	color: #f0f0f1;
	text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 2px #000;
}
.mlp-wrap .mlp-labels-hidden .leaflet-tooltip.mlp-label,
.mlp-wrap .leaflet-tooltip.mlp-label.mlp-label-collides{
	visibility: hidden;
}

/* Layer panel */
.mlp-wrap .mlp-control{
	width: 220px;
	max-width: calc(100vw - 80px);
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	font-size: 13px;
}
.mlp-wrap .mlp-control-head{
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border: 0;
	background: var(--mlp-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-align: left;
}
.mlp-wrap .mlp-control-head svg{
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	transition: transform 0.15s;
}
.mlp-wrap .mlp-control-head[aria-expanded="false"] svg{
	transform: rotate(-90deg);
}
.mlp-wrap .mlp-control-body{
	padding: 6px 12px 12px;
	max-height: 60vh;
	overflow-y: auto;
}
.mlp-wrap .mlp-control-row{
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 32px;
	cursor: pointer;
}
.mlp-wrap .mlp-control-row input{
	accent-color: var(--mlp-accent);
	margin: 0;
}
.mlp-wrap .mlp-dot{
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex: none;
}
.mlp-wrap .mlp-control-filter{
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 10px;
}
.mlp-wrap .mlp-control-filter span{
	font-weight: 600;
}
.mlp-wrap .mlp-control-filter select{
	width: 100%;
	min-height: 32px;
	font: inherit;
}
.mlp-wrap .mlp-control-reset{
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--mlp-accent);
	text-decoration: underline;
	font: inherit;
	cursor: pointer;
}
.mlp-wrap .mlp-fullscreen{
	width: 34px;
	height: 34px;
	background: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.mlp-wrap .mlp-fullscreen svg{
	width: 18px;
	height: 18px;
	fill: none;
	stroke: #1d2327;
	stroke-width: 2;
}

/* Controls as a bar above or below the map (colours and shape set in Map Design) */
.mlp-wrap .mlp-bar {
	--mlp-bar-pad: 10px 12px;
	--mlp-bar-gap: 10px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--mlp-bar-gap);
	padding: var(--mlp-bar-pad);
	background: var(--mlp-bar-bg, #fff);
	color: var(--mlp-bar-text, #1d2327);
	border: 1px solid var(--mlp-bar-border, #dcdcde);
	border-radius: var(--mlp-bar-radius, 4px);
	font-size: 13px;
}
.mlp-wrap .mlp-bar--compact { --mlp-bar-pad: 6px 10px; --mlp-bar-gap: 6px 12px; }
.mlp-wrap .mlp-bar--roomy { --mlp-bar-pad: 16px 20px; --mlp-bar-gap: 14px 28px; font-size: 14px; }
.mlp-wrap .mlp-bar--above { margin-bottom: 8px; }
.mlp-wrap .mlp-bar--below { margin-top: 8px; }
/* Joined: no gap, and the shared edge loses its rounding. */
.mlp-wrap .mlp-bar--joined.mlp-bar--above { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.mlp-wrap .mlp-bar--joined.mlp-bar--below { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.mlp-wrap.mlp-has-bar-above .mlp-bar--joined ~ .mlp-map { border-top-left-radius: 0; border-top-right-radius: 0; }
.mlp-wrap .mlp-map:has(+ .mlp-bar--joined) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.mlp-wrap .mlp-bar .mlp-control-filter span,
.mlp-wrap .mlp-bar .mlp-control-row,
.mlp-wrap .mlp-bar .mlp-control-reset {
	color: inherit;
}
.mlp-wrap .mlp-bar .mlp-control-layers {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.mlp-wrap .mlp-bar .mlp-control-row {
	min-height: 34px;
	padding: 4px 12px;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
	border-radius: 999px;
	background: transparent;
}
.mlp-wrap .mlp-bar .mlp-control-row:has(input:checked) {
	border-color: currentColor;
	box-shadow: inset 0 0 0 1px currentColor;
}
.mlp-wrap .mlp-bar--plain .mlp-control-row,
.mlp-wrap .mlp-bar--plain .mlp-control-row:has(input:checked) {
	padding: 0;
	border: 0;
	box-shadow: none;
	min-height: 32px;
}
.mlp-wrap .mlp-bar--plain .mlp-control-layers {
	gap: 4px 16px;
}
.mlp-wrap .mlp-bar .mlp-control-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--mlp-bar-gap);
}
.mlp-wrap .mlp-bar .mlp-control-filter {
	margin-top: 0;
	min-width: 150px;
}
.mlp-wrap .mlp-bar .mlp-control-filter select {
	color: #1d2327;
	background-color: #fff;
}
.mlp-wrap .mlp-bar .mlp-control-reset {
	margin: 0 0 8px;
}
.mlp-wrap .mlp-control-layers + .mlp-control-filters .mlp-control-filter:first-child {
	margin-top: 10px;
}
.mlp-wrap .mlp-bar .mlp-control-layers + .mlp-control-filters .mlp-control-filter:first-child {
	margin-top: 0;
}
@media (max-width: 600px) {
	.mlp-wrap .mlp-bar .mlp-control-filter {
		flex: 1 1 100%;
	}
}

/* Popup and panel content */
.mlp-wrap .mlp-popup .leaflet-popup-content-wrapper{
	border-radius: 8px;
}
.mlp-wrap .mlp-popup .leaflet-popup-content{
	margin: 12px 14px;
	font-size: 13px;
	line-height: 1.5;
	max-height: 60vh;
	overflow-y: auto;
}
.mlp-wrap .mlp-title{
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 1.3;
	color: var(--mlp-accent);
}
.mlp-wrap .mlp-heading{
	margin: 12px 0 4px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #50575e;
}
.mlp-wrap .mlp-row{
	margin: 0 0 4px;
}
.mlp-wrap .mlp-row-label{
	color: #50575e;
	font-weight: 600;
}
.mlp-wrap .mlp-image{
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 4px;
	margin: 4px 0;
}
.mlp-wrap .mlp-content > *:first-child{ margin-top: 0; }
.mlp-wrap .mlp-content > *:last-child{ margin-bottom: 0; }

.mlp-wrap .mlp-accordion{
	margin: 0 0 6px;
}
.mlp-wrap .mlp-accordion:first-of-type{
	margin-top: 8px;
}
.mlp-wrap .mlp-accordion-btn{
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border: 0;
	border-radius: 6px;
	background: var(--mlp-acc-bg, #e4edf7);
	color: var(--mlp-acc-text, #1d2327);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-align: left;
	cursor: pointer;
}
.mlp-wrap .mlp-accordion-btn:hover{
	background: var(--mlp-acc-hover, #d2dbe5);
}
.mlp-wrap .mlp-accordion-btn:focus-visible{
	outline: 2px solid var(--mlp-accent);
	outline-offset: 2px;
}
.mlp-wrap .mlp-accordion-btn[aria-expanded="true"]{
	border-radius: 6px 6px 0 0;
}
.mlp-wrap .mlp-accordion-icon{
	width: 14px;
	height: 14px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	transition: transform 0.15s;
}
.mlp-wrap .mlp-accordion-btn[aria-expanded="true"] .mlp-accordion-icon{
	transform: rotate(180deg);
}
.mlp-wrap .mlp-accordion-body{
	padding: 10px 12px;
	border: 1px solid var(--mlp-acc-bg, #e4edf7);
	border-top: 0;
	border-radius: 0 0 6px 6px;
}

/* Link shown as a button (URL field with button text) */
.mlp-wrap .mlp-button{
	display: inline-block;
	margin: 6px 0 2px;
	padding: 8px 16px;
	border-radius: 4px;
	background: var(--mlp-accent);
	color: var(--mlp-btn-text, #fff) !important;
	font-weight: 600;
	text-decoration: none !important;
	text-align: center;
}
.mlp-wrap .mlp-button:hover,
.mlp-wrap .mlp-button:focus-visible{
	filter: brightness(0.92);
}
.mlp-wrap .mlp-section{
	margin-top: 8px;
}
.mlp-wrap .mlp-section .mlp-heading{
	margin-top: 4px;
	padding-bottom: 3px;
	border-bottom: 1px solid #dcdcde;
	color: var(--mlp-accent);
}

/* Linked locations in popups and panels */
.mlp-wrap .mlp-links{
	margin-top: 8px;
}
.mlp-wrap .mlp-links ul{
	margin: 0;
	padding: 0;
	list-style: none;
}
.mlp-wrap .mlp-link{
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	min-height: 32px;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--mlp-accent);
	font: inherit;
	text-align: left;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.mlp-wrap .mlp-link:hover,
.mlp-wrap .mlp-link:focus-visible{
	text-decoration-thickness: 2px;
}
.mlp-wrap .leaflet-marker-icon.mlp-marker{
	transition: opacity 0.15s;
}

/* Side panel (for layers set to show details in a panel) */
.mlp-wrap .mlp-panel{
	position: absolute;
	inset: 0 auto 0 0;
	z-index: 1000;
	width: min(420px, 100%);
	display: flex;
}
.mlp-wrap .mlp-panel[hidden]{
	display: none;
}
.mlp-wrap .mlp-panel-inner{
	position: relative;
	width: 100%;
	height: 100%;
	overflow-y: auto;
	background: #fff;
	box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
	padding: 20px 20px 24px;
}
.mlp-wrap .mlp-panel-close{
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #1d2327;
}
.mlp-wrap .mlp-panel-close:hover,
.mlp-wrap .mlp-panel-close:focus-visible{
	background: #f0f0f1;
}
.mlp-wrap .mlp-panel-body .mlp-title{
	padding-right: 40px;
	font-size: 20px;
}

.mlp-wrap .mlp-notice{
	padding: 12px;
	border-left: 4px solid #dba617;
	background: #fcf9e8;
}

@media (prefers-reduced-motion: reduce) {
	.mlp-wrap .mlp-accordion-icon,
	.mlp-wrap .mlp-control-head svg{
		transition: none;
	}
}

/* Label beside value, unless the value wouldn't fit beside it on one line:
   then the value drops to its own line under the label. */
.mlp-wrap .mlp-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.35em; }
.mlp-wrap .mlp-row > .mlp-row-label { flex: none; }
.mlp-wrap .mlp-row > .mlp-row-value { flex: 1 1 auto; min-width: 0; }

/* Details layouts (Map Layers › Details layout) use the Displays markup; keep popups compact. */
.mlp-wrap .mlp-d--map .mlp-row { margin: 0 0 4px; }
.mlp-wrap .mlp-d--map .mlp-row-label { color: #50575e; font-weight: 600; }
.mlp-wrap .mlp-d--map .mlp-d-block + .mlp-d-block { margin-top: 10px; }
.mlp-wrap .mlp-d--map .mlp-d-heading { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: #50575e; }
.mlp-wrap .mlp-d--map .mlp-d-accordion { margin-top: 8px; }
.mlp-wrap .mlp-d--map .mlp-d-accordion + .mlp-d-accordion { margin-top: 4px; }
.mlp-wrap .mlp-d--map .mlp-d-accordion-btn { font-size: 12px; min-height: 40px; padding: 8px 12px; }
.mlp-wrap .mlp-d--map .mlp-d-accordion-body { padding: 10px 12px; }
.mlp-wrap .mlp-d--map .mlp-d-box { margin-top: 8px; padding: 10px 12px; }
.mlp-wrap .mlp-d--map .mlp-button { margin: 6px 0 2px; padding: 8px 16px; min-width: 0; border-radius: 4px; font-size: inherit; font-weight: 600; }
.mlp-wrap .mlp-d--map .mlp-d-link { color: var(--mlp-accent); }
.mlp-wrap .mlp-d--map .mlp-image { border-radius: 4px; margin: 4px 0; }

/* A split map layer: its own switch, with one indented switch per option. */
.mlp-wrap .mlp-control-row--group { font-weight: 600; }
.mlp-wrap .mlp-control-row--sub { margin-left: 22px; }
/* In a bar the group reads as a labelled cluster of pills. */
.mlp-wrap .mlp-bar .mlp-control-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mlp-wrap .mlp-bar .mlp-control-row--sub { margin-left: 0; }

/* In a bar, the layer switches sit in a white row edged in the bar's colour,
   whatever the bar's own colours, with very light outlines round each switch. */
.mlp-wrap .mlp-bar .mlp-control-layers {
	flex: 1 1 100%;
	gap: 6px 8px;
	padding: 6px 8px;
	background: #fff;
	color: #1d2327;
	border: 1px solid color-mix(in srgb, var(--mlp-bar-bg, #fff) 85%, #000);
	border-radius: var(--mlp-bar-radius, 4px);
}
.mlp-wrap .mlp-bar .mlp-control-layers .mlp-control-row,
.mlp-wrap .mlp-bar .mlp-control-layers .mlp-control-row:has(input:checked) {
	color: #1d2327;
	border-color: #ececec;
	box-shadow: none;
	background: transparent;
	min-height: 32px;
	padding: 3px 10px;
}
.mlp-wrap .mlp-bar--plain .mlp-control-layers .mlp-control-row,
.mlp-wrap .mlp-bar--plain .mlp-control-layers .mlp-control-row:has(input:checked) {
	border: 0;
	background: transparent;
	padding: 0 4px;
}
/* The split layer's own switch leads its options, with a light divider after the group. */
.mlp-wrap .mlp-bar .mlp-control-layers .mlp-control-row--group,
.mlp-wrap .mlp-bar .mlp-control-layers .mlp-control-row--group:has(input:checked) { border-color: transparent; padding-left: 2px; padding-right: 2px; }
.mlp-wrap .mlp-bar .mlp-control-group:not(:first-child) { padding-left: 10px; border-left: 1px solid #e8e8e8; }
.mlp-wrap .mlp-bar .mlp-control-group:not(:last-child) { padding-right: 10px; border-right: 1px solid #e8e8e8; }
.mlp-wrap .mlp-bar .mlp-control-group + .mlp-control-group { padding-left: 0; border-left: 0; }
