.nzwknf-map {
	display: grid;
	gap: 1rem;
	position: relative;
}

.nzwknf-map__controls {
	background: #f8fafc;
	border: 1px solid #dbe3ea;
	border-radius: 18px;
	padding: 1rem;
}

.nzwknf-map__controls-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.nzwknf-map__field {
	display: flex;
	flex-direction: column;
	gap: .5rem;
	position: relative;
	min-width: 0;
}

.nzwknf-map__field > span {
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.25;
}

.nzwknf-map__field input[type="search"],
.nzwknf-map__field input[type="date"],
.nzwknf-map__field select {
	width: 100%;
	border: 1px solid #c8d3dc;
	border-radius: 12px;
	padding: .8rem .9rem;
	background: #fff;
	min-height: 46px;
}

.nzwknf-map__field input[type="search"]:focus,
.nzwknf-map__field input[type="date"]:focus,
.nzwknf-map__field select:focus {
	outline: none;
	border-color: #4f6f8b;
	box-shadow: 0 0 0 3px rgba(79, 111, 139, 0.12);
}

.nzwknf-map__checks {
	display: flex;
	flex-wrap: wrap;
	gap: .65rem 1rem;
}

.nzwknf-map__checks label {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	font-size: .95rem;
	line-height: 1.3;
	cursor: pointer;
}

.nzwknf-map__checks input[type="checkbox"] {
	margin: 0;
}



/* ###################### */

.nzwknf-map__field--full {
	grid-column: 1 / -1;
}

.nzwknf-map__field-group {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	align-items: start;
}

.nzwknf-map__tagcloud {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.nzwknf-map__tag {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	position: relative;
}

.nzwknf-map__tag input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.nzwknf-map__tag span {
	display: inline-flex;
	align-items: center;
	padding: .45rem .8rem;
	border: 1px solid #c8d3dc;
	border-radius: 999px;
	background: #fff;
	font-size: .92rem;
	line-height: 1.2;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.nzwknf-map__tag.is-active span {
	background: #4f6f8b;
	color: #fff;
	border-color: #4f6f8b;
}

.nzwknf-map__card-date {
	font-size: .9rem;
	font-weight: 600;
	margin: 0 0 .6rem;
	color: #2e4558;
}

.nzwknf-map__card-text {
	font-size: .92rem;
	line-height: 1.45;
	color: #42586b;
	margin: 0 0 .8rem;
}

.nzwknf-map__card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	margin: 0 0 .9rem;
}

.nzwknf-map__card-tags span {
	font-size: .8rem;
	line-height: 1;
	padding: .35rem .55rem;
	border-radius: 999px;
	background: #eef3f7;
	border: 1px solid #dbe3ea;
}

.nzwknf-map-popup__date,
.nzwknf-map-popup__terms,
.nzwknf-map-popup__tags {
	margin-bottom: 5px;
	font-size: .92rem;
	line-height: 1.5;
}

/* ###################### */




.nzwknf-map__canvas {
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid #dbe3ea;
	background: #eef3f7;
	position: relative;
	min-height: 360px;
}

.nzwknf-map__results {
	min-height: 2rem;
}

.nzwknf-map--hide-results .nzwknf-map__results[hidden] {
	display: none !important;
}


.nzwknf-map__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
}

.nzwknf-map__card {
	border: 1px solid #dbe3ea;
	border-radius: 18px;
	padding: 1.25rem;
	background: #fff;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.nzwknf-map__card:hover {
	border-color: #b9c8d4;
	box-shadow: 0 10px 24px rgba(22, 37, 48, 0.06);
}

.nzwknf-map__card.is-active {
	border-color: #4f6f8b;
	box-shadow: 0 0 0 3px rgba(79, 111, 139, 0.14);
}

.nzwknf-map__card-type {
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #5d7286;
	margin-bottom: .45rem;
}

