/* AN Mapa Zoom 1.1.0 */

.an-mz {
	margin: 24px 0;
	padding: 0;
}

/* Altura padrão: 70% da tela, entre 360 e 760 px. O atributo altura="" do
   shortcode substitui isso quando for preciso um mapa mais baixo ou mais alto. */
.an-mz-palco {
	position: relative;
	width: 100%;
	height: clamp(360px, 70vh, 760px);
	border: 1px solid #e4e8ee;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	z-index: 0; /* evita que o mapa passe por cima do menu fixo do tema */
}

.an-mz-palco.leaflet-container {
	font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	cursor: grab;
}

.an-mz-leg {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	justify-content: space-between;
	margin-top: 8px;
	font: 13px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #5c6673;
}

.an-mz-leg a {
	color: inherit;
	text-decoration: underline;
}

/* Botões: um pouco maiores que o padrão do Leaflet, para o dedo acertar. */
.an-mz .leaflet-bar a {
	width: 38px;
	height: 38px;
	line-height: 38px;
	font-size: 22px;
	color: #16191d;
}

.an-mz .an-mz-btn--cheia {
	font-size: 18px;
}

/* Aviso que aparece quando o leitor tenta rolar sobre o mapa sem ativá-lo. */
.an-mz-aviso {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	text-align: center;
	font: 600 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: #fff;
	background: rgba(16, 19, 23, .55);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s;
	z-index: 1000;
}

.an-mz-aviso.is-on {
	opacity: 1;
}

/* Tela cheia: vale tanto para a API nativa quanto para a camada fixa do iPhone. */
.an-mz.an-mz--cheia {
	position: fixed;
	inset: 0;
	z-index: 999999;
	margin: 0;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.an-mz.an-mz--cheia .an-mz-palco {
	flex: 1;
	height: auto;
	border: 0;
	border-radius: 0;
}

.an-mz.an-mz--cheia .an-mz-leg {
	padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
	margin: 0;
}

html.an-mz-trava,
html.an-mz-trava body {
	overflow: hidden;
}

.an-mz-erro {
	padding: 10px 12px;
	border: 1px dashed #b45309;
	color: #7a4b00;
	background: #fff8ec;
	font: 14px/1.4 system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
	.an-mz-palco {
		border-color: #252b33;
	}
}
