/* Store Map Styles */
.store-map-container {
	display: grid;
	grid-template-columns: 1fr 600px;
	gap: 0;
	height: 600px;
	max-width: 1300px;
	margin: 20px auto;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	background: white;
}

/* Map Section */
.map-section {
	position: relative;
	background: #f8f9fa;
}

#store-map {
	width: 100%;
	height: 100%;
	z-index: 1;
}

/* Leaflet Layer Control Styling */
.leaflet-control-layers {
	background: rgba(255, 255, 255, 0.95) !important;
	backdrop-filter: blur(10px);
	border-radius: 12px !important;
	border: 1px solid rgba(255, 107, 53, 0.2) !important;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
	padding: 8px !important;
	min-width: 130px;
}
a.store-view {
	padding: 8px 15px;
	background: #E73920;
	border-radius: 38px;
	color: #fff;
}
.store-btn a {
	font-size: 12px;
}
a.store-buy {
	padding: 8px 15px;
	background: #000249;
	border-radius: 38px;
	color: #fff;
}
.store-btn {
	display: flex
		;
	align-items: center;
	gap: 10px;
}
.leaflet-control-layers-expanded {
	padding: 10px 12px !important;
}

.leaflet-control-layers-base {
	margin-bottom: 5px;
}

.leaflet-control-layers-base label {
	display: flex;
	align-items: center;
	padding: 6px 8px;
	margin: 2px 0;
	border-radius: 8px;
	transition: all 0.2s;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	color: #333;
}

.leaflet-control-layers-base label:hover {
	background: rgba(255, 107, 53, 0.1);
	color: #ff6b35;
}

.leaflet-control-layers-base input[type="radio"] {
	margin-right: 8px;
	accent-color: #ff6b35;
}

.leaflet-control-layers-base input[type="radio"]:checked+span {
	color: #ff6b35;
	font-weight: 600;
}

.leaflet-control-layers-toggle {
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="%23ff6b35" viewBox="0 0 24 24"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>') !important;
	background-size: 16px 16px !important;
	width: 36px !important;
	height: 36px !important;
	border-radius: 8px !important;
	background-color: rgba(255, 255, 255, 0.95) !important;
	border: 1px solid rgba(255, 107, 53, 0.2) !important;
}

/* Map Controls - Removed, now in sidebar */

/* Stores Sidebar */
.store-map-container .stores-sidebar {
	background-color: #E73920;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
	border-radius: 6px;
}

.store-map-container .stores-sidebar::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100%;
	background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="white" opacity="0.1"/><circle cx="80" cy="80" r="1.5" fill="white" opacity="0.1"/><circle cx="60" cy="30" r="1" fill="white" opacity="0.1"/></svg>');
	pointer-events: none;
}

.store-map-container .sidebar-header {
	padding: 10px 10px 0 10px;
	margin-bottom: 10px;
}

