/**
 * Mar Store Locator – frontend.
 * Every visual value is a custom property, overridden by the widget Style tab.
 */

/*
 * Defaults live on the widget wrapper with zero specificity (:where), the same
 * element Elementor targets with {{WRAPPER}}: Style tab values always win.
 */
:where(.elementor-widget-msl-store-locator) {
	--msl-accent: #1a73e8;
	--msl-height: 600px;
	--msl-list-width: 360px;
	--msl-list-height: 420px;
	--msl-gap: 16px;
	--msl-toolbar-gap: 10px;
	--msl-field-min: 180px;
	--msl-field-h: 44px;
	--msl-field-color: #202124;
	--msl-field-bg: #fff;
	--msl-field-border: #dadce0;
	--msl-radius: 8px;
	--msl-dropdown-bg: #fff;
	--msl-dropdown-hover: #f1f3f4;
	--msl-btn-color: #fff;
	--msl-btn-bg: var(--msl-accent);
	--msl-btn-color-hover: #fff;
	--msl-btn-bg-hover: color-mix(in srgb, var(--msl-btn-bg) 85%, #000);
	--msl-divider: #ebedf0;
	--msl-popup-width: 280px;
	--msl-popup-bg: #fff;
	--msl-popup-radius: 10px;

	/* Layout defaults: list on the left. */
	--msl-areas: "list map";
	--msl-cols: var(--msl-list-width) minmax(0, 1fr);
	--msl-rows: var(--msl-height);
	--msl-list-max: none;

	/* Panel layout (cascading selects): panel above the list, beside the map. */
	--msl-p-areas: "panel map" "list map";
	--msl-p-rows: auto minmax(0, 1fr);
	--msl-p-h: var(--msl-height);
	/* Panel layout without the store list: the panel is as tall as the map. */
	--msl-pn-areas: "panel map";
	--msl-pn-rows: minmax(var(--msl-height), auto);
	--msl-panel-align: start;
}

.msl {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--msl-gap);
	color: inherit;
}

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

/* ---------------------------------------------------------------- Layout */

.msl-list-right { --msl-areas: "map list"; --msl-cols: minmax(0, 1fr) var(--msl-list-width); --msl-rows: var(--msl-height); --msl-list-max: none; --msl-p-areas: "map panel" "map list"; --msl-p-rows: auto minmax(0, 1fr); --msl-p-h: var(--msl-height); --msl-pn-areas: "map panel"; --msl-pn-rows: minmax(var(--msl-height), auto); }
.msl-list-left { --msl-areas: "list map"; --msl-cols: var(--msl-list-width) minmax(0, 1fr); --msl-rows: var(--msl-height); --msl-list-max: none; --msl-p-areas: "panel map" "list map"; --msl-p-rows: auto minmax(0, 1fr); --msl-p-h: var(--msl-height); --msl-pn-areas: "panel map"; --msl-pn-rows: minmax(var(--msl-height), auto); }
.msl-list-bottom { --msl-areas: "map" "list"; --msl-cols: minmax(0, 1fr); --msl-rows: var(--msl-height) auto; --msl-list-max: var(--msl-list-height); --msl-p-areas: "panel" "map" "list"; --msl-p-rows: auto var(--msl-height) auto; --msl-p-h: auto; --msl-pn-areas: "panel" "map"; --msl-pn-rows: auto var(--msl-height); }

@media (max-width: 1024px) {
	.msl-list-tablet-right { --msl-areas: "map list"; --msl-cols: minmax(0, 1fr) var(--msl-list-width); --msl-rows: var(--msl-height); --msl-list-max: none; --msl-p-areas: "map panel" "map list"; --msl-p-rows: auto minmax(0, 1fr); --msl-p-h: var(--msl-height); --msl-pn-areas: "map panel"; --msl-pn-rows: minmax(var(--msl-height), auto); }
	.msl-list-tablet-left { --msl-areas: "list map"; --msl-cols: var(--msl-list-width) minmax(0, 1fr); --msl-rows: var(--msl-height); --msl-list-max: none; --msl-p-areas: "panel map" "list map"; --msl-p-rows: auto minmax(0, 1fr); --msl-p-h: var(--msl-height); --msl-pn-areas: "panel map"; --msl-pn-rows: minmax(var(--msl-height), auto); }
	.msl-list-tablet-bottom { --msl-areas: "map" "list"; --msl-cols: minmax(0, 1fr); --msl-rows: var(--msl-height) auto; --msl-list-max: var(--msl-list-height); --msl-p-areas: "panel" "map" "list"; --msl-p-rows: auto var(--msl-height) auto; --msl-p-h: auto; --msl-pn-areas: "panel" "map"; --msl-pn-rows: auto var(--msl-height); }
}

