/**
 * Global Impact Map - Custom Styles
 */

/* Wrapper when moved to top of main content (frontend index/issue/article) */
.global-impact-map-frontend-wrapper {
	margin-bottom: 1.5rem;
}

.global-impact-map-container {
	margin: 40px 0;
	padding: 30px;
	background: #f8f9fa;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.global-impact-map-header {
	text-align: center;
	margin-bottom: 20px;
}

.global-impact-map-header h2 {
	color: #2c3e50;
	font-size: 28px;
	margin-bottom: 10px;
}

.global-impact-map-header .description {
	color: #6c757d;
	font-size: 16px;
	max-width: 800px;
	margin: 0 auto;
}

#global-impact-map {
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	overflow: hidden;
}

/* Legend */
.global-impact-map-legend {
	display: flex;
	justify-content: center;
	gap: 30px;
	margin-top: 15px;
	padding: 15px;
	background: white;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
}

.legend-icon {
	font-size: 20px;
}

.legend-label {
	color: #495057;
	font-size: 14px;
}

/* Statistics */
.global-impact-map-stats {
	display: flex;
	justify-content: center;
	gap: 40px;
	margin-top: 20px;
	padding: 20px;
	background: white;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-item {
	text-align: center;
}

.stat-value {
	display: block;
	font-size: 32px;
	font-weight: bold;
	color: #007bff;
	margin-bottom: 5px;
}

.stat-label {
	display: block;
	font-size: 14px;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Popup Styles */
.leaflet-popup-content {
	margin: 10px;
	min-width: 180px;
}

.visitor-popup h4,
.reader-popup h4 {
	margin: 0 0 10px 0;
	color: #2c3e50;
	font-size: 16px;
	border-bottom: 2px solid #007bff;
	padding-bottom: 5px;
}

.visitor-popup p {
	margin: 0;
	color: #495057;
	font-size: 14px;
}

.reader-popup .metric-row {
	display: flex;
	justify-content: space-between;
	padding: 5px 0;
	font-size: 14px;
}

.reader-popup .metric-label {
	color: #6c757d;
	font-weight: 500;
}

.reader-popup .metric-value {
	color: #007bff;
	font-weight: bold;
}

/* Marker Styles */
.visitor-location-marker,
.reader-location-marker {
	cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
	.global-impact-map-container {
		padding: 15px;
		margin: 20px 0;
	}

	.global-impact-map-header h2 {
		font-size: 22px;
	}

	.global-impact-map-stats {
		flex-direction: column;
		gap: 15px;
	}

	.global-impact-map-legend {
		flex-direction: column;
		gap: 10px;
	}

	#global-impact-map {
		height: 400px !important;
	}
}

/* Loading State */
.map-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 500px;
	background: #f8f9fa;
	border-radius: 8px;
}

.map-loading::after {
	content: 'Loading map...';
	color: #6c757d;
	font-size: 16px;
}

/* Error State */
.map-error {
	padding: 20px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 6px;
	color: #856404;
	text-align: center;
}
