/**
 * MM Agent Locator — Leaflet edition.
 * Scoped under .mmal so nothing leaks into the Elementor theme.
 */

.mmal {
	--mmal-accent: #b65235;
	--mmal-accent-dark: #93412a;
	--mmal-ink: #333;
	--mmal-muted: #6b6b6b;
	--mmal-line: #e2e2e2;
	--mmal-panel: #fff;

	display: grid;
	grid-template-columns: 380px 1fr;
	min-height: 560px;
	border: 1px solid var(--mmal-line);
	border-radius: 4px;
	overflow: hidden;
	background: var(--mmal-panel);
	color: var(--mmal-ink);
	font-size: 15px;
	line-height: 1.5;
}

.mmal *,
.mmal *::before,
.mmal *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ panel */

.mmal__panel {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-right: 1px solid var(--mmal-line);
	background: var(--mmal-panel);
}

.mmal__search {
	padding: 18px 18px 14px;
	border-bottom: 1px solid var(--mmal-line);
}

.mmal__label {
	display: block;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--mmal-ink);
}

.mmal__field {
	display: flex;
}

.mmal__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-right: 0;
	border-radius: 3px 0 0 3px;
	font: inherit;
	font-size: 15px;
	color: var(--mmal-ink);
	background: #fff;
	-webkit-appearance: none;
	appearance: none;
}

.mmal__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.mmal__input:focus,
.mmal__submit:focus-visible,
.mmal__geo:focus-visible,
.mmal__print:focus-visible,
.mmal__reset:focus-visible,
.mmal__card:focus-visible,
.mmal__dir:focus-visible {
	outline: 2px solid var(--mmal-accent);
	outline-offset: 2px;
}

.mmal__input:focus {
	outline-offset: -1px;
}

.mmal__submit {
	flex: 0 0 46px;
	height: 42px;
	border: 0;
	border-radius: 0 3px 3px 0;
	background: var(--mmal-accent);
	color: #fff;
	cursor: pointer;
	transition: background .15s ease;
}

.mmal__submit:hover {
	background: var(--mmal-accent-dark);
}

.mmal__submit svg,
.mmal__geo svg,
.mmal__print svg {
	display: block;
	width: 18px;
	height: 18px;
	margin: 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.mmal .mmal__geo {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 10px 0 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 13.5px;
	color: var(--mmal-accent);
	cursor: pointer;
}

.mmal .mmal__geo:hover {
	color: var(--mmal-accent-dark);
	text-decoration: underline;
}

.mmal__geo svg {
	width: 15px;
	height: 15px;
	margin: 0;
}

.mmal__note {
	margin: 8px 0 0;
	min-height: 0;
	font-size: 13px;
	color: var(--mmal-muted);
}

.mmal__note:empty {
	display: none;
}

.mmal__note--error {
	color: #a02c1c;
}

/* -------------------------------------------------------------- count bar */

.mmal__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 11px 18px;
	background: #3f3f3f;
	color: #fff;
}

.mmal__count {
	font-size: 14px;
	font-weight: 600;
}

.mmal__print {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #fff;
	cursor: pointer;
	opacity: .9;
}

.mmal__print:hover {
	opacity: 1;
}

.mmal__print svg {
	width: 16px;
	height: 16px;
	margin: 0;
}

/* ------------------------------------------------------------------- list */

.mmal__list {
	flex: 1 1 auto;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	max-height: 460px;
	scrollbar-gutter: stable;
}

.mmal__item + .mmal__item {
	border-top: 1px solid var(--mmal-line);
}

.mmal__card {
	display: block;
	width: 100%;
	padding: 16px 18px 12px;
	border: 0;
	border-left: 3px solid transparent;
	background: none;
	font: inherit;
	text-align: left;
	color: inherit;
	cursor: pointer;
	transition: background .12s ease, border-color .12s ease;
}

.mmal__card:hover {
	background: #faf7f6;
}

