/**
 * =========================================================
 * Interaktive Karte
 * =========================================================
 */

/**
 * =========================================================
 * Kartenfilter
 * =========================================================
 */

.npuot-map-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.npuot-map-filter {
	position: relative;
}

.npuot-map-filter input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.npuot-map-filter label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.5rem 1rem;
	color: #111111;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	background: #ffffff;
	border: 0.125rem solid var(--filter-color, #7c749f);
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.npuot-map-filter label::before {
	content: "";
	flex: none;
	width: 0.6rem;
	height: 0.6rem;
	background: var(--filter-color, #7c749f);
	border-radius: 50%;
}

.npuot-map-filter input:checked + label {
	color: #ffffff;
	background: var(--filter-color, #7c749f);
}

.npuot-map-filter input:focus-visible + label {
	outline: 3px solid #002c50;
	outline-offset: 2px;
}

.npuot-map {
	position: relative;
	width: 100%;
	height: clamp(44rem, 72vw, 58rem);
	min-height: 28rem;
	max-height: 85vh;
	overflow: hidden;
	background: color-mix(in srgb, var(--wp--preset--color--green) 10%, white);
}

.npuot-map__loading {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 2rem;
	text-align: center;
}

.npuot-map.is-loaded .npuot-map__loading {
	display: none;
}

.npuot-map__notice {
	margin-top: 1rem;
	padding: 1rem;
	background: color-mix(in srgb, var(--wp--preset--color--beige) 30%, white);
}

.npuot-map .leaflet-control-zoom a {
	width: 2.75rem;
	height: 2.75rem;
	line-height: 2.75rem;
	font-size: 1.5rem;
}

.npuot-map .leaflet-control-attribution {
	font-size: 0.75rem;
}

@media (max-width: 48rem) {

	.npuot-map {
		height: 32rem;
		min-height: 32rem;
	}

}

.npuot-map-popup {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	min-width: 16rem;
	max-width: 21rem;
}

.npuot-map-popup__media {
	flex: 0 0 4.5rem;
}

.npuot-map-popup__image {
	display: block;
	width: 4.5rem;
	height: 4.5rem;
	object-fit: cover;
	border-radius: 0.25rem;
}

.npuot-map-popup__content {
	flex: 1;
	min-width: 0;
}

.npuot-map-popup__title {
	display: block;
	margin: 0 0 0.3rem;
	font-weight: 700;
	line-height: 1.3;
}

.npuot-map-popup__description {
	margin: 0;
	line-height: 1.45;
}

/*
 * Video-Popups: brauchen mehr Platz als das schmale
 * 4,5rem-Bild-Thumbnail, daher eigenes gestapeltes Layout
 * statt Bild links / Text rechts.
 */
.npuot-map-popup--video {
	flex-direction: column;
	align-items: stretch;
	min-width: 18rem;
	max-width: 24rem;
}

.npuot-map-popup--video .npuot-map-popup__media {
	flex: none;
	width: 100%;
}

.npuot-map-popup__video {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	border-radius: 0.25rem;
}

/**
 * =========================================================
 * Kartenmarker
 * =========================================================
 */

.npuot-map-marker-wrapper {
	background: none;
	border: 0;
}

.npuot-map-marker {
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(2rem, 1.6rem + 1.5vw, 2.625rem);
	height: clamp(2rem, 1.6rem + 1.5vw, 2.625rem);
	box-sizing: border-box;
	color: #fff;
	background: #002c50;
	border: 0.1875rem solid #fff;
	border-radius: 50% 50% 50% 0;
	box-shadow: 0 0.15rem 0.45rem rgb(0 0 0 / 35%);
	transform: rotate(-45deg);
}

.npuot-map-marker__icon {
	display: block;
	width: clamp(1rem, 0.78rem + 0.77vw, 1.35rem);
	height: clamp(1rem, 0.78rem + 0.77vw, 1.35rem);
	filter: brightness(0) invert(1);
	transform: rotate(45deg);
}

/* Typabhängige Farben (aus theme.json-Palette) */

.npuot-map-marker--aussichtspunkt {
	background: #0a9d50; /* Palette: Grün */
}

.npuot-map-marker--beobachtungsturm {
	background: #446428; /* Palette: Dunkelgrün */
}

.npuot-map-marker--besucherzentrum {
	background: #002c50; /* Palette: Dunkelblau */
}

.npuot-map-marker--informationsstelle {
	background: #23538a; /* Palette: Blau */
}

.npuot-map-marker--parkplatz {
	background: #111111; /* Palette: Schwarz */
}

.npuot-map-marker--rastplatz {
	background: #4dbf7e; /* helleres Grün, von Palette-Grün abgeleitet */
}

.npuot-map-marker--standard {
	background: #7c749f; /* Palette: Primär Violett */
}
