/* =========================================================
   CE Local Pickup – Store Locator Frontend (Flex Layout)
   ========================================================= */

.ce-lp-store-locator {
	display: flex;
	gap: 20px;
	align-items: stretch; /* THIS is the key */
}

/* Left panel */
.ce-lp-store-locator__list {
	flex: 0 0 33.333%;
	display: flex;
	flex-direction: column;
	max-height: 600px; /* adjust if needed */
	overflow-y: auto;
	scrollbar-width: thin;
}

.ce-lp-store-locator__list::-webkit-scrollbar {
	width: 6px;
}

.ce-lp-store-locator__list::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

/* Search */
.ce-lp-location-search {
	margin-bottom: 12px;
}

.ce-lp-location-search input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 4px;
	border: 1px solid #ccc;
	font-size: 14px;
	line-height: 1.4;
}

/* Location card */
.ce-lp-location-item {
	padding: 12px;
	border-radius: 6px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.ce-lp-location-item + .ce-lp-location-item {
	margin-top: 8px;
}

/* Hover */
.ce-lp-location-item:hover {
	background: #f7f7f7;
}

/* Active */
.ce-lp-location-item.is-active {
	background: #eef5ff;
	border-color: #2271b1;
}

/* Store name */
.ce-lp-location-item strong {
	display: block;
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #111;
}

/* Address + phone */
.ce-lp-location-meta {
	font-size: 13px;
	color: #555;
	line-height: 1.4;
}

/* Business hours */
.ce-lp-hours {
	margin-top: 4px;
	font-size: 12px;
	color: #666;
}

/* Open / Closed badge */
.ce-lp-status {
	margin-top: 6px;
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
}

.ce-lp-status::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 6px;
}

.ce-lp-status.is-open {
	color: #1a7f37;
}

.ce-lp-status.is-open::before {
	background: #1a7f37;
}

.ce-lp-status.is-closed {
	color: #b32d2e;
}

.ce-lp-status.is-closed::before {
	background: #b32d2e;
}

/* =========================================================
   RIGHT PANEL (Map)
   ========================================================= */

/* Right panel (map) */
.ce-lp-store-locator__map {
	flex: 1 1 66.666%;
	position: relative;
	border-radius: 6px;
	border: 1px solid #e5e5e5;
	overflow: hidden;
}

/* Leaflet must fill parent */
.ce-lp-store-locator__map .leaflet-container {
	position: absolute;
	inset: 0; /* top:0 right:0 bottom:0 left:0 */
	width: 100%;
	height: 100%;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
	.ce-lp-store-locator {
		flex-direction: column;
	}

	.ce-lp-store-locator__map {
		order: 1;
		height: 300px;
		min-height: 300px;
	}

	.ce-lp-store-locator__list {
		order: 2;
		max-height: none;
	}
}

/* =========================================================
   Use My Location Button + Distance
   ========================================================= */

.ce-lp-use-location {
	margin-bottom: 12px;
}

.ce-lp-use-location button {
	width: 100%;
	padding: 10px 12px;
	border-radius: 4px;
	border: 1px solid #2271b1;
	background: #2271b1;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
}

.ce-lp-use-location button:hover {
	background: #1d5f99;
}

.ce-lp-distance {
	margin-top: 4px;
	font-size: 12px;
	color: #333;
	font-weight: 500;
}

/* Controls */
.ce-lp-controls {
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
	margin-bottom: 10px;
}

.ce-lp-control-row {
	display: flex;
	gap: 10px;
	margin: 10px 0;
	flex-wrap: wrap;
}

.ce-lp-btn {
	flex: 1 1 100%;
	padding: 10px 12px;
	border-radius: 6px;
	border: 1px solid #2271b1;
	background: #2271b1;
	color: #fff;
	font-size: 14px;
	cursor: pointer;
	font-weight: 600;
}

.ce-lp-btn:hover {
	background: #1d5f99;
}

.ce-lp-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #333;
}

.ce-lp-control-row select {
	flex: 1 1 calc(50% - 10px);
	min-width: 150px;
	padding: 10px 12px;
	border-radius: 4px;
	border: 1px solid #ccc;
	font-size: 14px;
}

/* Distance line */
.ce-lp-distance {
	margin-top: 4px;
	font-size: 12px;
	color: #333;
	font-weight: 500;
}

/* Pickup badge */
.ce-lp-pickup-badge {
	margin-top: 6px;
	font-size: 12px;
	font-weight: 600;
	display: inline-block;
	padding: 4px 8px;
	border-radius: 999px;
}

.ce-lp-pickup-badge.is-available {
	background: #e8f5ec;
	color: #1a7f37;
}

.ce-lp-pickup-badge.is-unavailable {
	background: #fbeaea;
	color: #b32d2e;
}

/* Empty state */
.ce-lp-empty-state {
	padding: 20px;
	text-align: center;
	font-size: 14px;
	color: #666;
	border: 1px dashed #ccc;
	border-radius: 6px;
	margin-bottom: 12px;
}

/* Reset button */
.ce-lp-btn.is-secondary {
	background: #f6f7f7;
	color: #2271b1;
	border-color: #c3c4c7;
}

.ce-lp-btn.is-secondary:hover {
	background: #f0f0f1;
}

.ce-lp-select-store {
	margin-top: 8px;
	width: 100%;
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid #2271b1;
	background: #2271b1;
	color: #fff;
	font-size: 13px;
	cursor: pointer;
	font-weight: 600;
}

.ce-lp-select-store:hover {
	background: #1d5f99;
}

#ce-lp-map {
  min-height: 520px;
  width: 100%;
}

.maplibregl-marker.is-active {
	transform: scale(1.25);
	z-index: 10;
}

