#timeSeriesChart {
	width: 100%;
	height: 800px;
}

.disaster-type-toggle {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
	justify-content: center;
}

.disaster-type-toggle label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: #f5f5f5;
	border: 2px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
}

.disaster-type-toggle input[type="checkbox"] {
	margin: 0;
}

.disaster-type-toggle input[type="checkbox"]:checked + span {
	font-weight: 600;
}

.disaster-type-toggle label.selected {
	background: #e6f2fd;
	border-color: #2a5298;
}

.disaster-color-marker {
	width: 16px;
	height: 16px;
	border-radius: 3px;
	display: inline-block;
	margin-right: 0.25rem;
	border: 1px solid rgba(0,0,0,0.1);
}

.cost-range-filter {
	margin-bottom: 1rem;
	padding: 1rem;
	background: #f5f5f5;
	border-radius: 4px;
}

.cost-range-filter label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #333;
}

.cost-range-slider {
	width: 100%;
	margin: 0.5rem 0;
}

.cost-range-values {
	display: flex;
	justify-content: space-between;
	font-size: 0.9rem;
	color: #666;
}

/* CPI Tooltip Styling */
.cpi-label-container {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	color: #555;
	margin-bottom: 0.5rem;
}

.info-tooltip {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: help;
}

.info-tooltip .info-icon {
	width: 16px;
	height: 16px;
	color: #2a5298;
	transition: color 0.2s;
}

.info-tooltip:hover .info-icon {
	color: #1e3c72;
}

.info-tooltip .tooltip-text {
	visibility: hidden;
	opacity: 0;
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%);
	width: 280px;
	background: #1e3c72;
	color: white;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 400;
	line-height: 1.5;
	text-align: left;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	z-index: 1000;
	transition: opacity 0.2s, visibility 0.2s;
}

.info-tooltip .tooltip-text::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 8px solid transparent;
	border-top-color: #1e3c72;
}

.info-tooltip:hover .tooltip-text {
	visibility: visible;
	opacity: 1;
}

/* Toggle Switch Styling */
.toggle-switch {
	position: relative;
	display: inline-block;
	width: 120px;
	height: 40px;
	cursor: pointer;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	border-radius: 40px;
	transition: 0.3s;
	display: flex;
	align-items: center;
	padding: 0 8px;
}

.toggle-slider::before {
	content: "";
	position: absolute;
	height: 32px;
	width: 32px;
	left: 4px;
	bottom: 4px;
	background-color: white;
	border-radius: 50%;
	transition: 0.3s;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
	background-color: #2a5298;
}

.toggle-switch input:checked + .toggle-slider::before {
	transform: translateX(80px);
}

.toggle-text {
	display: none;
}

/* Brain icon for AI insights */
.chart-insights-button {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 40px;
	height: 40px;
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
	z-index: 10;
}

.chart-insights-button:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(42, 82, 152, 0.4);
}

.chart-insights-button:active {
	transform: scale(0.95);
}

.chart-insights-button svg {
	width: 24px;
	height: 24px;
	fill: white;
}

.chart-container-wrapper {
	position: relative;
}

/* AI Insights Section */
.ai-insights-section {
	margin-top: 2rem;
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	display: none;
}

.ai-insights-section.visible {
	display: block;
}

.ai-insights-header {
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	color: white;
	padding: 1rem 1.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.ai-insights-header h3 {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ai-insights-header h3 svg {
	width: 24px;
	height: 24px;
	fill: white;
}

.ai-insights-close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	transition: background 0.2s;
}

.ai-insights-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.ai-insights-content {
	padding: 1.5rem 2rem;
	line-height: 1.7;
	color: #333;
}

.ai-insights-content h4 {
	color: #1e3c72;
	font-size: 1.1rem;
	margin: 1.5rem 0 0.75rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #e8f0fe;
}

.ai-insights-content h4:first-child {
	margin-top: 0;
}

.ai-insights-content p {
	margin: 0.75rem 0;
}

.ai-insights-content ul, 
.ai-insights-content ol {
	margin: 0.75rem 0;
	padding-left: 1.5rem;
}

.ai-insights-content li {
	margin: 0.5rem 0;
}

.ai-insights-content strong {
	color: #1e3c72;
}

.ai-insights-content .highlight-stat {
	background: #e8f0fe;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	font-weight: 600;
	color: #1e3c72;
}

.ai-insights-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem;
	color: #666;
}

.ai-insights-loading .spinner {
	width: 40px;
	height: 40px;
	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); }
}

.ai-insights-error {
	text-align: center;
	padding: 2rem;
	color: #666;
}

.ai-insights-error p {
	margin-bottom: 1rem;
}

.ai-insights-error .btn {
	padding: 0.5rem 1.5rem;
}

/* Data 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;
}