.nzwknf-map__card-title {
	margin: 0 0 1rem;
	font-size: 1rem;
	line-height: 1.35;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.nzwknf-map__card-title a {
	text-decoration: none;
}

.nzwknf-map__card-title a:hover {
	text-decoration: underline;
}

.nzwknf-map__card-button {
	border: 1px solid #4f6f8b;
	background: #fff;
	color: #2e4558;
	border-radius: 999px;
	padding: .7rem 1rem;
	cursor: pointer;
	font: inherit;
	line-height: 1;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.nzwknf-map__card-button:hover,
.nzwknf-map__card-button:focus {
	background: #4f6f8b;
	color: #fff;
	border-color: #4f6f8b;
	outline: none;
}

.nzwknf-map__suggest {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	z-index: 30;
	display: none;
	background: #fff;
	border: 1px solid #dbe3ea;
	border-radius: 14px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
	overflow: hidden;
}

.nzwknf-map__suggest.is-open {
	display: block;
}

.nzwknf-map__suggest-item {
	width: 100%;
	text-align: left;
	padding: .85rem .95rem;
	border: 0;
	background: #fff;
	cursor: pointer;
	font: inherit;
	line-height: 1.35;
}

.nzwknf-map__suggest-item + .nzwknf-map__suggest-item {
	border-top: 1px solid #edf2f6;
}

.nzwknf-map__suggest-item:hover,
.nzwknf-map__suggest-item:focus {
	background: #f3f7fa;
	outline: none;
}

.nzwknf-map-popup {
	min-width: 240px;
	max-width: 320px;
	max-height: min(60vh, 520px);
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 4px;
}

.nzwknf-map-popup h3,
.em .nzwknf-map-popup h3,
.em.em-item.em-item-single .em-item-meta h3
{
	margin: 0 0 .7rem !important;
	font-size: 1.2rem !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.nzwknf-map-popup__media {
	margin: 0 0 .85rem;
}

.nzwknf-map-popup__image,
.nzwknf-map-popup__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
}

.nzwknf-map-popup__address,
.nzwknf-map-popup__hours,
.nzwknf-map-popup__text {
	margin-bottom: 5px;
	font-size: .92rem;
	line-height: 1.5;
}


.nzwknf-map-popup__hours strong {
	display: inline-block;
	margin-bottom: .2rem;
}

.leaflet-popup-content p,
.nzwknf-map-popup__text p,
.em.pixelbones .leaflet-popup-content p,
.em.pixelbones .nzwknf-map-popup__text p 
{
	margin: 0 0 .5rem !important;
}


.nzwknf-map-popup__text p:last-child {
	margin-bottom: 0;
}

.nzwknf-map-popup__list {
	margin: .6rem 0 1rem;
	padding-left: 1.15rem;
}

.nzwknf-map-popup__list li + li {
	margin-top: .2rem;
}

.em.em-item.em-item-single .em-item-meta .nzwknf-map .button,
.em.pixelbones .primary.button,
.nzwknf-map .primary.button,
.nzwknf-map-popup .primary.button 
{
	display: inline-block;
	padding: .65rem 1rem;
	border-radius: 999px;
	text-decoration: none;
	line-height: 1;
	margin: 0px 0 15px 0 !important;
	font-size: 95%;


	background-color: var(--knf-color-dunkelblau) !important;
    border-radius: 100px !important;
    border: 2px solid #fff !important;
    box-shadow: 6px 6px 15px 0px rgba(0, 0, 0, 0.2) !important;
    font-family: var(--font-family-bold);
    color: #fff !important;
}

.nzwknf-map-region-info .primary.button
{
	margin: 0;
	font-size: 95%;
}

.nzwknf-map.is-loading .nzwknf-map__canvas {
	opacity: .88;
}

/* Leaflet Popup Feinschliff */
.leaflet-popup-content-wrapper {
	border-radius: 16px;
}

.leaflet-popup-content {
	margin: 14px 16px;
	min-width: 240px;
	max-height: min(65vh, 560px);
	overflow: visible;
}

.leaflet-popup-content p:last-child {
	margin-bottom: 0;
}

/* Optional: lange Titel in Popup/Listen sauber umbrechen */
.leaflet-popup-content,
.nzwknf-map__card,
.nzwknf-map-popup {
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

@media (max-width: 900px) {
	.nzwknf-map__controls-grid {
		grid-template-columns: 1fr;
	}

	.nzwknf-map__cards {
		grid-template-columns: 1fr;
	}

	.nzwknf-map__field-group {
		grid-template-columns: 1fr;
	}	
}

.nzwknf-map-popup::-webkit-scrollbar {
	width: 8px;
}

.nzwknf-map-popup::-webkit-scrollbar-thumb {
	background: rgba(79, 111, 139, 0.35);
	border-radius: 999px;
}

.nzwknf-map-popup::-webkit-scrollbar-track {
	background: transparent;
}


/* tooltip */
.nzwknf-map-tooltip {
	background: rgba(46, 69, 88, 0.92);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 4px 8px;
	font-size: 0.75rem;
	line-height: 1.2;
	box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.leaflet-tooltip.nzwknf-map-tooltip::before {
	border-top-color: rgba(46, 69, 88, 0.92);
}

/* ################################################# */

.nzwknf-map-region-label-tooltip {
	background: transparent;
	border: none;
	box-shadow: none;
}

.nzwknf-map-region-label {
	pointer-events: none; /* auto */
}


.nzwknf-map-region-label__inner {
	background: rgba(255,255,255,0.92);
	border-radius: 10px;
	padding: 4px 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	text-align: center;
	max-width: 150px;
}

.nzwknf-map-region-label__title {
	display: block;
	font-size: 0.72rem;
	line-height: 1.15;
	font-weight: 700;
	color: #2e4558;
	white-space: nowrap;
}

.nzwknf-map-region-label__title a {
	text-decoration: none;
	color: #2e4558;
}

.nzwknf-map-region-label__title a:hover {
	text-decoration: underline;
}

.nzwknf-map-region-label__desc {
	font-size: 0.72rem;
	color: #5d7286;
	line-height: 1.2;
}

.leaflet-tooltip.nzwknf-map-region-label-tooltip {
	transition: opacity 0.2s ease;
}


/* ######################## */

.nzwknf-map-region-info {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 800;
	width: min(420px, calc(100% - 2rem));
	max-height: calc(100% - 2rem);
	pointer-events: none;
}

.nzwknf-map-region-info[hidden] {
	display: none !important;
}

.nzwknf-map-region-info__inner {
	background: rgba(255,255,255,0.96);
	border-radius: 18px;
	padding: 1.1rem 1.2rem;
	box-shadow: 0 12px 28px rgba(0,0,0,0.14);
	pointer-events: auto;
	max-height: min(46vh, 420px);
	/*max-height: calc(100vh - 14rem);*/
	overflow: auto;
}


.nzwknf-map-region-info__inner h3 {
	margin: 0 0 .65rem;
	font-size: 1.1rem;
	line-height: 1.2;
}

.nzwknf-map-region-info__text {
	font-size: .95rem;
	line-height: 1.45;
	color: #42586b;
	margin-bottom: .75rem;
}


@media (max-width: 900px) {
	.nzwknf-map-region-info {
		top: .75rem;
		right: .75rem;
		left: .75rem;
		width: auto;
	}

	.nzwknf-map-region-info__inner {
		max-height: 40vh;
	}
}

.nzwknf-map__canvas {
	transition: opacity 0.25s ease, filter 0.25s ease;
}

.nzwknf-map__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.38);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	z-index: 30;
	border-radius: inherit;
}

.nzwknf-map__loading-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	background: rgba(255, 255, 255, 0.88);
	border-radius: 1.25rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.nzwknf-map__loading-logo {
	display: block;
	width: 72px;
	height: 72px;
	animation: nzwknf-map-spin 1.4s linear infinite;
	transform-origin: center;
}

.nzwknf-map__loading-text {
	font-size: 0.95rem;
	line-height: 1.3;
	font-weight: 600;
	color: #3f5d77;
	text-align: center;
}

.nzwknf-map.is-loading .nzwknf-map__loading {
	opacity: 1;
	visibility: visible;
}

.nzwknf-map.is-loading .nzwknf-map__canvas {
	opacity: 0.45;
	filter: saturate(0.8);
}

@keyframes nzwknf-map-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* #################### */

.single .em.em-item.em-item-single .nzwknf-map-popup__address,
.single .em.em-item.em-item-single .nzwknf-map-popup__hours,
.single .em.em-item.em-item-single .nzwknf-map-popup__text
{
	display: none;
}


