body, html {
	margin: 0;
	padding: 0;
	height: 100vh;
	overflow: hidden;
	font-family: "segoe-ui", Tahoma, Geneva, Verdana, sans-serif;
}

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

/* Sposta i controlli zoom a destra */
.leaflet-control-zoom {
	margin-right: 10px !important;
	margin-left: 0 !important;
}

.leaflet-left {
	left: auto !important;
	right: 0 !important;
}

.leaflet-top.leaflet-left {
	top: 20px;
}

.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	width: 350px;
	height: 100vh;
	background: white;
	box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	overflow-y: auto;
	transition: transform 0.3s ease;
}

.sidebar.collapsed {
	transform: translateX(-350px);
}

.sidebar-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 20px;
	position: sticky;
	top: 0;
	z-index: 10;
}

.sidebar-header h1 {
	font-size: 1.5rem;
	margin: 0;
	font-weight: 600;
}

.sidebar-header p {
	margin: 5px 0 0 0;
	font-size: 0.9rem;
	opacity: 0.9;
}

.filter-section {
	padding: 20px;
	border-bottom: 1px solid #e0e0e0;
}

.language-selector {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
	justify-content: flex-start;
	align-items: center;
}

.lang-btn {
	background: white;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 5px 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.2rem;
	opacity: 0.5;
	display: flex;
	align-items: center;
	justify-content: center;
}

.lang-btn:hover {
	opacity: 0.8;
	transform: scale(1.1);
}

.lang-btn.active {
	opacity: 1;
	border-color: #667eea;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.lang-switch-btn {
	background: white;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 5px 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.2rem;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.7;
}

.lang-switch-btn:hover {
	opacity: 1;
	border-color: #667eea;
	transform: scale(1.1);
}

.lang-switch-btn img {
	display: block;
}

.info-btn {
	background: white;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 5px 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.2rem;
	color: #0984e3;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.7;
}

.info-btn:hover {
	opacity: 1;
	border-color: #0984e3;
	transform: scale(1.1);
	color: #0984e3;
}

.filter-toggle-btn {
	background: white;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	padding: 5px 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.2rem;
	color: #667eea;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.7;
}

.filter-toggle-btn:hover {
	opacity: 1;
	border-color: #667eea;
	transform: scale(1.1);
}

.filter-toggle-btn.active {
	opacity: 1;
	border-color: #667eea;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.add-distributor-btn {
	background: white;
	border: 2px solid #27ae60;
	border-radius: 8px;
	padding: 5px 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 1.2rem;
	color: #27ae60;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.add-distributor-btn:hover {
	background: #27ae60;
	color: white;
	transform: scale(1.1);
}

.filter-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #667eea;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 2px solid #e0e0e0;
}

.filter-content {
	max-height: 500px;
	overflow-y: auto;
	transition: max-height 0.3s ease;
	margin-top: 15px;
}

.filter-content.collapsed {
	max-height: 0;
	overflow: hidden;
	margin-top: 0;
}

.filter-group {
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #f0f0f0;
}

.filter-group:last-child {
	border-bottom: none;
}

.filter-category {
	font-weight: 600;
	font-size: 0.95rem;
	color: #667eea;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.filter-checkbox {
	display: flex;
	align-items: center;
	padding: 6px 10px;
	cursor: pointer;
	border-radius: 6px;
	transition: all 0.2s ease;
	font-size: 0.9rem;
	margin-bottom: 5px;
}

.filter-checkbox:hover {
	background: #f8f9fa;
}

.filter-checkbox input[type="checkbox"] {
	margin-right: 10px;
	cursor: pointer;
	width: 18px;
	height: 18px;
	accent-color: #667eea;
}

.filter-section h5 {
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	color: #333;
}

.filter-chip {
	display: inline-block;
	padding: 8px 15px;
	margin: 5px;
	border-radius: 20px;
	border: 2px solid #667eea;
	background: white;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.9rem;
}

.filter-chip:hover {
	background: #f0f0f0;
}

.filter-chip.active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border-color: #667eea;
}

.filter-chip i {
	margin-right: 5px;
}

.opening-hours {
	font-size: 0.8rem;
	color: #e17055;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 5px;
}

.venue {
	font-size: 0.8rem;
	color: #0984e3;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 5px;
}

.popup-venue {
	font-size: 0.85rem;
	color: #0984e3;
	margin: 5px 0;
	display: flex;
	align-items: center;
	gap: 5px;
}

.distributor-list {
	padding: 15px;
}

.distributor-card {
	background: white;
	border-radius: 10px;
	padding: 15px;
	margin-bottom: 12px;
	border: 1px solid #e0e0e0;
	cursor: pointer;
	transition: all 0.3s ease;
}

.distributor-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.distributor-card .name {
	font-weight: 600;
	font-size: 1rem;
	color: #333;
	margin-bottom: 5px;
}

.distributor-card .address {
	font-size: 0.85rem;
	color: #666;
	margin-bottom: 8px;
}

.distributor-card .type-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 500;
}

/* Farmacia / Sanitaria - Verde (invertito) */
.type-badge[class*="pharmacy"] {
	background: #57b05a;
	color: #ffffff;
}

/* Cibi e Bevande - Azzurro (invertito) */
.type-badge[class*="food"] {
	background: #4a90e2;
	color: #ffffff;
}

/* Tabacchi - Grigio (invertito) */
.type-badge[class*="tobacco"] {
	background: #636e72;
	color: #ffffff;
}

/* Servizi - Arancione (invertito) */
.type-badge[class*="service"] {
	background: #e17055;
	color: #ffffff;
}

/* Prodotti per adulti - Rosa (invertito) */
.type-badge[class*="adult"] {
	background: #d63031;
	color: #ffffff;
}

.type-altro {
	background: #dfe6e9;
	color: #2d3436;
}

.toggle-sidebar {
	position: fixed;
	left: 360px;
	top: 20px;
	z-index: 1001;
	background: white;
	border: none;
	border-radius: 50%;
	width: 45px;
	height: 45px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
}

.toggle-sidebar:hover {
	background: #667eea;
	color: white;
}

.sidebar.collapsed+.toggle-sidebar {
	left: 10px;
}

.geolocation-btn {
	position: fixed;
	right: 20px;
	bottom: 80px;
	z-index: 1001;
	background: white;
	border: none;
	border-radius: 50%;
	width: 45px;
	height: 45px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
}

.geolocation-btn:hover {
	background: #667eea;
	color: white;
	transform: scale(1.1);
}

.geolocation-btn.active {
	background: #27ae60;
	color: white;
}

.leaflet-popup-content {
	margin: 15px;
	min-width: 200px;
}

.popup-title {
	font-weight: 600;
	font-size: 1.1rem;
	margin-bottom: 8px;
	color: #333;
}

.popup-address {
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 8px;
}

.popup-hours {
	font-size: 0.85rem;
	color: #27ae60;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 5px;
}

@media (max-width: 768px) {
	.sidebar {
		padding-bottom: 100px;
		width: 100%;
		max-width: 350px;
	}

	.sidebar-header h1 {
		padding-left: 50px;
		margin-bottom: 20px;
		padding-top: 7px;
	}

	.sidebar-header h1 i {
		display: none;
	}

	.toggle-sidebar {
		left: 10px;
	}

	.sidebar.collapsed+.toggle-sidebar {
		left: 10px;
	}
}

/** font leaflet */
.leaflet-container {
	font-family: "segoe-ui", Tahoma, Geneva, Verdana, sans-serif;
}