/* hyp/mapa-camadas — protótipo linhas 138–213 (mãe) e 605–680 (projeto), spec 04. */

.hyp-mapa {
	background: var(--hyp-wash);
	margin-top: 100px;
	padding: 96px 0;
}

/* Página mãe: vem a seguir a "Os projetos" (104px, como as outras secções da mãe). */
.hyp-mapa[data-identidade="mae"] {
	margin-top: 104px;
}

.hyp-mapa .hyp-mapa__head {
	max-width: 720px;
}

.hyp-mapa[data-identidade="mae"] .hyp-mapa__head {
	max-width: 760px;
}

.hyp-mapa .hyp-sh__lead {
	color: var(--hyp-text-lead);
	margin-top: 18px;
}

.hyp-mapa .hyp-mapa__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 28px;
	margin-top: 44px;
	align-items: center;
}

@media (max-width: 1079.98px) {
	.hyp-mapa .hyp-mapa__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Mapa ---------- */
.hyp-mapa .hyp-mapa__frame {
	position: relative;
	border-radius: var(--hyp-r-lg);
	overflow: hidden;
	isolation: isolate;
}

.hyp-mapa .hyp-mapa__view {
	position: relative;
	width: 100%;
	overflow: hidden;
	background-color: #6b6a55;
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
	cursor: default;
}

.hyp-mapa .hyp-mapa__view.is-zoomed {
	touch-action: none;
	cursor: grab;
}

.hyp-mapa .hyp-mapa__canvas {
	position: absolute;
	inset: 0;
	transform-origin: 0 0;
	will-change: transform;
}

.hyp-mapa .hyp-mapa__fundo,
.hyp-mapa .hyp-mapa__layer {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	pointer-events: none;
}

.hyp-mapa .hyp-mapa__layer {
	transition: opacity 0.3s;
}

.hyp-mapa.is-init .hyp-mapa__layer {
	transition: none;
}

.hyp-mapa .hyp-mapa__names[hidden],
.hyp-mapa .hyp-mapa__pill[hidden] {
	display: none;
}

/* Nomes e etiqueta contra-escalados: mantêm o tamanho com o zoom (--hyp-mapa-inv = 1 / zoom). */
.hyp-mapa .hyp-mapa__name {
	position: absolute;
	transform: translate(-50%, -50%) scale(var(--hyp-mapa-inv, 1));
	width: max-content;
	max-width: 150px;
	text-align: center;
	font-size: 10.5px;
	line-height: 1.3;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-weight: 600;
	color: #ffffff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 0, 0, 0.55);
	pointer-events: none;
}

.hyp-mapa .hyp-mapa__pill {
	position: absolute;
	bottom: 12px;
	transform-origin: center bottom;
	transform: translateX(-50%) scale(var(--hyp-mapa-inv, 1));
	display: flex;
	align-items: center;
	gap: 6px;
	background: var(--hyp-navy);
	color: #ffffff;
	border-radius: var(--hyp-r-pill);
	padding: 6px 13px 6px 9px;
	font-size: 11px;
	line-height: normal;
	font-weight: 500;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.hyp-mapa .hyp-mapa__pill .hyp-icon {
	font-size: 15px;
}

/* Norte + zoom */
.hyp-mapa .hyp-mapa__controls {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.hyp-mapa .hyp-mapa__north {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--hyp-navy);
}

.hyp-mapa .hyp-mapa__north .hyp-icon {
	font-size: 17px;
	line-height: 0.8;
}

.hyp-mapa .hyp-mapa__north > span:last-child {
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1;
}

.hyp-mapa .hyp-mapa__zoom {
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	border-radius: var(--hyp-r-toggle);
	overflow: hidden;
}

.hyp-mapa .hyp-mapa__zoom[hidden] {
	display: none;
}

.hyp-mapa .hyp-mapa__zoom button {
	--hyp-btn-radius: 0;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: none;
	border-bottom: 1px solid #e6e6e6;
	background: transparent;
	cursor: pointer;
	color: var(--hyp-navy);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: none;
}

.hyp-mapa .hyp-mapa__zoom button:last-child {
	border-bottom: none;
}

.hyp-mapa .hyp-mapa__zoom button:hover {
	background: #f3f7fa;
}

.hyp-mapa .hyp-mapa__zoom .hyp-icon {
	font-size: 20px;
}

.hyp-mapa .hyp-mapa__zoom button:last-child .hyp-icon {
	font-size: 18px;
}

/* Aviso "Use Ctrl + scroll" */
.hyp-mapa .hyp-mapa__hint {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 31, 63, 0.45);
	pointer-events: none;
}

.hyp-mapa .hyp-mapa__hint[hidden] {
	display: none;
}

.hyp-mapa .hyp-mapa__hint span {
	background: rgba(0, 31, 63, 0.9);
	color: #ffffff;
	border-radius: var(--hyp-r-pill);
	padding: 10px 20px;
	font-size: 13px;
	line-height: normal;
}

/* Escala gráfica */
.hyp-mapa .hyp-mapa__scale {
	position: absolute;
	left: 14px;
	bottom: 14px;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	padding: 8px 12px 6px;
	min-width: 84px;
	transition: width 0.2s;
}

.hyp-mapa .hyp-mapa__scale-bar {
	display: flex;
	height: 6px;
	border: 1px solid var(--hyp-navy);
}

.hyp-mapa .hyp-mapa__scale-bar span {
	flex: 1;
	background: var(--hyp-navy);
}

.hyp-mapa .hyp-mapa__scale-bar span + span {
	background: #ffffff;
}

.hyp-mapa .hyp-mapa__scale-labels {
	display: flex;
	justify-content: space-between;
	gap: 6px;
	font-size: 10px;
	line-height: normal;
	color: var(--hyp-navy);
	font-weight: 500;
	margin-top: 4px;
	white-space: nowrap;
}

/* ---------- Legenda ---------- */
.hyp-mapa .hyp-mapa__legend {
	border: 1px solid #e6e6e6;
	border-radius: var(--hyp-r-lg);
	background: #ffffff;
	padding: 26px 24px 28px;
}

.hyp-mapa .hyp-mapa__legend-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.hyp-mapa .hyp-mapa__legend-title {
	font-size: 11px;
	line-height: normal;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--hyp-navy);
}