@media (max-width: 767px) {
	.msl-list-mobile-right { --msl-areas: "map list"; --msl-cols: minmax(0, 1fr) var(--msl-list-width); --msl-rows: var(--msl-height); --msl-list-max: none; --msl-p-areas: "map panel" "map list"; --msl-p-rows: auto minmax(0, 1fr); --msl-p-h: var(--msl-height); --msl-pn-areas: "map panel"; --msl-pn-rows: minmax(var(--msl-height), auto); }
	.msl-list-mobile-left { --msl-areas: "list map"; --msl-cols: var(--msl-list-width) minmax(0, 1fr); --msl-rows: var(--msl-height); --msl-list-max: none; --msl-p-areas: "panel map" "list map"; --msl-p-rows: auto minmax(0, 1fr); --msl-p-h: var(--msl-height); --msl-pn-areas: "panel map"; --msl-pn-rows: minmax(var(--msl-height), auto); }
	.msl-list-mobile-bottom { --msl-areas: "map" "list"; --msl-cols: minmax(0, 1fr); --msl-rows: var(--msl-height) auto; --msl-list-max: var(--msl-list-height); --msl-p-areas: "panel" "map" "list"; --msl-p-rows: auto var(--msl-height) auto; --msl-p-h: auto; --msl-pn-areas: "panel" "map"; --msl-pn-rows: auto var(--msl-height); }
}

.msl__body {
	display: grid;
	gap: var(--msl-gap);
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: var(--msl-height);
}

.msl--has-list .msl__body {
	grid-template-areas: var(--msl-areas);
	grid-template-columns: var(--msl-cols);
	grid-template-rows: var(--msl-rows);
}

.msl__map-wrap {
	grid-area: map;
	container-type: inline-size;
	position: relative;
	min-height: 200px;
	overflow: hidden;
	isolation: isolate;
	background: #e5e3df;
}

.msl--panel .msl__body {
	grid-template-areas: var(--msl-p-areas);
	grid-template-rows: var(--msl-p-rows);
	height: var(--msl-p-h);
}

.msl--panel.msl--no-list .msl__body {
	grid-template-areas: var(--msl-pn-areas);
	grid-template-rows: var(--msl-pn-rows);
	height: auto;
}

.msl__panel {
	grid-area: panel;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--msl-toolbar-gap);
	min-width: 0;
}

.msl--no-list .msl__panel {
	align-self: var(--msl-panel-align);
}

.msl__title {
	margin: 0 0 0.35em;
	line-height: 1.2;
}

.msl__subtitle {
	margin: 0 0 0.75em;
	font-size: 1.05em;
	opacity: 0.85;
}

.msl__desc {
	margin: 0;
	font-size: 0.92em;
}

.msl__desc p {
	margin: 0 0 0.6em;
}

/* No trailing margin before the selects; zero specificity so Style tab spacing wins. */
:where(.msl__head, .msl__desc) > :last-child {
	margin-bottom: 0;
}

.msl__panel .msl__filter {
	flex: 0 0 auto;
	min-width: 0;
}

.msl__panel .msl__select {
	width: 100%;
}

.msl__panel .msl__btn--link {
	align-self: flex-start;
}

.msl__select:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.msl:not(.msl--has-list) .msl__map-wrap {
	grid-area: auto;
}

.msl__map {
	position: absolute;
	inset: 0;
	font: inherit;
	background: #e5e3df;
}

.msl .leaflet-tile-pane {
	filter: grayscale(var(--msl-tiles-gray, 0%)) brightness(var(--msl-tiles-bright, 100%));
}

/* ---------------------------------------------------------------- Toolbar */

.msl__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--msl-toolbar-gap);
}

.msl__search {
	display: flex;
	flex: 2 1 280px;
	min-width: 0;
	margin: 0;
}

