/* Biodistrikt festival map — Leaflet viewer (isolated, no theme) */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body.bdm-body {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #1b2f16;
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	-webkit-text-size-adjust: 100%;
	touch-action: manipulation;
}

.bdm {
	position: fixed;
	inset: 0;
	display: grid;
	grid-template-rows: auto auto 1fr;
	background: #1b2f16;
	color: #f4f7f2;
}

.bdm__top {
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	padding-top: calc(12px + env(safe-area-inset-top, 0px));
	padding-left: calc(14px + env(safe-area-inset-left, 0px));
	padding-right: calc(14px + env(safe-area-inset-right, 0px));
	background: rgba(16, 30, 14, 0.92);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.bdm__title {
	min-width: 0;
}

.bdm__eyebrow {
	margin: 0 0 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.7;
}

.bdm__title h1 {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.bdm__download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: #3d8c35;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(42, 108, 38, 0.35);
	-webkit-tap-highlight-color: transparent;
}

.bdm__download:hover,
.bdm__download:focus-visible {
	background: #2f7429;
	color: #fff;
	outline: none;
}

.bdm__download:active {
	transform: scale(0.98);
}

/* ——— Board switcher ——— */
.bdm__tabs {
	z-index: 999;
	display: flex;
	gap: 8px;
	padding: 10px 14px;
	padding-left: calc(14px + env(safe-area-inset-left, 0px));
	padding-right: calc(14px + env(safe-area-inset-right, 0px));
	background: rgba(16, 30, 14, 0.82);
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.bdm__tabs::-webkit-scrollbar {
	display: none;
}

.bdm .bdm__tab {
	flex: 0 0 auto;
	min-height: 38px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #eaf1e6;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.01em;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.bdm .bdm__tab:hover,
.bdm .bdm__tab:focus-visible {
	background: rgba(255, 255, 255, 0.13);
	color: #fff;
	outline: none;
}

.bdm .bdm__tab.is-active {
	background: #3d8c35;
	border-color: #3d8c35;
	color: #fff;
}

.bdm__stage {
	position: relative;
	min-height: 0;
}

.bdm__map {
	width: 100%;
	height: 100%;
	min-height: 0;
	background: #152612;
	z-index: 1;
}

.bdm__map.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border: 3px solid rgba(255, 255, 255, 0.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bdm-spin 0.7s linear infinite;
	z-index: 900;
}

@keyframes bdm-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ——— Prev / next ——— */
.bdm .bdm__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(16, 30, 14, 0.72);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	transition: background 0.18s ease, transform 0.12s ease;
	-webkit-tap-highlight-color: transparent;
}

.bdm .bdm__nav:hover,
.bdm .bdm__nav:focus-visible {
	background: #3d8c35;
	color: #fff;
	outline: none;
}

.bdm .bdm__nav:active {
	transform: translateY(-50%) scale(0.94);
}

.bdm .bdm__nav--prev {
	left: calc(12px + env(safe-area-inset-left, 0px));
}

.bdm .bdm__nav--next {
	right: calc(12px + env(safe-area-inset-right, 0px));
}

/* ——— Dots ——— */
.bdm__dots {
	position: absolute;
	left: 50%;
	bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.bdm .bdm__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.42);
	cursor: pointer;
	transition: background 0.18s ease, width 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.bdm .bdm__dot:hover,
.bdm .bdm__dot:focus-visible {
	background: rgba(255, 255, 255, 0.75);
	outline: none;
}

.bdm .bdm__dot.is-active {
	width: 24px;
	border-radius: 999px;
	background: #3d8c35;
}

.bdm__hint {
	position: absolute;
	left: 50%;
	bottom: calc(58px + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	z-index: 1000;
	padding: 9px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.58);
	color: rgba(255, 255, 255, 0.95);
	font-size: 12px;
	font-weight: 600;
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.45s ease;
	white-space: nowrap;
	max-width: calc(100vw - 28px);
	overflow: hidden;
	text-overflow: ellipsis;
}

.bdm__hint.is-gone {
	opacity: 0;
}

.bdm__hint--touch {
	display: none;
}

/* ——— Leaflet chrome overrides (map-native, never Elementor) ——— */
.bdm .leaflet-container {
	background: #152612;
	font: inherit;
	outline: none;
}

.bdm .leaflet-control-attribution {
	display: none !important;
}

.bdm .leaflet-control-zoom {
	margin: 0 14px 14px 0 !important;
	border: 0 !important;
	border-radius: 14px !important;
	overflow: hidden;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
}

.bdm .leaflet-bar {
	border: 0 !important;
	border-radius: 14px !important;
	overflow: hidden;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
}

.bdm .leaflet-bar a,
.bdm .leaflet-bar a:hover,
.bdm .leaflet-bar a:focus {
	width: 44px !important;
	height: 44px !important;
	line-height: 44px !important;
	border: 0 !important;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
	background: #fff !important;
	color: #1a2418 !important;
	font-size: 22px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	border-radius: 0 !important;
}

.bdm .leaflet-bar a:last-child {
	border-bottom: 0 !important;
}

.bdm .leaflet-bar a:hover,
.bdm .leaflet-bar a:focus {
	background: #f3f6f2 !important;
	color: #1a2418 !important;
}

.bdm .leaflet-bar a.leaflet-disabled {
	opacity: 0.35 !important;
	background: #fff !important;
	color: #1a2418 !important;
}

.bdm .leaflet-control-zoom-in,
.bdm .leaflet-control-zoom-out {
	font: 600 22px/44px system-ui, sans-serif !important;
}

.bdm .leaflet-image-layer {
	image-rendering: auto;
}

@media (max-width: 720px) {
	.bdm__top {
		padding: 10px 12px;
		padding-top: calc(10px + env(safe-area-inset-top, 0px));
	}

	.bdm__title h1 {
		font-size: 16px;
	}

	.bdm__download span {
		display: inline;
	}

	.bdm__hint--desk {
		display: none;
	}

	.bdm__hint--touch {
		display: inline;
	}

	.bdm__tabs {
		gap: 6px;
		padding: 8px 12px;
	}

	.bdm .bdm__tab {
		min-height: 34px;
		padding: 0 13px;
		font-size: 12px;
	}

	.bdm .bdm__nav {
		width: 40px;
		height: 40px;
	}

	.bdm .bdm__nav--prev {
		left: calc(8px + env(safe-area-inset-left, 0px));
	}

	.bdm .bdm__nav--next {
		right: calc(8px + env(safe-area-inset-right, 0px));
	}

	.bdm .leaflet-control-zoom {
		margin-right: 10px !important;
		margin-bottom: 58px !important;
	}
}

@media (hover: none) and (pointer: coarse) {
	.bdm__hint--desk {
		display: none;
	}

	.bdm__hint--touch {
		display: inline;
	}
}