.mmal__item--active .mmal__card {
	background: #fdf4f1;
	border-left-color: var(--mmal-accent);
}

.mmal__name {
	margin: 0 0 8px;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--mmal-ink);
}

.mmal__distance {
	display: block;
	margin: -4px 0 8px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--mmal-accent);
}

.mmal__row {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0 0 5px;
	font-size: 14px;
	color: #555;
}

.mmal__row svg {
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
	margin-top: 2px;
	fill: none;
	stroke: #9a9a9a;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* The double-class selectors below outrank Elementor's `.elementor-widget-text-editor a`,
   which otherwise repaints every link in this widget brand-rust (rust on rust = invisible). */
.mmal .mmal__row a {
	color: #555;
	text-decoration: none;
	word-break: break-word;
}

.mmal .mmal__row a:hover {
	color: var(--mmal-accent);
	text-decoration: underline;
}

.mmal .mmal__dir {
	display: inline-block;
	margin: 0 18px 16px;
	padding: 9px 16px;
	border-radius: 3px;
	background: var(--mmal-accent);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .03em;
	color: #fff;
	text-decoration: none;
	transition: background .15s ease;
}

.mmal .mmal__dir:hover,
.mmal .mmal__dir:focus {
	background: var(--mmal-accent-dark);
	color: #fff;
	text-decoration: none;
}

.mmal__empty {
	padding: 28px 18px;
	color: var(--mmal-muted);
	font-size: 14px;
}

.mmal__reset-wrap:has(.mmal__reset[hidden]) {
	display: none;
}

.mmal__reset-wrap {
	padding: 12px 18px;
	border-top: 1px solid var(--mmal-line);
}

.mmal__reset {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mmal-accent);
	cursor: pointer;
}

.mmal__reset:hover {
	text-decoration: underline;
}

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

.mmal__map {
	min-height: 560px;
	background: #e8e4df;
	z-index: 0;
}

.mmal .leaflet-container {
	font: inherit;
	font-size: 14px;
}

.mmal__pin {
	background: none;
	border: 0;
}

.mmal__pin svg {
	display: block;
	width: 100%;
	height: 100%;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}

.mmal__pin--active svg {
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45));
}

.mmal .leaflet-popup-content-wrapper {
	border-radius: 4px;
}

.mmal .leaflet-popup-content {
	margin: 13px 15px;
	line-height: 1.5;
}

.mmal__pop-name {
	margin: 0 0 5px;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--mmal-ink);
}

.mmal__pop-addr {
	margin: 0 0 8px;
	font-size: 13.5px;
	color: #555;
}

.mmal .mmal__pop-link {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--mmal-accent);
	text-decoration: none;
}

.mmal .mmal__pop-link:hover {
	text-decoration: underline;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 900px) {
	.mmal {
		grid-template-columns: 320px 1fr;
	}
}

@media (max-width: 782px) {
	.mmal {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.mmal__panel {
		border-right: 0;
		order: 2;
	}

	.mmal__map {
		order: 1;
		min-height: 320px;
		height: 320px;
		border-bottom: 1px solid var(--mmal-line);
	}

	.mmal__list {
		max-height: none;
		overflow-y: visible;
	}
}

/* -------------------------------------------------------------------- print */

@media print {
	.mmal {
		display: block;
		border: 0;
	}

	.mmal__map,
	.mmal__search,
	.mmal__print,
	.mmal__reset-wrap {
		display: none !important;
	}

	.mmal__panel {
		border: 0;
	}

	.mmal__bar {
		padding: 0 0 12px;
		background: none;
		color: #000;
	}

	.mmal__list {
		max-height: none;
		overflow: visible;
		columns: 2;
		column-gap: 28px;
	}

	.mmal__item {
		break-inside: avoid;
		page-break-inside: avoid;
	}

	.mmal__card {
		border-left: 0;
		padding: 10px 0;
	}

	.mmal__dir {
		display: none;
	}
}