.msl__search .msl__input {
	flex: 1 1 auto;
	min-width: 0;
	border-start-end-radius: 0;
	border-end-end-radius: 0;
}

.msl__search .msl__btn {
	border-start-start-radius: 0;
	border-end-start-radius: 0;
}

.msl__input,
.msl__select,
.msl-ms__toggle {
	height: var(--msl-field-h);
	margin: 0;
	padding: 0 14px;
	font: inherit;
	font-size: 15px;
	line-height: 1.2;
	color: var(--msl-field-color);
	background-color: var(--msl-field-bg);
	border: 1px solid var(--msl-field-border);
	border-radius: var(--msl-radius);
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.msl__input:focus,
.msl__select:focus,
.msl-ms__toggle:focus-visible,
.msl-ms.is-open .msl-ms__toggle {
	border-color: var(--msl-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--msl-accent) 20%, transparent);
}

.msl__select {
	flex: 0 0 auto;
	width: auto;
	padding-inline-end: 34px;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235f6368' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 20px;
	cursor: pointer;
}

.msl__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: var(--msl-field-h);
	margin: 0;
	padding: 0 18px;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	color: var(--msl-btn-color);
	background: var(--msl-btn-bg);
	border: 0;
	border-radius: var(--msl-radius);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

.msl__btn:hover,
.msl__btn:focus-visible {
	color: var(--msl-btn-color-hover);
	background: var(--msl-btn-bg-hover);
}

.msl__btn:focus-visible {
	outline: 2px solid var(--msl-accent);
	outline-offset: 2px;
}

.msl__btn--geo {
	color: var(--msl-field-color);
	background: var(--msl-field-bg);
	border: 1px solid var(--msl-field-border);
}

.msl__btn--geo:hover,
.msl__btn--geo:focus-visible {
	color: var(--msl-accent);
	background: var(--msl-field-bg);
	border-color: var(--msl-accent);
}

.msl__btn--geo.is-loading svg {
	animation: msl-spin 1s linear infinite;
}

.msl__btn--link {
	padding: 0 6px;
	color: var(--msl-accent);
	background: transparent;
}

.msl__btn--link:hover,
.msl__btn--link:focus-visible {
	color: var(--msl-accent);
	background: transparent;
	text-decoration: underline;
}

.msl__btn[hidden] {
	display: none;
}

.msl.is-busy .msl__search .msl__btn {
	opacity: 0.6;
	pointer-events: none;
}

.msl__filter {
	position: relative;
	flex: 1 1 var(--msl-field-min);
	min-width: min(100%, var(--msl-field-min));
}

.msl__filter > select {
	width: 100%;
}

/* ---------------------------------------------------------------- Multiselect */

.msl-ms {
	position: relative;
	width: 100%;
}

.msl-ms__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	text-align: start;
	cursor: pointer;
}

.msl-ms__toggle:hover {
	color: var(--msl-field-color);
	background-color: var(--msl-field-bg);
}

.msl-ms__value {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	opacity: 0.75;
}

.msl-ms.has-value .msl-ms__value {
	opacity: 1;
	font-weight: 500;
}

.msl-ms__arrow {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	opacity: 0.6;
	transform: rotate(45deg);
	transition: transform 0.15s;
}

.msl-ms.is-open .msl-ms__arrow {
	margin-top: 4px;
	transform: rotate(-135deg);
}

.msl-ms__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 1100;
	width: max(100%, 240px);
	max-width: calc(100vw - 32px);
	padding: 8px;
	color: var(--msl-field-color);
	background: var(--msl-dropdown-bg);
	border: 1px solid var(--msl-field-border);
	border-radius: var(--msl-radius);
	box-shadow: 0 8px 24px rgba(32, 33, 36, 0.16);
}

.msl-ms--up .msl-ms__panel {
	top: auto;
	bottom: calc(100% + 6px);
}

.msl-ms--right .msl-ms__panel {
	left: auto;
	right: 0;
}

.msl-ms__panel[hidden] {
	display: none;
}

.msl-ms__search {
	width: 100%;
	height: 38px;
	margin: 0 0 6px;
	padding: 0 10px;
	font: inherit;
	font-size: 14px;
	color: inherit;
	background: var(--msl-field-bg);
	border: 1px solid var(--msl-field-border);
	border-radius: calc(var(--msl-radius) * 0.75);
	outline: none;
}

