/* Client Locations Map – front end.
 * Themes can override the custom properties below on .clm */
.clm {
	--clm-ink: #15223A;
	--clm-muted: #5A6678;
	--clm-rule: #D9DEE5;
	--clm-panel: #FFFFFF;
	--clm-hover: #EEF3F7;
	--clm-accent: #2B6C99;
	--clm-radius: 10px;
	--clm-height: 560px;
	color: var(--clm-ink);
	font-size: 15px;
	line-height: 1.45;
	margin: 1.5em 0;
	container-type: inline-size;
	container-name: clm;
}
.clm *, .clm *::before, .clm *::after { box-sizing: border-box; }
.clm-intro { margin-bottom: 14px; max-width: 70ch; }
.clm-intro p { margin: 0 0 .6em; }

.clm-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.clm--with-list .clm-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); }
.clm--with-list.clm--list-left .clm-body { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
.clm--list-left .clm-side { order: -1; }

.clm-map {
	height: var(--clm-height);
	border: 1px solid var(--clm-rule);
	border-radius: var(--clm-radius);
	overflow: hidden;
	background: #E8ECEF;
	z-index: 0;
}
.clm .leaflet-container { font: inherit; font-size: 14px; }
.clm .leaflet-container a { color: var(--clm-accent); }

/* Pins */
.clm-pin { background: none; border: 0; }
.clm-pin svg { display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); transition: transform .12s; transform-origin: 50% 100%; }
.clm-pin:hover svg { transform: scale(1.08); }
.clm-pin:focus-visible { outline: 3px solid var(--clm-accent); outline-offset: 2px; border-radius: 50%; }

/* Reset control */
.clm-reset {
	width: 34px; height: 34px; border: 2px solid rgba(0, 0, 0, .2); border-radius: 4px;
	background: #fff; color: #333; font-size: 18px; line-height: 1; cursor: pointer; background-clip: padding-box;
}
.clm-reset:hover { background: #f4f4f4; }

/* Popup */
.clm .leaflet-popup-content-wrapper { border-radius: 8px; }
.clm .leaflet-popup-content { margin: 14px 16px; }
.clm .clm-pop h4 { margin: 4px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--clm-ink); letter-spacing: 0; }
.clm-pop p { margin: 0 0 6px; }
.clm-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--clm-muted); }
.clm-tag i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.clm-place { color: var(--clm-muted); }
.clm-contact { list-style: none; margin: 6px 0; padding: 0; }
.clm-contact li { margin: 2px 0; overflow-wrap: anywhere; }
.clm-joined, .clm-extra { font-size: 13px; color: var(--clm-muted); }
.clm-notes { white-space: pre-wrap; font-size: 13.5px; border-top: 1px solid var(--clm-rule); padding-top: 6px; margin-top: 6px; }
.clm-dir a { font-weight: 600; }

/* Legend / filters */
.clm-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.clm-legend button, .clm-legend-item {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 5px 11px; border: 1px solid var(--clm-rule); border-radius: 999px;
	background: var(--clm-panel); color: var(--clm-ink); font: inherit; font-size: 13px; line-height: 1.3;
}
.clm-legend button { cursor: pointer; }
.clm-legend button:hover { background: var(--clm-hover); }
.clm-legend button[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
.clm-legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.clm-n { color: var(--clm-muted); font-variant-numeric: tabular-nums; }

/* Sidebar list */
.clm-side { display: flex; flex-direction: column; min-width: 0; max-height: calc(var(--clm-height) + 44px); }
.clm-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.clm .clm-list-title { margin: 0; font-size: 17px; line-height: 1.3; }
.clm-count { color: var(--clm-muted); font-size: 13px; white-space: nowrap; }
.clm .clm-search {
	width: 100%; padding: 9px 12px; margin: 0 0 8px;
	border: 1px solid var(--clm-rule); border-radius: 8px; background: var(--clm-panel); color: var(--clm-ink); font: inherit;
}
.clm .clm-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.clm .clm-list li { margin: 0; padding: 0; }
.clm .clm-list li::before { display: none; }
.clm .clm-list button {
	display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: baseline;
	width: 100%; padding: 9px 8px; border: 0; border-radius: 8px;
	background: none; color: var(--clm-ink); text-align: left; font: inherit; cursor: pointer;
}
.clm .clm-list button:hover { background: var(--clm-hover); }
.clm .clm-list button[aria-current="true"] { background: var(--clm-hover); box-shadow: inset 3px 0 0 var(--clm-accent); }
.clm-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; transform: translateY(1px); }
.clm-li-name { font-weight: 600; line-height: 1.3; }
.clm-li-sub { display: block; font-weight: 400; font-size: 13px; color: var(--clm-muted); }
.clm-li-nopin { font-style: italic; }
.clm-empty { color: var(--clm-muted); padding: 8px; }

.clm button:focus-visible, .clm input:focus-visible { outline: 3px solid var(--clm-accent); outline-offset: 2px; }

@container clm (max-width: 760px) {
	.clm--with-list .clm-body, .clm--with-list.clm--list-left .clm-body { grid-template-columns: minmax(0, 1fr); }
	.clm-side, .clm--list-left .clm-side { max-height: none; order: 0; }
	.clm .clm-list { max-height: 420px; }
}
@media (max-width: 780px) {
	.clm--with-list .clm-body { grid-template-columns: minmax(0, 1fr); }
	.clm-map { height: min(var(--clm-height), 70vh); }
	.clm-side { max-height: none; }
	.clm .clm-list { max-height: 60vh; }
}
@media (prefers-reduced-motion: reduce) {
	.clm-pin svg { transition: none; }
}
