.fms-section {
	padding: 20px 20px;
	font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
	box-sizing: border-box;
}

.fms-header {
	text-align: center;
	margin-bottom: 40px;
}

.fms-heading {
	font-size: 36px;
	font-weight: 700;
	color: #111827;
	line-height: 1.2;
	margin: 0 0 12px;
	letter-spacing: -0.5px;
}

.fms-accent {
	color: #DC2626;
}

.fms-subtext {
	font-size: 16px;
	color: #6B7280;
	max-width: 500px;
	margin: 0 auto;
	line-height: 1.6;
}

.fms-map-wrap {
	position: relative;
	max-width: 900px;
	margin: 0 auto;
}

.fms-svg {
	width: 100%;
	height: auto;
	display: block;
}

.fms-svg .fms-state {
	cursor: default;
	transition: fill 0.15s ease;
	stroke: #ffffff;
	stroke-width: 0.5;
	stroke-linejoin: round;
}

.fms-svg .fms-state.fms-active {
	cursor: pointer;
	fill: #DC2626;
}

.fms-svg .fms-state.fms-active:hover,
.fms-svg .fms-state.fms-active.fms-hovered {
	fill: #B91C1C;
}

.fms-svg .fms-state.fms-inactive {
	fill: #E5E7EB;
}

.fms-marker {
	fill: rgba(255, 255, 255, 0.92);
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.fms-marker.fms-pulse {
	animation: fmsPulse 1.4s ease-in-out infinite;
	transform-box: fill-box;
	transform-origin: center;
}

@keyframes fmsPulse {
	0%   { opacity: 0.9;  transform: scale(1);   }
	50%  { opacity: 0.35; transform: scale(1.7); }
	100% { opacity: 0.9;  transform: scale(1);   }
}

.fms-tooltip {
	position: absolute;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
	padding: 8px 14px;
	pointer-events: none;
	font-size: 14px;
	font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
	white-space: nowrap;
	z-index: 100;
	transform: translate(-50%, calc(-100% - 10px));
	transition: opacity 0.12s ease;
}

.fms-tooltip-name {
	font-weight: 600;
	color: #111827;
}

.fms-tooltip-count {
	color: #6B7280;
	font-size: 13px;
	margin-top: 2px;
}

.fms-hint {
	text-align: center;
	font-size: 10px;
	color: #9CA3AF;
	margin: 16px 0 0;
	font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

.fms-detail-panel {
	max-width: 420px;
	margin: 24px auto 0;
	background: #ffffff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
	padding: 0;
	overflow: hidden;
	font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

.fms-panel-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 16px 16px 12px;
	border-bottom: 1px solid #F3F4F6;
}

.fms-panel-title-wrap {
	flex: 1;
	min-width: 0;
}

.fms-panel-title {
	font-size: 14px;
	font-weight: 700;
	color: #111827;
	margin: 0;
	line-height: 1.3;
}

.fms-panel-broker {
	font-weight: 400;
	color: #9CA3AF;
}

.fms-panel-count {
	font-size: 10px;
	color: #9CA3AF;
	margin: 2px 0 0;
}

.fms-panel-close {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	color: #9CA3AF;
	padding: 0 0 0 12px;
	flex-shrink: 0;
	transition: color 0.15s ease;
}

button.fms-panel-close:hover,
button.fms-panel-close:focus {
	background-color: transparent;
	color: #374151;
}

.fms-market-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fms-market-item {
	border-bottom: 1px solid #F3F4F6;
}

.fms-market-item:last-child {
	border-bottom: none;
}

.fms-market-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 16px;
	background-color: transparent;
	background-image: none;
	border: none;
	border-radius: 0;
	margin: 0;
	box-shadow: none;
	text-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #111827;
	transition: background-color 0.15s ease;
}

/* Guard against theme global button styles turning text white on hover/focus */
.fms-market-btn:hover,
.fms-market-btn:focus,
.fms-market-btn:focus-visible,
.fms-market-btn:active {
	background-color: #F9FAFB;
	background-image: none;
	color: #111827;
	box-shadow: none;
	outline: none;
}

.fms-market-btn:hover .fms-market-label,
.fms-market-btn:focus .fms-market-label,
.fms-market-btn .fms-market-label > span {
	color: #111827;
}

.fms-market-label {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: #111827;
}

.fms-market-pin {
	color: #EF4444;
	flex-shrink: 0;
}

.fms-market-chevron {
	color: #9CA3AF;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.fms-market-item.fms-open .fms-market-chevron {
	transform: rotate(180deg);
}

.fms-market-dd {
	display: none;
	padding: 4px 16px 10px 36px;
	background: #F9FAFB;
	font-size: 12px;
	color: #4B5563;
}

.fms-market-dd.fms-market-dd-empty {
	color: #9CA3AF;
	font-style: italic;
}

.fms-market-item.fms-open .fms-market-dd {
	display: block;
}

.fms-state-list {
	text-align: center;
	font-size: 12px;
	color: #9CA3AF;
	margin-top: 32px;
	line-height: 2;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
	font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

.fms-state-list-note {
	display: block;
	font-size: 11px;
	color: #d1d5db;
	font-style: italic;
	margin-top: 8px;
}

@media (max-width: 768px) {
	.fms-section {
		padding: 0px 16px;
	}

	.fms-heading {
		font-size: 26px;
	}

	.fms-subtext {
		font-size: 15px;
	}
}

@media (max-width: 640px) {
	.fms-heading {
		font-size: 22px;
	}

	.fms-detail-panel {
		margin-top: 16px;
	}

	.fms-panel-title {
		font-size: 14px;
	}
}
