.map-container {
	position: relative;
	max-width: 95%;
	margin: 0 auto 2rem auto;
	background: white;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	overflow: hidden;
}

#map {
	width: 100%;
	height: 600px;
	position: relative;
}

/* Loading Overlay */
.loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.95);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.loading-spinner {
	width: 50px;
	height: 50px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2a5298;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 1rem;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.loading-text {
	color: #2a5298;
	font-size: 1.1rem;
	font-weight: 500;
	margin-top: 0.5rem;
}

.controls {
	background: white;
	padding: 1.5rem;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	margin-bottom: 2rem;
}

.controls h3 {
	margin-bottom: 1rem;
	color: #2a5298;
}

.control-group {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

@media (min-width: 1200px) {
	.control-group {
		grid-template-columns: repeat(5, 1fr);
	}
}

.control-item {
	display: flex;
	flex-direction: column;
}

.control-item label {
	font-weight: 500;
	margin-bottom: 0.5rem;
	color: #555;
}

.control-item select {
	padding: 0.75rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
	background: white;
}

.control-item select:focus {
	outline: none;
	border-color: #2a5298;
	box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.error {
	background: #f8d7da;
	color: #721c24;
	padding: 1rem;
	border-radius: 4px;
	margin: 1rem 0;
}

.legend {
	position: absolute;
	bottom: 20px;
	right: 20px;
	background: white;
	padding: 1rem;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
	z-index: 1000;
	min-width: 200px;
}

.legend h4 {
	margin: 0 0 0.5rem 0;
	font-size: 0.9rem;
	color: #333;
}

.legend-item {
	display: flex;
	align-items: center;
	margin-bottom: 0.25rem;
	font-size: 0.85rem;
}

.legend-color {
	width: 20px;
	height: 20px;
	border-radius: 3px;
	margin-right: 0.5rem;
	border: 1px solid #ddd;
}

/* Inset maps for Alaska and Hawaii */
.inset-map-container {
	position: absolute;
	background: white;
	border: 2px solid #2a5298;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.3);
	z-index: 2000;
	overflow: hidden;
}

.inset-map-container.alaska {
	bottom: 20px;
	left: 20px;
	width: 200px;
	height: 150px;
}

.inset-map-container.hawaii {
	bottom: 20px;
	left: 240px;
	width: 180px;
	height: 120px;
}

.inset-map-label {
	position: absolute;
	top: 5px;
	left: 5px;
	background: rgba(42, 82, 152, 0.9);
	color: white;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 0.75rem;
	font-weight: 600;
	z-index: 2001;
	pointer-events: none;
}

.inset-map {
	width: 100%;
	height: 100%;
}

/* County data table styles */
.events-table-container {
	background: white;
	padding: 1.5rem;
	border-radius: 4px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	margin-top: 2rem;
}

.events-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.events-table thead {
	background: #1e3c72;
	color: white;
}

.events-table th {
	padding: 12px 16px;
	text-align: left;
	font-weight: 600;
	font-size: 13px;
	border-bottom: 2px solid #0f2a52;
}

.events-table tbody tr {
	border-bottom: 1px solid #e0e0e0;
}

.events-table tbody tr:hover {
	background: #f5f5f5;
}

.events-table td {
	padding: 12px 16px;
	vertical-align: middle;
}

.loading {
	text-align: center;
	padding: 2rem;
	color: #666;
}

/* Map description styling */
.map-description {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-left: 4px solid #2a5298;
	padding: 1.25rem 1.5rem;
	margin: 0 0 1.5rem 0;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.map-description h3 {
	color: #2a5298;
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 0.75rem 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.map-description h3::before {
	content: "";
	width: 4px;
	height: 20px;
	background: linear-gradient(180deg, #2a5298 0%, #1e3c72 100%);
	border-radius: 2px;
	flex-shrink: 0;
}

.map-description p {
	color: #495057;
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 0 0 0.5rem 0;
}

.map-description p:last-child {
	margin-bottom: 0;
}

.map-description strong {
	color: #2a5298;
	font-weight: 600;
}

/* Interactive tooltip styling */
.interactive-tooltip {
	background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
	color: white;
	padding: 0.875rem 1.25rem;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(42, 82, 152, 0.25);
	margin: 0 0 1.25rem 0;
	display: flex;
	align-items: center;
	gap: 0.875rem;
	position: relative;
	overflow: hidden;
}

.interactive-tooltip::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, 
		rgba(255, 255, 255, 0) 0%, 
		rgba(255, 255, 255, 0.1) 50%, 
		rgba(255, 255, 255, 0) 100%);
	animation: shimmer 3s infinite;
}

@keyframes shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}

.interactive-tooltip-icon {
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	animation: pulse-ring 2s ease-in-out infinite;
}

.interactive-tooltip-icon::before {
	content: "";
	width: 16px;
	height: 16px;
	background: white;
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes pulse-ring {
	0%, 100% { 
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
	}
	50% { 
		box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
	}
}

.interactive-tooltip-content {
	position: relative;
	z-index: 1;
}

.interactive-tooltip-content p {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.4;
}

.interactive-tooltip-content strong {
	font-weight: 700;
	color: #ffd700;
}