/**
 * Store Locator Styles
 */

.store-locator-container {
	display: flex;
	gap: 20px;
	margin: 20px 0;
	min-height: 600px;
}

.store-locator-sidebar {
	flex: 0 0 350px;
	display: flex;
	flex-direction: column;
	padding: 20px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	max-height: 600px;
}

.store-locator-sidebar h3 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 1.5em;
	color: #333;
	flex-shrink: 0;
}

.store-locator-list-wrapper {
	flex: 1;
	overflow-y: auto;
	margin: 0 -20px;
	padding: 0 20px;
}

.find-nearest-btn {
	width: 100%;
	padding: 12px 20px;
	margin-bottom: 15px;
	background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
	flex-shrink: 0;
}

.find-nearest-btn:hover {
	background: linear-gradient(135deg, #005a87 0%, #004666 100%);
	box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
	transform: translateY(-1px);
}

.find-nearest-btn:active {
	transform: translateY(0);
}

.find-nearest-btn svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.find-nearest-btn.loading {
	opacity: 0.7;
	cursor: wait;
}

.find-nearest-btn.loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.store-locator-filters {
	margin-bottom: 15px;
	flex-shrink: 0;
}

.category-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
	max-height: 80px;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.category-filters.expanded {
	max-height: none;
}

.category-pill {
	padding: 8px 16px;
	background: #fff;
	border: 2px solid #ddd;
	border-radius: 20px;
	font-size: 0.9em;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
	color: #555;
	font-weight: 500;
}

.category-pill:hover {
	border-color: #0073aa;
	background: #f0f8ff;
	color: #0073aa;
}

.category-pill.active {
	background: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

.show-more-categories {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	background: transparent;
	border: none;
	color: #0073aa;
	font-size: 0.85em;
	cursor: pointer;
	font-weight: 500;
	transition: color 0.2s ease;
}

.show-more-categories:hover {
	color: #005a87;
}

.show-more-categories svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	transition: transform 0.3s ease;
}

.show-more-categories.expanded svg {
	transform: rotate(180deg);
}

.store-locator-search {
	position: relative;
	margin-bottom: 15px;
	flex-shrink: 0;
}

.store-search-input {
	width: 100%;
	padding: 12px 45px 12px 40px;
	border: 2px solid #ddd;
	border-radius: 6px;
	font-size: 0.95em;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.store-search-input:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.store-locator-search .search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.store-locator-search .search-icon svg {
	width: 18px;
	height: 18px;
	fill: #999;
}

.store-locator-search .clear-search {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 4px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.store-locator-search .clear-search:hover {
	background: #f0f0f0;
}

.store-locator-search .clear-search svg {
	width: 18px;
	height: 18px;
	fill: #666;
}

.search-results-count {
	margin-bottom: 10px;
	font-size: 0.9em;
	color: #666;
	font-weight: 500;
	flex-shrink: 0;
}

.no-results-message {
	text-align: center;
	padding: 40px 20px;
	color: #999;
	flex-shrink: 0;
}

.no-results-message svg {
	width: 48px;
	height: 48px;
	fill: #ccc;
	margin-bottom: 10px;
}

.no-results-message p {
	margin: 0;
	font-size: 1em;
	color: #666;
}

.store-locator-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.store-location-item {
	padding: 15px;
	margin-bottom: 15px;
	background: #fff;
	border: 2px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: block;
}

.store-location-item.hidden {
	display: none;
}

.store-location-item:hover {
	border-color: #0073aa;
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.store-location-item.active {
	border-color: #0073aa;
	background: #e7f5fe;
	box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.store-location-item h4 {
	margin: 0 0 10px 0;
	font-size: 1.2em;
	color: #0073aa;
}

.location-distance {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	background: #fff3cd;
	color: #856404;
	border-radius: 20px;
	font-size: 0.85em;
	font-weight: 600;
	margin-bottom: 10px;
	border: 1px solid #ffeaa7;
}

.location-distance svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.store-location-item.nearest {
	border-color: #28a745;
	background: #f0fff4;
	box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.store-location-item.nearest .location-distance {
	background: #d4edda;
	color: #155724;
	border-color: #c3e6cb;
}

.location-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.location-category-badge {
	display: inline-block;
	padding: 4px 10px;
	background: #e7f5fe;
	color: #0073aa;
	border-radius: 12px;
	font-size: 0.8em;
	font-weight: 500;
}

.location-address,
.location-phone {
	margin: 5px 0;
	color: #666;
	font-size: 0.95em;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	line-height: 1.5;
}

.location-address svg,
.location-phone svg {
	width: 16px;
	height: 16px;
	fill: #0073aa;
	flex-shrink: 0;
	margin-top: 2px;
}

.location-phone a {
	color: #0073aa;
	text-decoration: none;
	font-weight: 500;
}

.location-phone a:hover {
	text-decoration: underline;
}

.location-content {
	margin-top: 10px;
	font-size: 0.9em;
	color: #555;
}

.store-locator-map-container {
	flex: 1;
	position: relative;
	min-height: 600px;
}

#store-locator-map {
	width: 100%;
	height: 100%;
	min-height: 600px;
	border: 1px solid #ddd;
	border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.store-locator-container {
		flex-direction: column;
	}

	.store-locator-sidebar {
		flex: 1;
		max-height: 400px;
	}

	.store-locator-map-container {
		min-height: 400px;
	}

	#store-locator-map {
		min-height: 400px;
	}
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
	border-radius: 8px;
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
	margin: 15px;
	min-width: 200px;
}

.store-locator-popup .popup-title {
	margin: 0 0 12px 0;
	color: #0073aa;
	font-size: 1.1em;
	font-weight: 600;
	border-bottom: 2px solid #0073aa;
	padding-bottom: 8px;
}

.store-locator-popup .popup-address,
.store-locator-popup .popup-phone,
.store-locator-popup .popup-directions {
	margin: 8px 0;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.9em;
	color: #555;
	line-height: 1.5;
}

.store-locator-popup svg {
	width: 16px;
	height: 16px;
	fill: #0073aa;
	flex-shrink: 0;
	margin-top: 2px;
}

.store-locator-popup .popup-phone a,
.store-locator-popup .popup-directions a {
	color: #0073aa;
	text-decoration: none;
	font-weight: 500;
	display: flex;
	align-items: flex-start;
	gap: 6px;
}

.store-locator-popup .popup-phone a:hover,
.store-locator-popup .popup-directions a:hover {
	text-decoration: underline;
}

.store-locator-popup .popup-content {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #e0e0e0;
	font-size: 0.85em;
	color: #666;
	line-height: 1.5;
}

.store-locator-popup .popup-directions {
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid #e0e0e0;
}

.store-locator-popup .popup-directions a {
	font-weight: 600;
}

/* Custom scrollbar styling for the list wrapper */
.store-locator-list-wrapper::-webkit-scrollbar {
	width: 8px;
}

.store-locator-list-wrapper::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.store-locator-list-wrapper::-webkit-scrollbar-thumb {
	background: #c1c1c1;
	border-radius: 4px;
}

.store-locator-list-wrapper::-webkit-scrollbar-thumb:hover {
	background: #a8a8a8;
}

/* Firefox scrollbar styling */
.store-locator-list-wrapper {
	scrollbar-width: thin;
	scrollbar-color: #c1c1c1 #f1f1f1;
}
