.map3d-wrap {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 18px;
	width: 100%;
	background: transparent;
	justify-items: center;
}

/* Com lista lateral: mapa + legenda */
.map3d-wrap.map3d-has-legend {
	grid-template-columns: minmax(0, 1fr) 250px;
	justify-items: stretch;
}

/* Sem lista: mapa centrado a ocupar a largura total */
.map3d-wrap.map3d-no-legend {
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
}

.map3d-wrap.map3d-no-legend .map3d-stage {
	width: 100%;
	max-width: 100%;
}

.map3d-wrap.map3d-no-legend .map3d-legend {
	display: none !important;
}

.map3d-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 720px;
	overflow: visible;
	background: transparent;
}

.map3d-map-layer {
	position: relative;
	width: 100%;
	max-width: 1050px;
	margin-left: auto;
	margin-right: auto;
	transform-origin: center center;
	transition: transform .25s ease, margin .25s ease;
}

.map3d-image {
	display: block;
	width: 100%;
	height: auto;
	pointer-events: none;
	user-select: none;
}

.map3d-filter-original {
	filter: none;
}

.map3d-filter-green {
	filter: saturate(1.35) hue-rotate(3deg) brightness(1.05);
}

.map3d-filter-dark {
	filter: brightness(.72) contrast(1.18) saturate(.85);
}

.map3d-filter-gold {
	filter: sepia(.45) saturate(1.15) hue-rotate(352deg);
}

.map3d-points,
.map3d-lines {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}


.map3d-lines {
	z-index: 2;
	pointer-events: none;
	overflow: visible;
}

.map3d-lines line {
	stroke-width: .28;
	stroke-dasharray: 1.2 1.4;
	stroke-linecap: round;
	opacity: .88;
	filter: drop-shadow(0 0 .8px currentColor);
}

.map3d-points {
	z-index: 3;
}

.map3d-point {
	--map3d-point-color: #1f9dff;
	--map3d-label-bg: #fff;
	--map3d-label-color: #111;
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	border: 0;
	background: none;
	transform: translate(-50%, -50%);
	cursor: pointer;
	z-index: 4;
}

.map3d-dot {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 17px;
	height: 17px;
	border: 4px solid var(--map3d-point-color);
	border-radius: 50%;
	background: #fff;
	box-shadow:
		0 0 5px #fff,
		0 0 10px var(--map3d-point-color),
		0 0 20px var(--map3d-point-color);
	transform: translate(-50%, -50%);
}

.map3d-name {
	position: absolute;
	left: 15px;
	top: -18px;
	display: block;
	min-width: max-content;
	padding: 7px 12px;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 9px;
	color: var(--map3d-label-color);
	background: var(--map3d-label-bg);
	box-shadow: 0 5px 14px rgba(0, 0, 0, .23);
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.map3d-popup {
	position: absolute;
	left: 18px;
	top: 26px;
	display: block;
	width: 230px;
	padding: 13px;
	border: 1px solid rgba(77, 255, 129, .55);
	border-radius: 10px;
	color: #fff;
	background: rgba(3, 18, 10, .97);
	box-shadow: 0 15px 35px rgba(0, 0, 0, .35);
	opacity: 0;
	visibility: hidden;
	text-align: left;
	transform: translateY(6px);
	transition: .2s ease;
}

.map3d-popup strong,
.map3d-popup small,
.map3d-popup span {
	display: block;
}

.map3d-popup strong {
	margin-bottom: 4px;
	color: #51ff86;
	font-size: 14px;
}

.map3d-popup small {
	margin-bottom: 8px;
	color: rgba(255, 255, 255, .62);
	font-size: 10px;
	line-height: 1.35;
}

.map3d-popup span {
	margin-bottom: 9px;
	font-size: 11px;
	line-height: 1.4;
}

.map3d-popup a {
	display: inline-flex;
	padding: 6px 8px;
	border: 1px solid #51ff86;
	border-radius: 6px;
	color: #fff !important;
	font-size: 10px;
	text-decoration: none !important;
}

.map3d-point:hover,
.map3d-point:focus,
.map3d-point.is-open {
	z-index: 20;
	outline: none;
}

.map3d-point:hover .map3d-popup,
.map3d-point:focus .map3d-popup,
.map3d-point.is-open .map3d-popup {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.map3d-status {
	position: absolute;
	left: 50%;
	bottom: 18px;
	z-index: 10;
	padding: 8px 12px;
	border-radius: 8px;
	color: #222;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 7px 20px rgba(0, 0, 0, .14);
	transform: translateX(-50%);
	font-size: 12px;
	white-space: nowrap;
}

.map3d-status:empty {
	display: none;
}

.map3d-legend {
	align-self: center;
	padding: 18px;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 13px;
	background: rgba(255, 255, 255, .95);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .13);
}

.map3d-legend-title {
	margin-bottom: 14px;
	color: #14944a;
	font-size: 13px;
	font-weight: 900;
}

.map3d-legend-item {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr);
	gap: 9px;
	margin-bottom: 13px;
}

.map3d-legend-dot {
	width: 13px;
	height: 13px;
	margin-top: 2px;
	border: 4px solid var(--map3d-point-color);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 7px var(--map3d-point-color);
}

.map3d-legend-item strong,
.map3d-legend-item small {
	display: block;
}

.map3d-legend-item strong {
	color: #181818;
	font-size: 13px;
}

.map3d-legend-item small {
	margin-top: 2px;
	color: #747474;
	font-size: 10px;
	line-height: 1.35;
}

@media (max-width: 1024px) {
	.map3d-wrap,
	.map3d-wrap.map3d-has-legend {
		grid-template-columns: 1fr;
		justify-items: center;
	}

	.map3d-stage {
		min-height: 620px;
	}

	.map3d-legend {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
		width: 100%;
	}

	.map3d-legend-title {
		grid-column: 1 / -1;
	}
}

@media (max-width: 767px) {
	.map3d-stage {
		min-height: 360px;
		overflow: visible;
	}

	.map3d-map-layer {
		width: 100%;
		max-width: none;
	}

	.map3d-name {
		left: 12px;
		top: -15px;
		padding: 5px 8px;
		font-size: 11px;
	}

	.map3d-dot {
		width: 13px;
		height: 13px;
		border-width: 3px;
	}

	.map3d-legend {
		grid-template-columns: repeat(2, 1fr);
		padding: 14px;
	}
}

@media (max-width: 480px) {
	.map3d-stage {
		min-height: 300px;
	}

	.map3d-map-layer {
		width: 100%;
	}

	.map3d-name {
		font-size: 9px;
	}


	.map3d-legend {
		grid-template-columns: 1fr;
	}
}