.msl-ms__search:focus {
	border-color: var(--msl-accent);
}

.msl-ms__options {
	max-height: 260px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	overscroll-behavior: contain;
}

.msl-ms__option {
	margin: 0;
	padding: 0;
}

.msl-ms__option[hidden] {
	display: none;
}

.msl-ms__option label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px 10px;
	font-size: 14px;
	line-height: 1.3;
	border-radius: calc(var(--msl-radius) * 0.6);
	cursor: pointer;
}

.msl-ms__option label:hover,
.msl-ms__option input:focus-visible + .msl-ms__check + .msl-ms__text {
	background: var(--msl-dropdown-hover);
}

.msl-ms__option label:has(input:focus-visible) {
	background: var(--msl-dropdown-hover);
}

.msl-ms__option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.msl-ms__check {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	background: #fff;
	border: 2px solid #9aa0a6;
	border-radius: 4px;
	transition: background-color 0.1s, border-color 0.1s;
}

.msl-ms:not(.msl-ms--multiple) .msl-ms__check {
	border-radius: 50%;
}

.msl-ms__option input:checked + .msl-ms__check {
	background: var(--msl-accent);
	border-color: var(--msl-accent);
}

.msl-ms__option input:checked + .msl-ms__check::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 0;
	width: 6px;
	height: 11px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.msl-ms:not(.msl-ms--multiple) .msl-ms__option input:checked + .msl-ms__check::after {
	left: 3px;
	top: 3px;
	width: 8px;
	height: 8px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	transform: none;
}

.msl-ms__empty {
	margin: 0;
	padding: 10px;
	font-size: 14px;
	opacity: 0.7;
}

.msl-ms__footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid var(--msl-divider);
}

.msl-ms:not(.has-value) .msl-ms__footer {
	display: none;
}

.msl-ms__clear {
	padding: 4px 8px;
	font: inherit;
	font-size: 13px;
	color: var(--msl-accent);
	background: none;
	border: 0;
	cursor: pointer;
}

.msl-ms__clear:hover,
.msl-ms__clear:focus {
	color: var(--msl-accent);
	background: none;
	text-decoration: underline;
}

/* ---------------------------------------------------------------- List */

.msl__list {
	grid-area: list;
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: var(--msl-list-max);
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--msl-divider);
}

.msl__count {
	flex: 0 0 auto;
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 500;
	color: #5f6368;
	border-bottom: 1px solid var(--msl-divider);
}

.msl__items {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
	overscroll-behavior: contain;
}

.msl-item {
	margin: 0;
	padding: 14px 16px;
	border-bottom: 1px solid var(--msl-divider);
	cursor: pointer;
	transition: background-color 0.15s;
}

.msl-item:hover {
	background-color: #f8f9fa;
}

.msl-item.is-active {
	background-color: color-mix(in srgb, var(--msl-accent) 8%, #fff);
	box-shadow: inset 3px 0 0 var(--msl-accent);
}

.msl-item--empty {
	padding: 24px 16px;
	font-size: 14px;
	color: #5f6368;
	cursor: default;
}

.msl-item--empty:hover {
	background: none;
}

.msl-item__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.msl-item__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.msl-item__select {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	text-align: start;
	background: none;
	border: 0;
	cursor: pointer;
}

.msl-item__select:hover,
.msl-item__select:focus {
	color: inherit;
	background: none;
}

.msl-item__select:focus-visible {
	outline: 2px solid var(--msl-accent);
	outline-offset: 2px;
}

.msl-item__distance {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 500;
	color: var(--msl-accent);
	white-space: nowrap;
}

/* ---------------------------------------------------------------- Fields (list + popup) */

.msl-field {
	display: flex;
	gap: 8px;
	margin: 3px 0;
	font-size: 14px;
	line-height: 1.45;
	color: #5f6368;
}

.msl-field__icon {
	flex: 0 0 16px;
	display: inline-flex;
	justify-content: center;
	padding-top: 3px;
	font-size: 13px;
	color: var(--msl-accent);
	fill: var(--msl-accent);
}

.msl-field__icon svg {
	width: 1em;
	height: 1em;
}

.msl-field__label {
	font-weight: 600;
}

.msl-field a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	text-underline-offset: 2px;
	word-break: break-word;
}