.store-map-container .sidebar-header h3 {
	color: white;
	margin: 0 0 15px 0;
	font-size: 18px;
	font-weight: 700;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Sidebar Controls */
.store-map-container .sidebar-controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.my-store-map-widget .sidebar-search-wrapper {
	position: relative;
	display: flex;
}

.my-store-map-widget .sidebar-search-input {
	width: 100%;
	padding: 2px 10px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	background: transparent;
	outline: none;
	height: 42px;
	color: #000000;
	box-shadow: none;
	background-color: #ffffff;
	margin-bottom: 0;
}

.sidebar-search-input::placeholder {
	color: #6F6F6F;
}

.sidebar-search-btn {
	position: absolute;
	right: 5px;
	margin: 0;
}

.sidebar-search-btn:hover {
	background: #e55a2b;
	transform: scale(1.05);
}

.sidebar-filters {
	display: flex;
	gap: 8px;
}

.my-store-map-widget .sidebar-select {
	padding: 2px 10px;
	background-color: #ffffff;
	border: none;
	box-shadow: none;
	border-radius: 6px;
	margin-bottom: 0;
}

.sidebar-select:focus {
	background: white;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stores-list-container {
	flex: 1;
	overflow-y: auto;
	padding: 5px 0 10px;
	position: relative;
	z-index: 1;
}

/* Store Items */
.my-store-map-widget .store-item:first-child {
	margin-top: 0;
}

.my-store-map-widget .store-item {
	display: flex;
	padding: 10px;
	border-bottom: none;
	cursor: pointer;
	transition: all 0.3s;
	background: white;
	margin: 10px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 2px solid transparent;
}

.my-store-map-widget .store-item:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	border-color: rgba(255, 107, 53, 0.2);
}

.my-store-map-widget .store-item.highlighted {
	border-color: #ff6b35;
	background: #fff8f5;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
}

.my-store-map-widget .store-item.selected-store {
	position: relative;
	background: linear-gradient(135deg, #fff8f5, #fff0eb) !important;
	border: 2px solid #ff6b35 !important;
	margin: 8px 10px 15px 10px !important;
	animation: slideToTop 0.3s ease-out;
}

.my-store-map-widget .store-item.selected-store::before {
	content: "📍 Được chọn";
	position: absolute;
	top: -8px;
	left: 15px;
	background: #ff6b35;
	color: white;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 10px;
	font-weight: 600;
	box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

@keyframes slideToTop {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.my-store-map-widget .store-image {
	width: 162px;
	height: 162px;
	border-radius: 10px;
	overflow: hidden;
	margin-right: 12px;
	flex-shrink: 0;
	border: 2px solid #f0f0f0;
}

.my-store-map-widget .store-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.my-store-map-widget .default-store-image {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #ff6b35, #ff8c5c);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 20px;
}

.my-store-map-widget .store-content {
	flex: 1;
	min-width: 0;
}

.my-store-map-widget .store-content h3 {
	margin: 0 0 8px 0;
	text-align:left;
	font-size: 15px;
	font-weight: 400;
	color: #2c3e50;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.my-store-map-widget .stores-list-container .store-details p {
	margin-bottom: 10px;
	font-size: 16px;
	color: #000000;
	gap: 6px;
	line-height: 1.4;
}

.my-store-map-widget .stores-list-container .store-details i {
	width: 24px;
	height: 24px;
	color: #ff6b35;
	font-size: 10px;
	margin-top: 2px;
	flex-shrink: 0;
	background-color: #E839261A;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 99%;
}

.my-store-map-widget .stores-list-container .store-address,
.my-store-map-widget .stores-list-container .store-phone,
.my-store-map-widget .stores-list-container .store-email {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin-bottom: 10px;
}

.my-store-map-widget .stores-list-container .store-address p span:nth-of-type(1),
.my-store-map-widget .stores-list-container .store-phone p span:nth-of-type(1),
.my-store-map-widget .stores-list-container .store-email p span:nth-of-type(1) {
	color: #6F6F6F;
}
/* Custom Map Markers */
.custom-marker {
	background: transparent;
	border: none;
}

.marker-pin {
	width: 20px;
	height: 30px;
	position: relative;
	color: #ff6b35;
	font-size: 10px;
	text-align: center;
	filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* User Location Marker */
.user-location-marker {
	background: transparent;
	border: none;
}

.user-marker {
	width: 20px;
	height: 20px;
	background: #4285f4;
	border: 3px solid white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 10px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Location Button */
.my-store-map-widget .location-btn {
	width: 100%;
	height: 100%;
	border: none;
	cursor: pointer;
	padding: 10px;
	font-size: 14px;
	line-height: 1.2;
	color: #333;
	transition: color 0.2s;
	padding: 13px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.my-store-map-widget .leaflet-control-custom {
	border: none !important;
	border-radius: 4px;
}

.my-store-map-widget .location-btn:hover {
	color: #ff6b35;
}

/* Store Distance */
.my-store-map-widget .store-distance {
	background: linear-gradient(135deg, #27ae60, #2ecc71);
	color: white;
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 10px;
	font-weight: 400;
	margin-left: 8px;
	box-shadow: 0 1px 3px rgba(46, 125, 50, 0.3);
	white-space: nowrap;
}

.my-store-map-widget .store-item.with-distance h3 {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.store-item.with-distance h3 .store-name {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Map Popup Styles */
.leaflet-popup-content-wrapper {
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.map-popup h4 {
	margin: 0 0 0 0;
	color: #333;
	font-size: 16px;
	font-weight: 600;
}

.map-popup .store-description {
	margin: 0 !important;
}

.popup-info p {
	margin: 5px 0;
	font-size: 13px;
	color: #666;
	display: flex;
	align-items: center;
	gap: 8px;
}

.popup-info i {
	width: 14px;
	color: #ff6b35;
}

.btn-view-details {
	background: #ff6b35;
	color: white;
	border: none;
	padding: 8px 15px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 12px;
	margin-top: 10px;
	transition: background-color 0.2s;
}

.btn-view-details:hover {
	background: #e55a2b;
}

/* No stores message */
.no-stores {
	padding: 40px 20px;
	text-align: center;
	color: white;
	font-style: italic;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.store-map-container {
		grid-template-columns: 1fr;
		height: auto;
		max-height: none;
	}

	.map-section {
		height: 400px;
		order: 1;
	}

	.stores-sidebar {
		order: 2;
		height: 600px;
	}
	.store-map-container {
		height: unset !important;
	}
}

@media (max-width: 768px) {
	.store-map-container {
		margin: 5px;
		border-radius: 8px;
	}
	.my-store-map-widget .store-item {
		flex-direction: column;
	}
	.my-store-map-widget .store-image {
		width: 100%;
		height: 120px;
		margin-right: 0;
		margin-bottom: 10px;
	}
	.my-store-map-widget .store-image img {
		object-fit: contain;
	}
	.map-section {
		height: 400px;
	}

	.stores-sidebar {
		height: 600px;
	}

	/* Layer control responsive */
	.leaflet-control-layers {
		max-width: 120px !important;
		font-size: 11px !important;
	}

	.leaflet-control-layers-base label {
		padding: 4px 6px !important;
		font-size: 11px !important;
	}

	.leaflet-control-layers-toggle {
		width: 32px !important;
		height: 32px !important;
		background-size: 14px 14px !important;
	}

	.store-item {
		padding: 12px;
		margin: 8px;
	}

	.store-image {
		width: 55px;
		height: 55px;
	}

	.store-content h3 {
		font-size: 14px;
	}

	.store-details p {
		font-size: 11px;
	}

	.sidebar-header {
		padding: 15px;
	}

	.sidebar-header h3 {
		font-size: 16px;
		margin-bottom: 12px;
	}

	.sidebar-search-input {
		padding: 8px 35px 8px 12px;
		font-size: 12px;
	}

	.sidebar-search-btn {
		padding: 5px 8px;
		font-size: 11px;
	}

	.sidebar-filters {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.sidebar-select {
		padding: 8px 10px;
		font-size: 11px;
	}

	.my-store-map-widget .store-item.selected-store::before {
		font-size: 9px;
		padding: 1px 6px;
		top: -6px;
		left: 10px;
	}
}

/* Loading Animation */
.loading-map {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 200px;
	color: #666;
	font-style: italic;
}

/* Scrollbar Styling */
.stores-list-container::-webkit-scrollbar {
	width: 4px;
}

.stores-list-container::-webkit-scrollbar-track {
	background: transparent;
}

.stores-list-container::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.4);
	border-radius: 2px;
}

.stores-list-container::-webkit-scrollbar-thumb:hover {
	background: rgba(255, 255, 255, 0.6);
}

/* No stores message */
.no-stores {
	padding: 40px 20px;
	text-align: center;
	color: rgba(255, 255, 255, 0.8);
	font-style: italic;
	font-size: 14px;
}