/* Outpost — Map Locator (split list + interactive map). Brand colors come
   from the shared --outpost-* vars, same as the loop and flyout. */

.outpost-maploc {
	--_primary: var( --outpost-primary, #0061ff );
	--_primary-dark: var( --outpost-primary-dark, #0082e5 );
	--_primary-text: var( --outpost-primary-text, #fff );
	--_map-height: var( --outpost-map-height, 620px );
	font-family: inherit;
	color: #111827;
}

/* ---- optional heading ---- */
.outpost-maploc__head { text-align: center; margin: 0 0 18px; }
.outpost-maploc__title { margin: 0 0 6px; font-size: 1.9rem; line-height: 1.15; }
.outpost-maploc__subtitle { margin: 0; color: #6b7280; }

/* ---- toolbar ---- */
.outpost-maploc__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 14px;
}
.outpost-maploc__toolbar:empty { display: none; }

.outpost-maploc__search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 320px;
	min-width: 240px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	padding: 6px 8px 6px 16px;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, .04 );
}
.outpost-maploc__search-icon { color: var( --_primary ); display: inline-flex; font-size: 18px; }
.outpost-maploc__q {
	flex: 1;
	font: inherit;
	padding: 8px 0;
	min-width: 0;
	/* The pill provides the border; reset any theme input styling. */
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	-webkit-appearance: none;
	appearance: none;
}
.outpost-maploc__q:focus { border: 0 !important; box-shadow: none !important; outline: 0 !important; }
.outpost-maploc__geo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: transparent;
	color: var( --_primary );
	cursor: pointer;
	font-size: 18px;
	flex-shrink: 0;
}
.outpost-maploc__geo:hover { background: rgba( 0, 0, 0, .05 ); }
.outpost-maploc__radius {
	display: inline-flex;
	align-items: center;
	border-left: 1px solid #e5e7eb;
	padding-left: 6px;
	flex-shrink: 0;
}
.outpost-maploc__radius select {
	border: 0;
	background: transparent;
	font: inherit;
	color: #374151;
	padding: 8px 4px;
	cursor: pointer;
	outline: 0;
}

/* ---- category dropdown ---- */
/* z-index sits above Leaflet's panes/controls (which climb to ~1000). */
.outpost-maploc__cat { position: relative; flex-shrink: 0; z-index: 1200; }
.outpost-maploc__catbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba( 0, 97, 255, .06 );
	color: var( --_primary );
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 12px 18px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}
.outpost-maploc__catbtn:hover { background: rgba( 0, 97, 255, .1 ); }
.outpost-maploc__cat.is-open .outpost-maploc__catbtn { border-color: var( --_primary ); }
.outpost-maploc__catbtn .outpost-icon { transition: transform .15s ease; }
.outpost-maploc__cat.is-open .outpost-maploc__catbtn .outpost-icon { transform: rotate( 180deg ); }

.outpost-maploc__catpanel {
	position: absolute;
	right: 0;
	top: calc( 100% + 8px );
	z-index: 1200;
	min-width: 220px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba( 0, 0, 0, .14 );
	padding: 8px;
}
.outpost-maploc__catopt {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 8px;
	cursor: pointer;
	font-size: .95rem;
}
.outpost-maploc__catopt:hover { background: #f3f4f6; }
.outpost-maploc__catopt input { margin: 0; flex-shrink: 0; }
.outpost-maploc__catopt > span { flex: 1; }
/* Keep service icons small, whatever markup they use (svg or uploaded img). */
.outpost-maploc__catopt .outpost-ico,
.outpost-maploc__catopt .outpost-icon,
.outpost-maploc__catopt svg,
.outpost-maploc__catopt img,
.outpost-maploc__catopt .outpost-ico-img {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	object-fit: contain;
	color: var( --_primary );
}

/* ---- split body ---- */
.outpost-maploc__body {
	display: grid;
	grid-template-columns: minmax( 300px, 380px ) 1fr;
	gap: 0;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 10px rgba( 0, 0, 0, .05 );
}
.outpost-maploc--map-only .outpost-maploc__body { grid-template-columns: 1fr; }
.outpost-maploc--map-only .outpost-maploc__list { display: none; }

.outpost-maploc__list {
	height: var( --_map-height );
	overflow-y: auto;
	padding: 8px;
	background: #fff;
	border-right: 1px solid #eef0f2;
}
.outpost-maploc__canvas {
	height: var( --_map-height );
	position: relative;
	background: #eef2f5;
}
.outpost-maploc__canvas .leaflet-container { height: 100%; width: 100%; font: inherit; }

.outpost-maploc__fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 24px;
	color: #6b7280;
}

