/* Leaflet Locator widget styles */

/* ---- Layout: sidebar + map ---- */
.llocator-wrap {
	display: flex;
	align-items: stretch;
	width: 100%;
}

.llocator-map {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: var( --llocator-h, 500px );
	min-height: 200px;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	z-index: 0; /* keep tiles below themed headers/menus */
}

/* ---- Sidebar (location list) ---- */
.llocator-sidebar {
	flex: 0 0 33%;
	max-width: 33%;
	height: var( --llocator-h, 500px );
	overflow-y: auto;
	padding: 0 24px 0 0;
	box-sizing: border-box;
	/* Visible (light) scrollbar so it's clear the list scrolls. */
	scrollbar-width: thin;
	scrollbar-color: rgba( 212, 176, 106, 0.55 ) rgba( 128, 128, 128, 0.12 );
}

.llocator-sidebar::-webkit-scrollbar {
	width: 8px;
}

.llocator-sidebar::-webkit-scrollbar-track {
	background: rgba( 128, 128, 128, 0.12 );
	border-radius: 8px;
}

.llocator-sidebar::-webkit-scrollbar-thumb {
	background: rgba( 212, 176, 106, 0.55 );
	border-radius: 8px;
}

.llocator-sidebar::-webkit-scrollbar-thumb:hover {
	background: rgba( 212, 176, 106, 0.85 );
}

.llocator-pos-right .llocator-sidebar {
	order: 2;
	padding: 0 0 0 24px;
}

.llocator-item {
	padding: 18px 8px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.llocator-item + .llocator-item {
	border-top: 1px dashed rgba( 128, 128, 128, 0.45 );
}

.llocator-item:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.llocator-item-name {
	margin: 0 0 6px;
	font-family: 'Cormorant Garamond', serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #d4b06a;
}

.llocator-item-name a {
	color: inherit;
	text-decoration: underline;
}

.llocator-item-addr {
	font-family: 'Baskervville', serif;
	font-size: 15px;
	line-height: 1.6;
	color: #88806e;
}

/* ---- Responsive: stack sidebar above the map on small screens ---- */
@media ( max-width: 767px ) {
	.llocator-wrap {
		flex-direction: column;
	}

	/* !important so the stacked layout wins over Elementor's generated
	   sidebar-width rules, which have higher specificity. */
	.llocator-sidebar,
	.llocator-pos-right .llocator-sidebar {
		flex: 1 1 auto !important;
		max-width: 100% !important;
		height: auto;
		max-height: 320px;
		order: 0;
		padding: 0 0 16px;
	}
}

/* MapLibre popup content sizing. Explicit text color so dark themes
   (white body text) don't leave white-on-white popups. Top padding leaves
   a clear row for the close button so text never runs under it. */
.llocator-map .maplibregl-popup-content {
	padding: 30px 20px 16px;
	border-radius: 6px;
	box-shadow: 0 2px 14px rgba( 0, 0, 0, 0.22 );
	color: #555555;
	background: #ffffff;
}

/* Close button: plain gray X in the top-right corner. The explicit resets
   guard against theme/global button styles (backgrounds, borders, padding)
   bleeding into the popup. */
.llocator-map .maplibregl-popup-close-button {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	box-shadow: none;
	font-family: Arial, sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 28px;
	text-align: center;
	color: #666666;
	cursor: pointer;
}

.llocator-map .maplibregl-popup-close-button:hover,
.llocator-map .maplibregl-popup-close-button:focus {
	background: rgba( 0, 0, 0, 0.06 );
	color: #222222;
	outline: none;
}

.llocator-map .llocator-pop-name {
	color: #d4b06a;
}

.llocator-empty {
	padding: 24px;
	text-align: center;
	color: #777;
	background: #f6f7f7;
	border: 1px dashed #ccc;
	border-radius: 8px;
}

/* Popup contents */
.llocator-pop-name {
	display: block;
	font-family: 'Cormorant Garamond', serif;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.25;
	margin-bottom: 4px;
}

.llocator-pop-addr {
	font-family: 'Baskervville', serif;
	font-size: 14px;
	color: #555;
	line-height: 1.5;
}

.llocator-pop-desc {
	font-family: 'Baskervville', serif;
	font-size: 13px;
	margin-top: 6px;
	line-height: 1.4;
}

.llocator-pop-link {
	display: inline-block;
	margin-top: 8px;
	font-weight: 600;
	text-decoration: none;
}
