/*
 * This file owns the public map's styling.
 *
 * Every selector is prefixed .lm-. There are no element selectors, no :root
 * declarations and no reset of any kind, so nothing here can reach the host
 * theme. That is the entire reason this plugin no longer ships Tailwind.
 */

.lm-map-container {
	position: relative;
	display: block;
	max-width: 100%;
}

.lm-map {
	width: 100%;
	min-height: 240px;
}

/* Leaflet paints .leaflet-div-icon as a white box with a border, which would
   frame every marker. */
.lm-marker {
	background: none;
	border: 0;
}

.lm-marker__dot {
	display: block;
	width: 16px;
	height: 16px;
	margin: 3px;
	border-radius: 50%;
	background: var(--lm-color, #3388ff);
	box-shadow: 0 0 0 3px #fff, 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Leaflet sets transform, margin, width, height and z-index inline on marker
   elements, but never display — so a plain class rule wins with no !important. */
.lm-marker--hidden {
	display: none;
}

.lm-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1em;
	margin: 0.75em 0 0;
	padding: 0;
	list-style: none;
}

.lm-legend__item {
	margin: 0;
	padding: 0;
}

.lm-legend__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.2em 0.5em;
	border: 1px solid transparent;
	border-radius: 4px;
	background: none;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.lm-legend__toggle:hover,
.lm-legend__toggle:focus-visible {
	border-color: currentColor;
}

/* A toggled-off group is shown by a struck-through label and a hollowed-out
   swatch. Deliberately not by dimming: reducing opacity on text muddies
   anti-aliasing and quietly breaks the contrast ratio, and the state needs to
   be legible, not faint. */
.lm-legend__toggle[aria-pressed="false"] .lm-legend__label {
	text-decoration: line-through;
}

.lm-legend__toggle[aria-pressed="false"] .lm-swatch {
	background: transparent;
}

.lm-legend .lm-swatch {
	display: inline-block;
	width: 0.85em;
	height: 0.85em;
	border-radius: 50%;
	border: 1px solid currentColor;
	background: var(--lm-color, #3388ff);
}

.lm-popup__title {
	display: block;
}

.lm-popup__address,
.lm-popup__group {
	display: block;
}

/* Differentiated by size and spacing rather than by dimming — opacity on text
   degrades anti-aliasing and silently lowers the contrast ratio. */
.lm-popup__group:not(:empty) {
	margin-top: 0.35em;
	font-size: 0.9em;
	font-style: italic;
}