/* ---- list status ---- */
.outpost-maploc__liststatus {
	margin: 4px 6px 10px;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba( 0, 97, 255, .06 );
	color: var( --_primary-dark );
	font-size: .9rem;
	line-height: 1.4;
}
.outpost-maploc__liststatus.is-error { background: #fef2f2; color: #b91c1c; }

/* ---- list cards (rows) ---- */
.outpost-maploc__card {
	position: relative;
	padding: 14px 14px 16px;
	border-radius: 12px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.outpost-maploc__card + .outpost-maploc__card { border-top: 1px solid #f1f2f4; }
.outpost-maploc__card:hover { background: #fafafa; }
.outpost-maploc__card:focus-visible { outline: 2px solid var( --_primary ); outline-offset: -2px; }
.outpost-maploc__card.is-active {
	background: rgba( 0, 97, 255, .05 );
	border-color: var( --_primary );
	box-shadow: inset 3px 0 0 var( --_primary );
}
.outpost-maploc__card.is-dimmed { opacity: .45; }

.outpost-maploc__card-title { margin: 0 0 8px; font-size: 1.12rem; line-height: 1.2; }

.outpost-maploc__card .outpost-card__tags,
.outpost-maploc__card .outpost-tags { margin-bottom: 8px; }

.outpost-maploc__card-addr {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	color: #4b5563;
	font-size: .92rem;
	line-height: 1.35;
	margin-bottom: 8px;
}
.outpost-maploc__card-addr .outpost-icon { color: var( --_primary ); margin-top: 2px; flex-shrink: 0; }

.outpost-maploc__card-status {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: .9rem;
	color: #374151;
	margin-bottom: 10px;
	min-height: 18px;
}

.outpost-maploc__card-phone {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var( --_primary );
	text-decoration: none;
	font-size: .92rem;
	margin-bottom: 12px;
}
.outpost-maploc__card-phone:hover { text-decoration: underline; }

.outpost-maploc__card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.outpost-maploc__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 14px;
	border-radius: 8px;
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
	line-height: 1.1;
}
.outpost-maploc__btn--primary { background: var( --_primary ); color: var( --_primary-text ); }
.outpost-maploc__btn--primary:hover { background: var( --_primary-dark ); color: var( --_primary-text ); }
.outpost-maploc__btn--secondary { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }
.outpost-maploc__btn--secondary:hover { background: #e5e7eb; color: #374151; }

/* ---- distance badge (search) ---- */
.outpost-maploc__dist {
	display: inline-block;
	font-size: .74rem;
	font-weight: 700;
	color: var( --_primary );
	background: rgba( 0, 97, 255, .08 );
	border-radius: 999px;
	padding: 3px 10px;
	margin-bottom: 8px;
	letter-spacing: .02em;
}
.outpost-maploc__dist.is-nearest { background: var( --_primary ); color: var( --_primary-text ); }

/* ---- shared status dot (mirrors loop.css) ---- */
.outpost-maploc .outpost-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.outpost-maploc .outpost-dot.is-open { background: #22c55e; }
.outpost-maploc .outpost-dot.is-closed { background: #ef4444; }
.outpost-maploc .outpost-empty { color: #6b7280; padding: 16px; }

/* ---- markers ---- */
.outpost-marker { background: transparent; border: 0; }
.outpost-marker__badge {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: var( --outpost-marker-radius, 50% );
	background-color: var( --outpost-marker-bg, #c9c9c9 );
	background-size: 68% 68%;
	background-repeat: no-repeat;
	background-position: center;
	border: 2px solid var( --outpost-marker-border, var( --outpost-primary, #0061ff ) );
	box-shadow: 0 2px 6px rgba( 0, 0, 0, .35 );
}
/* Floating: no badge chrome — just the logo. */
.outpost-marker__badge.is-floating {
	background-color: transparent;
	border: 0;
	box-shadow: none;
	border-radius: 0;
	background-size: contain;
	filter: drop-shadow( 0 2px 3px rgba( 0, 0, 0, .35 ) );
}
.outpost-marker--default svg { filter: drop-shadow( 0 2px 3px rgba( 0, 0, 0, .35 ) ); }

/* Cluster bubbles tinted to the brand color. */
.leaflet-container .marker-cluster div {
	background: var( --outpost-primary, #0061ff );
	color: var( --outpost-primary-text, #fff );
	font-weight: 700;
}
.leaflet-container .marker-cluster {
	background: rgba( 0, 97, 255, .25 );
}

/* ---- map popup ---- */
.outpost-pop-wrap .leaflet-popup-content-wrapper { border-radius: 12px; }
.outpost-pop { min-width: 180px; }
.outpost-pop__title { margin: 0 0 4px; font-size: 1.02rem; }
.outpost-pop__addr { color: #4b5563; font-size: .86rem; margin-bottom: 6px; line-height: 1.35; }
.outpost-pop__status { display: flex; align-items: center; gap: 6px; font-size: .84rem; margin-bottom: 10px; }
.outpost-pop__status .outpost-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.outpost-pop__status .outpost-dot.is-open { background: #22c55e; }
.outpost-pop__status .outpost-dot.is-closed { background: #ef4444; }
.outpost-pop__btn {
	display: inline-block;
	width: 100%;
	padding: 8px 12px;
	border: 0;
	border-radius: 8px;
	background: var( --outpost-primary, #0061ff );
	color: var( --outpost-primary-text, #fff );
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.outpost-pop__btn:hover { background: var( --outpost-primary-dark, #0082e5 ); }

/* ---- responsive: stack on narrow screens ---- */
@media ( max-width: 782px ) {
	.outpost-maploc__body { grid-template-columns: 1fr; }
	.outpost-maploc__list {
		height: auto;
		max-height: 420px;
		border-right: 0;
		border-bottom: 1px solid #eef0f2;
		order: 3;
	}
	.outpost-maploc__canvas { height: 340px; order: 1; }
	.outpost-maploc--map-only .outpost-maploc__canvas { height: var( --_map-height ); }
	.outpost-maploc__toolbar { flex-direction: column; align-items: stretch; }
	.outpost-maploc__cat { align-self: stretch; }
	.outpost-maploc__catbtn { width: 100%; justify-content: space-between; }
	.outpost-maploc__catpanel { left: 0; right: 0; }
	.outpost-maploc__cat.is-mobile-list-filter {
		order: 2; align-self: stretch; box-sizing: border-box;
		padding: 14px; background: #fff;
		border-top: 1px solid #eef0f2;
		border-bottom: 1px solid #eef0f2;
	}
	.outpost-maploc__cat.is-mobile-list-filter .outpost-maploc__catpanel {
		left: 14px; right: 14px; top: calc( 100% - 6px );
	}
}

/* Luxe preset — square, editorial treatment for the full map locator. */
.outpost-maploc.outpost--luxe .outpost-maploc__head { margin-bottom: 28px; }
.outpost-maploc.outpost--luxe .outpost-maploc__title { font-weight: 500; letter-spacing: .02em; }
.outpost-maploc.outpost--luxe .outpost-maploc__subtitle { color: var( --_luxe-muted ); }
.outpost-maploc.outpost--luxe .outpost-maploc__toolbar { gap: 0; margin-bottom: 22px; }
.outpost-maploc.outpost--luxe .outpost-maploc__search {
	border-radius: 0; border-color: var( --_luxe-line ); background: var( --_luxe-surface );
	box-shadow: none; padding: 7px 10px 7px 18px;
}
.outpost-maploc.outpost--luxe .outpost-maploc__q { letter-spacing: .02em; }
.outpost-maploc.outpost--luxe .outpost-maploc__geo { border-radius: 0; }
.outpost-maploc.outpost--luxe .outpost-maploc__catbtn {
	border-radius: 0; border: 1px solid var( --_luxe-line ); background: var( --_luxe-surface );
	color: var( --_luxe-ink ); font-size: 10px; font-weight: 600; letter-spacing: .12em;
	text-transform: uppercase; padding: 16px 20px;
}
.outpost-maploc.outpost--luxe .outpost-maploc__catbtn:hover { color: var( --_primary ); background: #fff; }
.outpost-maploc.outpost--luxe .outpost-maploc__catpanel {
	border-radius: 0; border-color: var( --_luxe-line ); box-shadow: 0 18px 50px rgba( 23, 23, 23, .12 );
	background: var( --_luxe-surface ); padding: 10px;
}
.outpost-maploc.outpost--luxe .outpost-maploc__catopt { border-radius: 0; }
.outpost-maploc.outpost--luxe .outpost-maploc__body {
	border-radius: 0; border-color: var( --_luxe-line ); box-shadow: none; background: var( --_luxe-surface );
}
.outpost-maploc.outpost--luxe .outpost-maploc__list { padding: 0; background: var( --_luxe-surface ); }
.outpost-maploc.outpost--luxe .outpost-maploc__liststatus { border-radius: 0; margin: 0; padding: 14px 18px; }
.outpost-maploc.outpost--luxe .outpost-maploc__card {
	border-radius: 0; padding: 20px 20px 22px; border-color: transparent;
	transition: border-color .2s ease, background-color .2s ease;
}
.outpost-maploc.outpost--luxe .outpost-maploc__card + .outpost-maploc__card { border-top-color: var( --_luxe-line ); }
.outpost-maploc.outpost--luxe .outpost-maploc__card:hover { background: #fff; }
.outpost-maploc.outpost--luxe .outpost-maploc__card.is-active { background: #fff; box-shadow: inset 2px 0 0 var( --_primary ); }
.outpost-maploc.outpost--luxe .outpost-maploc__card-title { font-size: 1.18rem; font-weight: 500; letter-spacing: .01em; }
.outpost-maploc.outpost--luxe .outpost-maploc__card-addr { color: var( --_luxe-muted ); }
.outpost-maploc.outpost--luxe .outpost-maploc__btn {
	border-radius: 0; padding: 11px 15px; font-size: 9px; font-weight: 600;
	letter-spacing: .12em; text-transform: uppercase;
}
.outpost-maploc.outpost--luxe .outpost-maploc__btn--secondary { background: transparent; border-color: var( --_luxe-line ); }
.outpost-maploc.outpost--luxe .outpost-maploc__dist { border-radius: 0; letter-spacing: .08em; text-transform: uppercase; }
.outpost-maploc.outpost--luxe .leaflet-control-zoom,
.outpost-maploc.outpost--luxe .leaflet-control-zoom a,
.outpost-maploc.outpost--luxe .leaflet-control-attribution,
.outpost-maploc.outpost--luxe .leaflet-popup-content-wrapper,
.outpost-maploc.outpost--luxe .outpost-pop__btn { border-radius: 0; }
.outpost-maploc.outpost--luxe .leaflet-popup-content-wrapper { border: 1px solid var( --_luxe-line ); box-shadow: 0 18px 50px rgba( 23, 23, 23, .15 ); }
.outpost-maploc.outpost--luxe .outpost-pop__title { font-weight: 500; letter-spacing: .02em; }
.outpost-maploc.outpost--luxe .outpost-pop__btn { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }

/* Keep the compact mobile search as a horizontal pill in every preset. */
@media ( max-width: 782px ) {
	.outpost-maploc__toolbar,
	.outpost-maploc.outpost--luxe .outpost-maploc__toolbar { gap: 12px; }
	.outpost-maploc__search,
	.outpost-maploc.outpost--luxe .outpost-maploc__search {
		flex: 0 0 auto; width: 100%; min-width: 0; min-height: 54px;
		box-sizing: border-box; border-radius: 999px;
		padding: 6px 8px 6px 16px;
	}
	.outpost-maploc__q { min-width: 0; font-size: 16px; }
	.outpost-maploc__geo,
	.outpost-maploc.outpost--luxe .outpost-maploc__geo { border-radius: 50%; }
	.outpost-maploc__radius { margin-left: auto; }
	.outpost-maploc.outpost--luxe .outpost-maploc__cat.is-mobile-list-filter { background: var( --_luxe-surface ); border-color: var( --_luxe-line ); }
}
