/* ==========================================================================
   Shop Location Search: styles
   Self-contained (no theme grid needed). Override the variables below from
   your theme / Customizer CSS to match brand colors and fonts exactly, e.g.
     .sls-finder { --sls-blue:#2f6fb5; --sls-red:#b0292f; }
   ========================================================================== */

.sls-finder {
	--sls-blue: #2f6fb5;          /* location names, links, pin accents */
	--sls-red: #b0292f;           /* View Details button, map pins */
	--sls-red-hover: #8f2025;
	--sls-text: #3d3d3d;
	--sls-border: #c8c8c8;
	--sls-map-bg: #e8e9ed;
	--sls-search-bg: #263b81;     /* search bar band; set to transparent to hide the band */
	--sls-panel-width: 250px;
	--sls-height: 650px;

	/* Fonts: inherit from the theme by default. Point these at your own families. */
	--sls-font-body: inherit;
	--sls-font-heading: inherit;  /* e.g. "Roboto Slab", serif */
	--sls-font-button: inherit;   /* e.g. "Barlow Condensed", sans-serif */

	color: var(--sls-text);
	font-family: var(--sls-font-body);
	box-sizing: border-box;
}
.sls-finder *,
.sls-finder *::before,
.sls-finder *::after { box-sizing: border-box; }

