.terragua-map {
	--terragua-red: #b30000;
	--terragua-red-dark: #8b1e1e;
	--terragua-navy: #0d2e5f;
	--terragua-muted: #6c7788;
	--terragua-line: #e5e8ec;
	box-sizing: border-box;
	max-width: 1280px;
	margin: 0 auto;
	padding: 32px 20px 24px;
	background: #fff;
	color: var(--terragua-navy);
	font-family: inherit;
}

.terragua-map *,
.terragua-map *::before,
.terragua-map *::after {
	box-sizing: border-box;
}

.terragua-map__header {
	margin: 0 auto 22px;
	text-align: center;
}

.terragua-map__title {
	margin: 0;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.025em;
	line-height: 1.08;
}

.terragua-map__subtitle {
	margin: 9px 0 0;
	color: var(--terragua-muted);
	font-size: clamp(14px, 1.25vw, 18px);
	line-height: 1.5;
}

.terragua-map__stage {
	position: relative;
	width: 100%;
	transition: min-height 180ms ease;
}

.terragua-map__scroll {
	width: 100%;
	overflow: visible;
}

.terragua-map__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.terragua-map__region {
	fill: #fff;
	stroke: var(--terragua-red);
	stroke-width: 1.1px;
	vector-effect: non-scaling-stroke;
	cursor: pointer;
	transition: fill 150ms ease, filter 150ms ease, opacity 150ms ease;
}

.terragua-map__region:hover,
.terragua-map__region:focus-visible {
	fill: #f8dada;
	filter: drop-shadow(0 2px 2px rgba(179, 0, 0, 0.18));
	outline: none;
}

.terragua-map__region.is-selected {
	fill: var(--terragua-red);
	filter: drop-shadow(0 3px 3px rgba(139, 30, 30, 0.24));
}

.terragua-map__connector {
	position: absolute;
	z-index: 1;
	display: block;
	width: 1px;
	background: var(--terragua-red);
	pointer-events: none;
}

.terragua-map__connector::after {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--terragua-red);
	box-shadow: 0 0 0 3px rgba(179, 0, 0, 0.08);
	content: '';
	transform: translate(-50%, 50%);
}

.terragua-map__panel {
	position: absolute;
	z-index: 2;
	width: min(380px, 100%);
	padding: 24px 24px 22px;
	border: 1px solid #eceff2;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 8px 26px rgba(19, 39, 66, 0.13);
}

.terragua-map__panel[hidden],
.terragua-map__connector[hidden] {
	display: none !important;
}

.terragua-map__close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.terragua-map__close::before,
.terragua-map__close::after {
	position: absolute;
	top: 14px;
	left: 6px;
	width: 18px;
	height: 2px;
	background: #718093;
	content: '';
}

.terragua-map__close::before {
	transform: rotate(45deg);
}

.terragua-map__close::after {
	transform: rotate(-45deg);
}

.terragua-map__close:hover::before,
.terragua-map__close:hover::after,
.terragua-map__close:focus-visible::before,
.terragua-map__close:focus-visible::after {
	background: var(--terragua-red);
}

.terragua-map__close:focus-visible {
	border-radius: 4px;
	outline: 2px solid var(--terragua-red);
	outline-offset: 2px;
}

.terragua-map__panel-title {
	margin: 0 36px 2px 0;
	color: var(--terragua-red-dark);
	font-size: 18px;
	font-weight: 800;
	line-height: 1.25;
	text-transform: uppercase;
}

.terragua-map__count {
	margin: 0 0 13px;
	color: var(--terragua-navy);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
}

.terragua-map__filters {
	display: flex;
	gap: 10px;
	margin: 0 0 12px;
}

.terragua-map__filter {
	min-height: 34px;
	padding: 6px 18px;
	border: 1px solid var(--terragua-red);
	border-radius: 999px;
	background: #fff;
	color: var(--terragua-red);
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.terragua-map__filter:hover,
.terragua-map__filter:focus-visible,
.terragua-map__filter.is-active {
	background: var(--terragua-red);
	color: #fff;
}

.terragua-map__filter:focus-visible {
	outline: 2px solid rgba(179, 0, 0, 0.26);
	outline-offset: 2px;
}

.terragua-map__results {
	margin: 0 0 18px;
	padding: 0;
	border-top: 1px solid var(--terragua-line);
	list-style: none;
}

.terragua-map__result,
.terragua-map__empty {
	margin: 0;
	border-bottom: 1px solid var(--terragua-line);
}

.terragua-map__result-link {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr) 12px;
	gap: 10px;
	align-items: center;
	min-height: 47px;
	padding: 8px 2px;
	color: var(--terragua-navy);
	font-size: 13px;
	line-height: 1.35;
	text-decoration: none;
}

.terragua-map__result-link:hover,
.terragua-map__result-link:focus-visible {
	color: var(--terragua-red-dark);
	text-decoration: none;
}

.terragua-map__result-link:focus-visible {
	outline: 2px solid rgba(179, 0, 0, 0.25);
	outline-offset: 2px;
}

.terragua-map__drop {
	width: 13px;
	height: 13px;
	margin-left: 1px;
	border: 1.5px solid var(--terragua-red);
	border-radius: 8px 8px 8px 2px;
	transform: rotate(45deg);
}

.terragua-map__result-copy {
	min-width: 0;
}

.terragua-map__result-title {
	font-weight: 600;
}

.terragua-map__result-flow {
	white-space: normal;
}

.terragua-map__arrow {
	color: var(--terragua-red);
	font-size: 26px;
	font-weight: 300;
	line-height: 1;
}

.terragua-map__empty {
	padding: 15px 2px;
	color: var(--terragua-muted);
	font-size: 13px;
	line-height: 1.45;
}

.terragua-map__all {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 42px;
	padding: 10px 16px;
	border-radius: 2px;
	background: var(--terragua-red);
	color: #fff !important;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: background 150ms ease, opacity 150ms ease;
}

.terragua-map__all:hover,
.terragua-map__all:focus-visible {
	background: var(--terragua-red-dark);
}

.terragua-map__all:focus-visible {
	outline: 2px solid rgba(179, 0, 0, 0.28);
	outline-offset: 3px;
}

.terragua-map__all.is-disabled {
	opacity: 0.48;
	cursor: not-allowed;
}

.terragua-map .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.terragua-map {
		padding: 26px 16px 18px;
	}

	.terragua-map__header {
		margin-bottom: 18px;
	}

	.terragua-map__scroll {
		overflow-x: auto;
		overflow-y: hidden;
		padding: 3px 0 10px;
		-webkit-overflow-scrolling: touch;
		scrollbar-color: rgba(179, 0, 0, 0.35) transparent;
	}

	.terragua-map__svg {
		width: 920px;
		max-width: none;
	}

	.terragua-map__connector {
		display: none !important;
	}

	.terragua-map__panel {
		position: relative;
		width: 100%;
		max-width: 420px;
		margin: 18px auto 0;
		padding: 22px 18px 20px;
	}

	.terragua-map__filters {
		gap: 8px;
	}

	.terragua-map__filter {
		flex: 1 1 50%;
		padding-inline: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.terragua-map__region,
	.terragua-map__filter,
	.terragua-map__all,
	.terragua-map__stage {
		transition: none;
	}

	.terragua-map__scroll {
		scroll-behavior: auto;
	}
}
