/* Multi Location Map for Elementor */
.mlm-map {
	--mlm-height: 440px;
	--mlm-radius: 2px;
	--mlm-tab-color: #0b2a4a;
	--mlm-tab-bg: #ffffff;
	--mlm-tab-active-color: #ffffff;
	--mlm-tab-active-bg: #0b2a4a;
	--mlm-btn-color: #0b2a4a;
	--mlm-btn-bg: #ffffff;
	--mlm-btn-hover-color: #ffffff;
	--mlm-btn-hover-bg: #0b2a4a;
	--mlm-marker: #0b2a4a;
	--mlm-marker-ring: #ffffff;
	--mlm-marker-size: 16px;
	--mlm-card-bg: #ffffff;
	--mlm-card-title: #1f1f1f;
	--mlm-card-text: #333333;

	position: relative;
	width: 100%;
	height: var(--mlm-height);
	min-height: 200px;
	overflow: hidden;
}

/* The canvas gets its own stacking context so Leaflet's high z-indexes
   stay underneath the tabs and the button. */
.mlm-map__canvas {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: #d6d2cc;
	font: inherit;
}

.mlm-map--muted .leaflet-tile-pane {
	filter: grayscale(1) sepia(0.2) contrast(0.86) brightness(0.98);
}

/* ---------- Tabs (top right) ---------- */
.mlm-map__tabs {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: flex;
	max-width: calc(100% - 24px);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	background: var(--mlm-tab-bg);
	border-radius: var(--mlm-radius);
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);
}
.mlm-map__tabs::-webkit-scrollbar {
	display: none;
}

.mlm-map .mlm-map__tab {
	flex: 0 0 auto;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	border-left: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--mlm-tab-color);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.mlm-map .mlm-map__tab:first-child {
	border-left: 0;
}
.mlm-map .mlm-map__tab:hover,
.mlm-map .mlm-map__tab:focus {
	background: rgba(0, 0, 0, 0.06);
	color: var(--mlm-tab-color);
}
.mlm-map .mlm-map__tab.is-active,
.mlm-map .mlm-map__tab.is-active:hover,
.mlm-map .mlm-map__tab.is-active:focus {
	background: var(--mlm-tab-active-bg);
	color: var(--mlm-tab-active-color);
}
.mlm-map .mlm-map__tab:focus-visible {
	outline: 2px solid var(--mlm-tab-active-bg);
	outline-offset: -4px;
}
.mlm-map .mlm-map__tab.is-active:focus-visible {
	outline-color: var(--mlm-tab-active-color);
}

/* ---------- Button (bottom right, above the attribution) ---------- */
.mlm-map .mlm-map__button {
	position: absolute;
	right: 12px;
	bottom: 30px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: calc(100% - 24px);
	padding: 10px 14px;
	border-radius: var(--mlm-radius);
	background: var(--mlm-btn-bg);
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);
	color: var(--mlm-btn-color);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.mlm-map .mlm-map__button[hidden] {
	display: none;
}
.mlm-map .mlm-map__button:hover,
.mlm-map .mlm-map__button:focus {
	background: var(--mlm-btn-hover-bg);
	color: var(--mlm-btn-hover-color);
	text-decoration: none;
}
.mlm-map .mlm-map__button:focus-visible {
	outline: 2px solid var(--mlm-btn-hover-bg);
	outline-offset: 2px;
}
.mlm-map__button-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mlm-map__button-icon {
	flex: 0 0 auto;
}

/* ---------- Marker ---------- */
.mlm-map .mlm-marker {
	background: none;
	border: 0;
}
.mlm-marker__dot {
	display: block;
	width: var(--mlm-marker-size);
	height: var(--mlm-marker-size);
	margin: calc(var(--mlm-marker-size) / -2) 0 0 calc(var(--mlm-marker-size) / -2);
	box-sizing: border-box;
	border: 2px solid var(--mlm-marker-ring);
	border-radius: 50%;
	background: var(--mlm-marker);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
	cursor: pointer;
	transition: transform 0.2s ease;
}
.mlm-marker.is-active .mlm-marker__dot {
	transform: scale(1.3);
}
/* ---------- Info card (marker hover) ---------- */
.mlm-map .mlm-card .leaflet-popup-content-wrapper {
	border-radius: 12px;
	background: var(--mlm-card-bg);
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
}
.mlm-map .mlm-card .leaflet-popup-tip {
	background: var(--mlm-card-bg);
}
.mlm-map .mlm-card .leaflet-popup-content {
	margin: 13px 30px 13px 18px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	color: var(--mlm-card-text);
}
.mlm-card__title,
.mlm-card__line {
	display: block;
	overflow-wrap: anywhere;
}
.mlm-card__title {
	font-weight: 700;
	color: var(--mlm-card-title);
}
.mlm-map .mlm-card a.leaflet-popup-close-button {
	top: 4px;
	right: 4px;
	width: 26px;
	height: 26px;
	font: 20px/26px Arial, Helvetica, sans-serif;
	color: #8a8a8a;
	text-decoration: none;
}
.mlm-map .mlm-card a.leaflet-popup-close-button:hover,
.mlm-map .mlm-card a.leaflet-popup-close-button:focus {
	color: #333;
	background: none;
}
.mlm-map .leaflet-control-attribution {
	font-size: 10px;
}

/* ---------- Editor empty state ---------- */
.mlm-map-empty {
	margin-bottom: 8px;
	padding: 24px;
	border: 1px dashed #b8b8b8;
	color: #555;
	font-size: 14px;
	text-align: center;
}

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
	.mlm-map__tabs {
		top: 8px;
		right: 8px;
		max-width: calc(100% - 16px);
	}
	.mlm-map .mlm-map__tab {
		padding: 10px 12px;
		font-size: 13px;
	}
	.mlm-map .mlm-map__button {
		right: 8px;
		bottom: 28px;
		max-width: calc(100% - 16px);
		font-size: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mlm-map .mlm-map__tab,
	.mlm-map .mlm-map__button,
	.mlm-marker__dot {
		transition: none;
	}
}

/* Sit the card's pointer right on top of the marker dot. */
.mlm-map .mlm-card.leaflet-popup {
	margin-bottom: calc(var(--mlm-marker-size) / 2 + 9px);
}
.mlm-map .mlm-card .leaflet-popup-tip-container,
.mlm-map .mlm-card .leaflet-popup-tip {
	pointer-events: none;
}