.msl-field a:hover {
	text-decoration-color: currentColor;
}

/* ---------------------------------------------------------------- Markers */

.msl-pin {
	background: none;
	border: 0;
}

.msl-pin svg {
	display: block;
	overflow: visible;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
	transform-origin: 50% 100%;
	transition: transform 0.15s;
}

.msl-pin:hover svg,
.msl-pin.is-active svg {
	transform: scale(1.12);
}

.msl-pin__body {
	fill: var(--msl-marker, var(--msl-accent));
	stroke: rgba(0, 0, 0, 0.18);
	stroke-width: 1;
}

.msl-pin__dot {
	fill: var(--msl-marker-dot, #fff);
}

.msl-pin.is-active .msl-pin__body {
	fill: var(--msl-marker-active, #d93025);
}

/* Store name as marker ("Store name label") and under the pin ("Pin with store name"). */
.msl-tag,
.msl .msl-tag-tip {
	--msl-tag-bg: var(--msl-label-bg, #1f2a44);
}

.msl-tag.is-active {
	--msl-tag-bg: var(--msl-label-active, var(--msl-marker-active, #d93025));
}

.msl-tag {
	background: none;
	border: 0;
}

.msl-tag__text,
.msl .msl-tag-tip {
	max-width: var(--msl-label-max, 260px);
	padding: 6px 10px;
	overflow: hidden;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--msl-label-color, #fff);
	background: var(--msl-tag-bg);
	border: 0;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.msl-tag__text {
	position: absolute;
	bottom: 7px;
	left: 0;
	display: block;
	width: max-content;
	cursor: pointer;
	transform: translateX(-50%);
	transition: background-color 0.15s;
}

/* Arrow pointing at the store position (outside the text box, which clips overflow). */
.msl-tag::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: -7px;
	border: 7px solid transparent;
	border-bottom: 0;
	border-top-color: var(--msl-tag-bg);
}

.msl .msl-tag-tip.leaflet-tooltip-bottom::before {
	border-bottom-color: var(--msl-tag-bg);
}

.msl-pin-img {
	transform-origin: 50% 100%;
	transition: filter 0.15s;
}

.msl-pin-img.is-active {
	filter: drop-shadow(0 0 4px var(--msl-marker-active, #d93025));
}

.msl-cluster {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--msl-cluster-color, #fff);
	background: var(--msl-cluster-bg, var(--msl-accent));
	border-radius: 50%;
	box-shadow: 0 0 0 5px var(--msl-cluster-ring, color-mix(in srgb, var(--msl-cluster-bg, var(--msl-accent)) 25%, transparent));
	transition: transform 0.15s;
}

.msl-cluster:hover {
	transform: scale(1.08);
}

.msl-cluster--md {
	font-size: 14px;
	box-shadow: 0 0 0 7px var(--msl-cluster-ring, color-mix(in srgb, var(--msl-cluster-bg, var(--msl-accent)) 25%, transparent));
}

.msl-cluster--lg {
	font-size: 15px;
	box-shadow: 0 0 0 9px var(--msl-cluster-ring, color-mix(in srgb, var(--msl-cluster-bg, var(--msl-accent)) 25%, transparent));
}

.msl .msl-origin {
	fill: var(--msl-accent);
	fill-opacity: 1;
	stroke: #fff;
	stroke-width: 3;
	filter: drop-shadow(0 0 6px color-mix(in srgb, var(--msl-accent) 60%, transparent));
}

.msl .msl-radius {
	fill: var(--msl-accent);
	fill-opacity: 0.06;
	stroke: var(--msl-accent);
	stroke-opacity: 0.4;
	stroke-width: 1.5;
	stroke-dasharray: 6 6;
}

/* ---------------------------------------------------------------- Popup */

.msl .msl-popup .leaflet-popup-content-wrapper {
	padding: 0;
	color: inherit;
	background: var(--msl-popup-bg);
	border-radius: var(--msl-popup-radius);
	box-shadow: 0 6px 24px rgba(32, 33, 36, 0.2);
}

/*
 * Arrow (tip) and distance from the marker. The tip container is exactly as tall
 * as the visible arrow (17px tip → ~10px, measured), and the JS offset is 0, so
 * --msl-popup-gap is the real space between the arrow point (or the popup edge,
 * when the arrow is hidden) and the marker.
 */
.msl .msl-popup {
	--_tip: var(--msl-popup-tip, 17px);
	--_tip-h: var(--msl-popup-tip-h, calc(var(--_tip) * 0.607 - 0.4px));
	margin-bottom: calc(var(--msl-popup-gap, var(--msl-popup-gap-auto, 0px)) + var(--_tip-h));
}

.msl .msl-popup .leaflet-popup-tip-container {
	width: calc(var(--_tip) * 2.35);
	height: var(--_tip-h);
	margin-top: 0;
	margin-left: calc(var(--_tip) * -1.175);
}

.msl .msl-popup .leaflet-popup-tip {
	width: var(--_tip);
	height: var(--_tip);
	margin: calc(var(--_tip) * -0.6) auto 0;
	background: var(--msl-popup-bg);
}

.msl .msl-popup .leaflet-popup-content {
	/* Leaflet sets the width (content clamped to min/max, see popupWidths()); capped to the map size. */
	max-width: calc(100vw - 48px);
	max-width: calc(100cqw - 48px);
	margin: 0;
	padding: 16px 18px;
	font: inherit;
	font-size: 14px;
	line-height: 1.45;
}

.msl .msl-popup a.leaflet-popup-close-button {
	top: 6px;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--msl-popup-close-size, 20px) + 6px);
	height: calc(var(--msl-popup-close-size, 20px) + 6px);
	padding: 0;
	font-size: var(--msl-popup-close-size, 20px);
	line-height: 1;
	color: var(--msl-popup-close, #5f6368);
	background: var(--msl-popup-close-bg, transparent);
	border-radius: 50%;
	text-decoration: none;
}

.msl .msl-popup a.leaflet-popup-close-button:hover,
.msl .msl-popup a.leaflet-popup-close-button:focus-visible {
	color: var(--msl-popup-close-hover, #202124);
	background: var(--msl-popup-close-hover-bg, #f1f3f4);
}

.msl-card__title {
	margin: 0 24px 8px 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

/* Popup fields: spacing, optional divider, icon size (Style → Popup). */
.msl-card .msl-field {
	gap: var(--msl-pf-icon-gap, 8px);
	margin: 0;
	padding: calc(var(--msl-pf-gap, 6px) / 2) 0;
}

.msl-card .msl-field + .msl-field {
	border-top: var(--msl-pf-div-w, 0px) solid var(--msl-pf-div, #e6e8eb);
}

/* No divider around images (logos): they close the card. */
.msl-card .msl-field + .msl-field--image {
	border-top: 0;
}

.msl-card .msl-field__icon {
	flex-basis: calc(var(--msl-pf-icon, 13px) + 3px);
	font-size: var(--msl-pf-icon, 13px);
}

.msl-field--image .msl-field__body {
	display: block;
}

.msl-field__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: var(--msl-pf-img-h, 60px);
	margin-top: 4px;
	border: 0;
	box-shadow: none;
}


.msl-card__directions.msl__btn {
	height: 36px;
	margin-top: 10px;
	padding: 0 14px;
	font-size: 14px;
	color: var(--msl-btn-color);
}

.msl .msl-popup .msl-card__directions.msl__btn {
	color: var(--msl-btn-color);
}

.msl-popup__loading {
	padding: 12px 0;
	font-size: 14px;
	text-align: center;
	opacity: 0.7;
}

/* ---------------------------------------------------------------- Consent + notice */

.msl__consent {
	position: absolute;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 24px;
	text-align: center;
	background: #f1f3f4;
}

.msl__consent p {
	max-width: 420px;
	margin: 0;
	font-size: 14px;
	color: #5f6368;
}

.msl__notice {
	position: absolute;
	top: 12px;
	left: 50%;
	z-index: 1000;
	max-width: calc(100% - 24px);
	padding: 10px 16px;
	font-size: 14px;
	color: #fff;
	background: #202124;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -8px);
	transition: opacity 0.2s, transform 0.2s;
}

.msl__notice.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.msl .leaflet-control-attribution {
	font-size: 10px;
}

@keyframes msl-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.msl *,
	.msl *::before,
	.msl *::after {
		transition: none !important;
		animation: none !important;
	}
}