.sls-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Search bar ---------- */
.sls-search {
	background: var(--sls-search-bg);
	padding: 18px 20px 10px;
	margin-bottom: 20px;
}
.sls-search__form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}
.sls-search__form input[type="text"] {
	flex: 1 1 240px;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid #1a75bb;
	border-radius: 3px;
	background: #fff;
	color: #000;
	font-size: 20px;
	font-weight: 400;
}
.sls-search__submit,
.sls-search__geo {
	height: 50px;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: 3px;
	color: #fff;
	font-family: var(--sls-font-button);
	font-size: 18px !important;
	letter-spacing: .05em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .15s;
}
.sls-search__submit { background: #1a75bb; }
.sls-search__submit:hover,
.sls-search__submit:focus-visible { background: #0a1726; }
.sls-search__geo { background: transparent; border: 1px solid #fff; }
.sls-search__geo:hover,
.sls-search__geo:focus-visible { background: rgba(255, 255, 255, .15); }
.sls-search__status {
	min-height: 1.4em;
	margin: 8px 0 0;
	color: #fff;
	font-size: 15px;
}

/* ---------- Layout: list panel + map ---------- */
.sls-layout {
	display: flex;
	align-items: stretch;
	gap: 16px;
	height: var(--sls-height);
}

.sls-panel {
	position: relative;
	flex: 0 0 var(--sls-panel-width);
	width: var(--sls-panel-width);
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--sls-border);
	border-radius: 3px;
}

.sls-list {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 12px 16px 16px;
	-webkit-overflow-scrolling: touch;
}
.sls-list:focus-visible { outline: 2px solid var(--sls-blue); outline-offset: -2px; }

.sls-map {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	background: var(--sls-map-bg);
	z-index: 1; /* keep Leaflet panes under sticky headers / menus */
}

/* ---------- Location card ---------- */
.sls-card {
	padding: 10px 0 26px;
	margin: 0;
	cursor: default;
}
.sls-card + .sls-card { margin-top: 6px; }
.sls-card.is-active .sls-card__title { text-decoration: underline; }

.sls-card__title {
	margin: 0 0 6px;
	color: var(--sls-blue);
	font-family: var(--sls-font-heading);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.15;
	text-transform: none;
}
.sls-card__distance {
	display: block;
	margin-top: 4px;
	color: var(--sls-text);
	font-family: var(--sls-font-body);
	font-size: 13px;
	font-weight: 400;
}

.sls-card__address {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.5;
}
.sls-card__phone { margin: 0 0 14px; }
.sls-card__phone a {
	color: var(--sls-text);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}
.sls-card__phone a:hover,
.sls-card__phone a:focus-visible { text-decoration: underline; }

.sls-card__directions { margin: 0 0 14px; }
.sls-card__directions a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #000;
	font-family: var(--sls-font-button);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: .06em;
	text-decoration: none;
}
.sls-card__directions a:hover,
.sls-card__directions a:focus-visible { color: var(--sls-blue); }
.sls-card__directions .sls-icon { flex: none; }

.sls-card__actions { display: grid; grid-template-columns: max-content; gap: 10px; }

/* ---------- Buttons ---------- */
.sls-btn {
	display: inline-block;
	padding: 11px 18px;
	border: 0;
	border-radius: 4px;
	background: var(--sls-red);
	color: #fff !important;
	font-family: var(--sls-font-button);
	font-size: 17px;
	font-weight: 500;
	letter-spacing: .08em;
	line-height: 1;
	white-space: nowrap;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .15s;
}
.sls-btn:hover,
.sls-btn:focus-visible { background: var(--sls-red-hover); color: #fff; }
.sls-btn--blue { background: var(--sls-blue); }
.sls-btn--blue:hover,
.sls-btn--blue:focus-visible { background: #1f5090; }
.sls-btn--small { padding: 9px 14px; font-size: 14px; }

/* ---------- "Scroll for More Locations" ---------- */
.sls-scroll-hint {
	position: relative;
	flex: none;
	padding: 18px 12px 14px;
	text-align: center;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 40%);
	margin-top: -36px;   /* fades over the end of the list */
	pointer-events: none;
    font-size: 14px !important;
}
.sls-scroll-hint[hidden] { display: none; }
.sls-scroll-hint span {
	display: block;
	margin-bottom: 10px;
	font-size: 12px;
	font-weight: 700;
}
.sls-scroll-hint__btn {
	pointer-events: auto;
	display: inline-flex;
	padding: 0;
	border: 0;
	background: none;
	color: var(--sls-blue);
	cursor: pointer;
	line-height: 0;
}
.sls-scroll-hint__btn:hover,
.sls-scroll-hint__btn:focus-visible { color: #1f5090; }

.sls-empty { margin: 0; padding: 12px 0; }

/* ---------- Map: pins + popups ---------- */
.sls-map .leaflet-container,
.sls-map.leaflet-container { font-family: var(--sls-font-body); }

.sls-pin { background: none; border: 0; }
.sls-pin img {
    display: block;
    width: 40px;
    height: 40px;
    padding: 6px;
    border: 2px solid var(--sls-red);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .4);
    transition: transform .15s;
}
.sls-pin.is-active img { transform: scale(1.2); }

.sls-you { background: none; border: 0; }
.sls-you span {
	display: block;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--sls-blue);
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px rgba(47, 111, 181, .35), 0 1px 4px rgba(0, 0, 0, .4);
}

.sls-map__error { margin: 0; padding: 40px 24px; text-align: center; }

.popup-content { line-height: 1.4; color: var(--sls-text); }
.popup-content .sls-popup-title {
	display: block;
	margin-bottom: 4px;
	color: var(--sls-blue);
	font-family: var(--sls-font-heading);
	font-size: 18px;
	font-weight: 700;
}
.popup-content .sls-popup-address { margin: 4px 0; font-size: 14px; }
.popup-content .sls-popup-phone {
	display: block;
	margin: 6px 0;
	color: var(--sls-text);
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
}
.popup-content .sls-popup-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 10px;
}
.popup-content .sls-popup-link { color: var(--sls-blue); font-weight: 700; }
.popup-content .sls-schedule-btn { margin-top: 10px; }
.leaflet-popup-content { margin: 14px 16px; }
.leaflet-container a.sls-btn,
.leaflet-container a.sls-btn:hover { color: #fff; }

/* ---------- Tablet / mobile: map on top, list below ---------- */
@media (max-width: 900px) {
	.sls-layout {
		flex-direction: column-reverse;
		height: auto;
		gap: 20px;
	}
	.sls-map { flex: none; height: 340px; }
	.sls-panel { flex: none; width: 100%; }
	.sls-list { max-height: 560px; padding: 16px 20px 20px; }
}