.hyp-mapa .hyp-mapa__count {
	font-size: 11.5px;
	line-height: normal;
	color: var(--hyp-text-meta-3);
}

.hyp-mapa .hyp-mapa__legend-help {
	font-size: 12.5px;
	color: var(--hyp-text-meta);
	font-weight: 300;
	margin-top: 8px;
	line-height: 1.6;
}

.hyp-mapa .hyp-mapa__layers {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.hyp-mapa .hyp-mapa__layers li {
	margin: 0;
	padding: 0;
}

.hyp-mapa .hyp-mapa__toggle {
	--hyp-btn-radius: var(--hyp-r-toggle);
	width: 100%;
	margin: 0;
	text-align: left;
	cursor: pointer;
	border: 1px solid transparent;
	padding: 11px 12px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	transition: background 0.2s, opacity 0.2s;
	opacity: 0.45;
	background: transparent;
}

.hyp-mapa .hyp-mapa__toggle[aria-checked="true"] {
	opacity: 1;
	background: #fafbfc;
}

.hyp-mapa .hyp-mapa__toggle:hover {
	border-color: var(--hyp-border-card);
}

.hyp-mapa .hyp-mapa__swatch {
	flex: none;
	width: 18px;
	height: 18px;
	border-radius: 5px;
	border: 2px solid var(--hyp-cam);
	background: transparent;
	transition: background 0.2s;
}

.hyp-mapa .hyp-mapa__toggle[aria-checked="true"] .hyp-mapa__swatch {
	background: var(--hyp-cam);
}

.hyp-mapa .hyp-mapa__layer-name {
	font-size: 13.5px;
	color: var(--hyp-navy);
	font-weight: 400;
	line-height: 1.35;
}

.hyp-mapa .hyp-mapa__actions[hidden] {
	display: none;
}

.hyp-mapa .hyp-mapa__actions {
	display: flex;
	gap: 8px;
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid #f2f2f2;
}

.hyp-mapa .hyp-mapa__actions button {
	--hyp-btn-radius: var(--hyp-r-pill);
	flex: 1;
	margin: 0;
	background: #ffffff;
	padding: 11px 10px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: normal;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}

.hyp-mapa .hyp-mapa__all {
	border: 1px solid var(--hyp-navy);
	color: var(--hyp-navy);
}

.hyp-mapa .hyp-mapa__all:hover {
	background: var(--hyp-navy);
	color: #ffffff;
}

.hyp-mapa .hyp-mapa__none {
	border: 1px solid #e6e6e6;
	color: var(--hyp-text-muted);
}

.hyp-mapa .hyp-mapa__none:hover {
	border-color: var(--hyp-navy);
	color: var(--hyp-navy);
}

.hyp-mapa .hyp-mapa__nota {
	font-size: 12px;
	color: var(--hyp-text-meta-2);
	font-weight: 300;
	line-height: 1.7;
	margin-top: 22px;
	max-width: 780px;
}

@media (prefers-reduced-motion: reduce) {
	.hyp-mapa .hyp-mapa__layer,
	.hyp-mapa .hyp-mapa__scale,
	.hyp-mapa .hyp-mapa__toggle,
	.hyp-mapa .hyp-mapa__swatch {
		transition: none;
	}
}
