.leaflet-control-layer-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
}

.leaflet-control-layer-toggle img {
  width: 20px;
  height: 20px;
}

#layerSwitchBtn img {
	margin-left: 5px !important;
	padding-top: 6px;
}

/* Hover-Effekt für Polylines */
.leaflet-interactive:hover {
/*
  stroke: #fff !important;
  stroke-width: 6 !important;
  paint-order: stroke !important;
 */
  /* Geiler Glow
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.7));
  transition: filter 0.3s ease; */
}

.segment-label {
  width: auto !important;
}

.segment-badge {
/*  font-weight: bold;
  font-size: 14px; */
  font-size: 12px;
  white-space: nowrap;
  pointer-events: auto;

  /* Basisfarbe kommt aus JS */
  color: inherit;
/* text-shadow: 1px 1px 2px #fff; */
}

/* Kann komplett weg, wenn Hover im JS geregelt wird */
.segment-badge.hover-white {
  /* nur falls du noch einen "weißen Notfallhover" willst
  color: #fff !important;
  text-shadow: none !important;
  filter: none !important; */
}


.contour-active .leaflet-control-zoom {
  border-color: transparent; /* statt border: none */
}

.contour-active .leaflet-control-zoom a {
  box-shadow: none;
  border-color: transparent; /* statt border: none */
  background-color: transparent;
  font-size: 20px;
/*  filter: invert(1) brightness(2); */
}

.contour-active .leaflet-bottom .leaflet-control-layers {
  background: none !important;
  border-color: transparent; /* statt border: none */
  font-size: 14px;
  padding: 6px 10px;
}

.contour-active .leaflet-bottom label {
  display: block;
  margin-bottom: 4px;
  cursor: pointer;
}

.page-child #mtb-trailmap {
  width: 100% !important;
/*  aspect-ratio: 3/2 !important; */
  height: auto !important;
}

.leaflet-control-zoom .leaflet-control-layer-toggle {
/*   background-image: url('https://www.mountainbike-freiburg.com/wp-content/uploads/2025/09/graphic.png'); */
  background-size: 22px 22px;
  background-repeat: no-repeat;
  background-position: center;
  border: none;
}

/* Hintergrund der Karte im Fullscreen-Modus */
.page-child .leaflet-container:fullscreen {
  background-color: #8DA581 !important; /* dunkles MTB-Grün */
}

/* Safari */
.page-child .leaflet-container:-webkit-full-screen {
  background-color: #8DA581;
}

/* Firefox */
.page-child .leaflet-container:-moz-full-screen {
  background-color: #8DA581;
}

.page-child.contour-active .leaflet-tile {
  filter: invert(100%) grayscale(1) brightness(4) contrast(3000%);
  mix-blend-mode: lighten;
}

/* Popup kantig, ohne Pfeil */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip-container {
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.leaflet-popup.mtb-no-thumb .leaflet-popup-content-wrapper {
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
}


.leaflet-popup-tip { display: none !important; }



@media (max-width: 1023px) {
	
	.leaflet-popup:not(.mtb-no-thumb) {
		min-width: 240px;
	}
	
	.leaflet-popup.mtb-no-thumb {
	max-width: 240px;
	width: auto;
	}

}

@media (min-width: 1024px) {
	
	.leaflet-popup:not(.mtb-no-thumb) {
		min-width: 320px;
	}
	
	.leaflet-popup.mtb-no-thumb {
		min-width: 320px !important;
		max-width: auto !important;
	}
	#mtb-trailmap { min-height: 80vh !important; }
	#mtb-trailmap.leaflet-container {
	  touch-action: pan-y pinch-zoom;
	}
}

body.cat-trail #mtb-trailmap { min-height: 50vh; }

/* sichtbar/unsichtbar via JS steuern */
#layerSwitchBtn.mtb-layer-control-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
#layerSwitchBtn {
  transition: opacity 200ms ease;
  display: none;
}

/* Basis: Fullscreen Map */
#mtb-trailmap.leaflet-pseudo-fullscreen,
.leaflet-container.leaflet-fullscreen-on {
  position: fixed !important;
  inset: 0 !important;          /* top/right/bottom/left = 0 */
  width: 100% !important;

  /* Moderne iOS/Browser: dynamische Viewport-Höhe */
  height: 100dvh !important;

  /* Fallbacks */
  height: -webkit-fill-available !important; /* älteres iOS/Safari */
  height: 100vh !important;                  /* letzter Fallback */

  z-index: 9999999 !important;
  margin: 0 !important;

  /* Optional: wenn du in PWA/Standalone wirklich edge-to-edge willst,
     sorgt das für „unter“ der Home-Indikator-Zone:
     padding-bottom: env(safe-area-inset-bottom);
  */
}

/* Hilfreich: Vollbild-Wrapper darf nicht scrollen
html, body {
  height: 100%;
} */
body.leaflet-fullscreen-on,
.leaflet-fullscreen-on body {
  overflow: hidden;
}


/* Wenn die WP-Adminbar sichtbar ist, die Karte unter der Adminbar anfangen */
body.admin-bar .leaflet-container.leaflet-fullscreen-on {
  top: 32px !important;
  height: calc(100vh - 32px) !important;
}

/* Kleineres Adminbar-Offset auf mobilen Devices */
@media screen and (max-width: 782px) {
  body.admin-bar .leaflet-container.leaflet-fullscreen-on {
    top: 46px !important;
    height: calc(100vh - 46px) !important;
  }
}

/* Safe-area (Notch) berücksichtigen */
.leaflet-container.leaflet-fullscreen-on {
  top: env(safe-area-inset-top, 0);
  height: calc(100vh - env(safe-area-inset-top, 0));
}
/*
.hide-desktop {
	display: none;
}
  
.hide-mobile {
	display: inline-block;
}
*/
/* MOBILE: keine scale, stattdessen kompakteres Layout */
@media (max-width: 767px) {
/*	
  .hide-desktop {
	  display: inline-block !important;
  }
  
  .hide-mobile {
	  display: none !important;
  }
*/
  /* Popups schmaler machen */
  .leaflet-popup.mtb-popup--mobile {
    max-width: 240px !important;
    min-width: 0 !important;
    width: 240px !important;
  }
  
  .trail-thumb {
	  height: 140px !important;
  }
  
  /* Popup: Text auf 4 Zeilen beschränken */
  .trail-info p {
   /*  max-height: calc(1.3em * 3) !important; 4 Zeilen */
    display: none !important;
  }
  
  .trail-info .status {
	  margin: 0 0 36px !important;
  }
  
  .trail-info .status-text {
	  bottom: 1.5px !important;
  }
  
  .trail-info h4 {
	  font-size: 20px !important;
  }

  .trail-popup {
    overflow: hidden;
  }

  /* Close-Button sichtbar und passend positioniert */
  .leaflet-popup.mtb-popup--mobile a.leaflet-popup-close-button {
    top: 6px;
    right: 6px;
  }
}

/* Popup: Text auf 4 Zeilen beschränken */
.trail-info p {
  /* Multi-line clamp (Chrome/Safari/Edge + WebKit-Browser) */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;

  /* Fallback / generelle Regeln */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;

  /* Zeilenhöhe & max-height sorgen dafür, dass auch Nicht‑WebKit begrenzt wird */
  line-height: 1.3em;
  max-height: calc(1.3em * 8); /* 4 Zeilen */
  margin: 0 0 14px;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.leaflet-popup-content-wrapper {
  border-bottom-left-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25) !important; /* weicher, tiefer Schatten */
  overflow: hidden;
}

/* Marker-Label neben Pumptrack/Dirtpark-Pins */
.leaflet-marker-icon.marker-label {
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  transform: translateX(-50%);
  margin-top: 0 !important;
  left: 3px !important;
}

.leaflet-marker-icon.marker-label span {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 14px;
  color: #D94B2B; /* Gleicher Rotton wie Pin */
  text-shadow: 1px 1px 2px #fff, -1px -1px 2px #fff;
  white-space: nowrap;
  line-height: 1.2;
}

.trail-thumb {
  position: relative;
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
}
.trail-thumb.trail-dummy-thumbnail {
  background-size: cover;
  background-position: center;
  position: relative;
}
.trail-thumb.trail-dummy-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://www.mountainbike-freiburg.com/wp-content/uploads/2025/06/mtb-freiburg-logo-schwarz.png') center center / 75% auto no-repeat;
  filter: brightness(0) saturate(100%) invert(18%) sepia(15%) saturate(2500%) hue-rotate(105deg) brightness(0.95);
  opacity: 0.85;
}

@media (min-width: 1024px) {
  .trail-band {
    gap: 56px !important;                 /* Abstand zwischen Elementen */  
  }
 
  .trail-band svg {
	margin-right: -48px !important;
  }
}

.trail-band {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  padding: 5px 10px;
  display: flex;
  align-items: center;      /* vertikal zentrieren */
  justify-content: center;  /* horizontal zentrieren */
  gap: 17px;                 /* Abstand zwischen Elementen */
}

.trail-info .status-text {
	position: relative;
	bottom: 2.5px;
	font-size: 0.9rem;
}

.trail-info .status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    position: relative;
}

.trail-info .status {
	display: flex;
	gap: 6px;
	align-items: center;
	margin: 0 0 10px;
}
.trail-info .status .status-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	min-width: 10px;
	border-radius: 50%;
	position: relative;
	top: -1px;
	flex-shrink: 0;
}
/* Ampel colors for map popup dots */
.status-offen .trail-info .status-dot,
.trail-info .status-offen .status-dot { background-color: #809c75; }
.status-eingeschränkt-offen .trail-info .status-dot,
.status-eingeschraenkt-offen .trail-info .status-dot,
.trail-info .status-eingeschränkt-offen .status-dot,
.trail-info .status-eingeschraenkt-offen .status-dot { background-color: #c8cc44; opacity: 0.7; }
.status-gesperrt .trail-info .status-dot,
.trail-info .status-gesperrt .status-dot { background-color: #B02A30; opacity: 0.7; }
/* Ampel colors for map popup text */
.status-offen .trail-info .status-text { color: #809c75; }
.status-eingeschränkt-offen .trail-info .status-text,
.status-eingeschraenkt-offen .trail-info .status-text { color: #a8ac30; }
.status-gesperrt .trail-info .status-text { color: #B02A30; opacity: 0.7; }

.trail-band svg {
	margin-right: -14px;
}

.trail-info {
  padding: 24px 32px;
  color: #000 !important;
}

.trail-info h4 {
  margin: 0 0 6px;
  font-size: 24px;
}

.trail-info p {
/*  font-size: 13px; */
	line-height: 1.7em;
    font-weight: normal;
    margin: 0 0 14px;
}

.trail-info a {
  font-size: 13px;
  text-decoration: underline;
  box-shadow: none;
  text-decoration: none;
  /* background-color: #61CE6900; */
  font-family: var(--e-global-typography-accent-font-family), Sans-serif;
  font-weight: var(--e-global-typography-accent-font-weight);
  fill: var(--e-global-color-primary);
  color: var(--e-global-color-primary);
  border-style: solid;
  border-width: 1px 1px 1px 1px;
  border-color: #F1F4F0;
  /* border-radius: 0px 0px 0px 0px; */
  padding: 2.5%;
}

.trail-info a.first {
	margin-right: 12px;
}

/* Textlabel (Leaflet.TextPath) */
path.leaflet-interactive text {
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  font-weight: bold;
  font-size: 12px;
  fill: currentColor;
}

.leaflet-popup:not(.mtb-no-thumb) a.leaflet-popup-close-button {
	color: #fff !important;
}
/*
.leaflet-popup.mtb-no-thumb a.leaflet-popup-close-button {
	color: #000 !important;
}


@media (max-width: 450px) and (orientation: portrait) {
	.leaflet-popup-content {
		width: 240px;
	}
}
*/

#locateBtn.is-following {
	background: #fff url(/wp-content/uploads/2025/11/compass.png) center/15px 15px no-repeat;
}

#locateBtn:not(.is-following) {
	background: #fff url(/wp-content/uploads/2025/11/target.png) center/15px 15px no-repeat;
}

#searchToggleBtn {
	background: #fff url(/wp-content/uploads/2025/11/magnifying-glass.png) center/15px 15px no-repeat;
}

#listBtn {
	background: #fff url(/wp-content/uploads/2025/11/list.png) center/15px 15px no-repeat;	
}

.leaflet-container a.leaflet-popup-close-button {
    top: 2px;
    width: 32px;
    height: 32px;
    font: 18px / 24px Tahoma, Verdana, sans-serif;
    color: #757575;
}

.mtb-user-location-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: #2a7fff;
  box-shadow: 0 0 0 4px rgba(42,127,255,0.35);
}

.leaflet-control-zoom #locateBtn {
  font-size: 16px;
  line-height: 26px;
  text-align: center;
}

/* POI-Hover: weicher weißer Glow wie Trail-Halo */
.leaflet-marker-icon.mtb-poi-hover {
  /* sicherstellen, dass der Schatten nicht abgeschnitten wird */
  overflow: visible;
}

/* SVG/PNG selbst umranden – analog zur weißen Trail-Halo-Linie */
.leaflet-marker-icon.mtb-poi-hover img {
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.35),  /* weicher „Ring“ in etwa wie die 12px/0.35-Linie */
    0 0 10px rgba(0, 0, 0, 0.35);         /* leichter dunkler Glow für Kontrast */
  transition: box-shadow 0.15s ease-out;
}
/*
.segment-badge {
	transition: opacity 160ms ease;
}*/

/* Falls nicht bereits vorhanden: Map-Container als Positionierungs-Referenz */
#mtb-trailmap {
  position: relative;
}

/* Overlay nur innerhalb des Karten-Containers */
.mtb-fs-hint-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1003; /* über Leaflet-Controls (typisch ~1000) */
}

/* Map-Container als Bezug */
#mtb-trailmap { position: relative; }

/* Overlay nur über der Karte */
.mtb-fs-hint-overlay {
  position: absolute;
  inset: 0;
  z-index: 1003;          /* über Leaflet-Controls */
  pointer-events: none;   /* Map bleibt klickbar, außer auf UI-Elementen */
}

/* X oben rechts (klickbar) */
.mtb-fs-hint .mtb-fs-close,
.mtb-fs-close {
  position: absolute;
  top: -4px;
  right: 12px;
  padding: 0 !important;
  color: #fff;
  border: 0 !important;
  width: 36px;
  height: 36px;
  cursor: pointer;
  pointer-events: auto;
  background: transparent;
  font-size: 2rem !important;
  color: #FFF !important; 
}

.mtb-fs-close:hover {
	background-color: transparent !important;
}

/* Wrapper, um den Text unten zu platzieren (klickbar) */
.mtb-fs-hint-wrap {
  position: absolute;
  left: 50%;
  bottom: 25%;
  transform: translateX(-50%);
  pointer-events: auto;
}

/* Modal-Karte (nur inhaltliche Styles – kein Box/Background) */
.mtb-fs-hint {
  position: relative;
}

.mtb-fs-hint-wrapper {
	width: 100%;
	height: 100%;
	position: absolute;
}

/* bisherige Gesamtanimation am Wrapper neutralisieren */
.mtb-fs-hint-wrapper {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Startzustand für alle Teile: leicht von oben (8px), transparent */
.mtb-fs-hint-wrapper .legend li,
.mtb-fs-hint-wrapper .mtb-fs-actions .mtb-fs-btn,
.mtb-fs-hint-wrapper p,
.mtb-fs-close {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease-out,
    transform 0.35s ease-out;
  will-change: opacity, transform;
}

/* Sichtbar-Zustand: wenn das Overlay „is-visible“ wird */
.mtb-fs-hint-overlay.is-visible .legend li,
.mtb-fs-hint-overlay.is-visible .mtb-fs-actions .mtb-fs-btn,
.mtb-fs-hint-overlay.is-visible p,
.mtb-fs-hint-overlay.is-visible .mtb-fs-close {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger (Delay) – von oben nach unten */

/* 0) Close-Button (schnell sichtbar) */
.mtb-fs-hint-overlay.is-visible .mtb-fs-close {
  transition-delay: .08s;
}

/* 1) Legend-Einträge (6 Stück) */
.mtb-fs-hint-overlay.is-visible .legend li:nth-child(1) { transition-delay: .10s; }
.mtb-fs-hint-overlay.is-visible .legend li:nth-child(2) { transition-delay: .14s; }
.mtb-fs-hint-overlay.is-visible .legend li:nth-child(3) { transition-delay: .18s; }
.mtb-fs-hint-overlay.is-visible .legend li:nth-child(4) { transition-delay: .22s; }
.mtb-fs-hint-overlay.is-visible .legend li:nth-child(5) { transition-delay: .26s; }
.mtb-fs-hint-overlay.is-visible .legend li:nth-child(6) { transition-delay: .30s; }

/* 2) CTA-Button */
.mtb-fs-hint-overlay.is-visible .mtb-fs-actions .mtb-fs-btn { transition-delay: .36s; }

/* 3) Tipp-Text */
.mtb-fs-hint-overlay.is-visible .mtb-fs-hint-wrapper p { transition-delay: .44s; }

/* Motion-Preference beachten */
@media (prefers-reduced-motion: reduce) {
  .mtb-fs-hint-wrapper .legend li,
  .mtb-fs-hint-wrapper .mtb-fs-actions .mtb-fs-btn,
  .mtb-fs-hint-wrapper p,
  .mtb-fs-close {
    transition: none !important;
    transform: none !important;
  }
}

.mtb-fs-hint-wrapper span {
	font-weight: 700;
}

.mtb-fs-hint-wrapper p {
  font-size: 1.0rem;
  color: #fff;
  line-height: 1.4;
  position: absolute;
  bottom: 12px;
  left: 18px;
  font-weight: 500;
}

.mtb-fs-hint-wrapper ul {
	top: 12px;
	left: 14px;
	position: absolute;
	list-style: none;
}

.mtb-fs-hint-wrapper ul > li {
	color: #fff;
	padding: 5px 0 6.5px 0;
	font-size: 1.0rem;
	opacity: 0.9;
}

.mtb-fs-hint .mtb-fs-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
}

.mtb-fs-hint .mtb-fs-btn {
  color: #fff;
  border: 1px solid #fff;
  border-radius: 2px;
  padding: 10px 14px;
  cursor: pointer;
  background: transparent;
}

.mtb-fs-hint .mtb-fs-btn:hover,
.mtb-fs-hint .mtb-fs-btn:active {
  background: transparent !important;
}

/* Overlay über der Karte, langsamer Fade-in */
.mtb-fs-hint-overlay {
  position: absolute;
  inset: 0;
  z-index: 1003;
  opacity: 0;
  transition: opacity 800ms cubic-bezier(.22,.61,.36,1);
  pointer-events: none; /* Map bleibt bedienbar, Buttons/X werden unten aktiv gesetzt */
  will-change: opacity;
}

/* Inhalt leicht hochfahren + langsam einblenden */
.mtb-fs-hint-wrapper {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 800ms cubic-bezier(.22,.61,.36,1), transform 800ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}

/* Sichtbar-Zustand (wird per JS gesetzt) */
.mtb-fs-hint-overlay.is-visible { opacity: 1; }
.mtb-fs-hint-overlay.is-visible .mtb-fs-hint-wrapper {
  opacity: 1;
  transform: none;
}

/* Klickbare Elemente wieder aktivieren */
.mtb-fs-hint-wrap,
.mtb-fs-hint .mtb-fs-btn,
.mtb-fs-close { pointer-events: auto; }

/* Optional: Bewegungen für Nutzer mit „Bewegung reduzieren“ abschalten */
@media (prefers-reduced-motion: reduce) {
  .mtb-fs-hint-overlay,
  .mtb-fs-hint-wrapper {
    transition: none !important;
  }
}

.mtb-fs-info {
  position: absolute;
  top: 4px;
  right: 12px;
  width: 36px;
  height: 36px;
  color: #fff;
  background: transparent !important;
  padding: 0 !important;
  border: 0px !important;
  display: none;             /* per JS auf flex gesetzt */
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 1004;             /* über Leaflet-Controls/Overlay-X */
  transition: background 160ms ease, transform 120ms ease, opacity 160ms ease;
  
}
.mtb-fs-info:active { transform: scale(0.98); }
.mtb-fs-info svg { width: 22px; height: 22px; display: block; }

/* Lite-Variante: ohne Fullscreen-Button und ohne Tipp-Text */
.mtb-fs-hint-overlay.is-lite .mtb-fs-hint-wrap { display: none !important; }
.mtb-fs-hint-overlay.is-lite .mtb-fs-hint-wrapper p { display: none !important; }


.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 0px !important;
}

.leaflet-bar a {
	border-bottom: 1px #f4f4f4 !important;
}

.leaflet-touch .leaflet-bar a:hover {
	background-color: #f4f4f4 !important
}

.leaflet-touch .leaflet-bar a {
	width: 36px;
	height: 36px;
	line-height: 36px;
}

/* Top‑Center Wrapper nur im Fullscreen sichtbar */
.mtb-top-center {
  position: absolute;
  bottom: 17%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1006; /* über Controls/Popups */
  width: min(700px, 92vw);
  display: none;           /* nur im Fullscreen aktiv */
  pointer-events: none;
}
.mtb-top-center .mtb-search {
  pointer-events: auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  overflow: hidden;
}
.mtb-search__input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 12px 14px;
  font-size: 16px; /* iOS: kein Zoom */
}

.mtb-search__list {
  max-height: 55vh;
  overflow-y: auto;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border-top: 1px solid #eee;
}
.mtb-search__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.mtb-search__item:hover,
.mtb-search__item.is-active {
  background: #f5f7fa;
}
.mtb-search__badge {
  flex: 0 0 auto;
  width: 42px; height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #fff;
}
.mtb-search__badge--trail { background:#1565c0; }
.mtb-search__badge--poi   { background:#2e7d32; }
.mtb-search__title {
  font: 600 14px/1.25 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.mtb-search__meta {
  margin-left: auto;
  font: 12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #667085;
}

/* Leere/Hint-Zeile */
.mtb-search__empty {
  padding: 10px 14px;
  color: #667085;
  font: 13px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

#searchToggleBtn {
  display: block;
  text-align: center;
  color: #000; /* Icon-Farbe */
}
#searchToggleBtn svg { pointer-events: none; }

/* Overlay bleibt drüber, lässt aber generell Klicks durch */
.mtb-trail-list-overlay {
  position: absolute;
  z-index: 1007; /* über Suche (1006) */
  top: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

/* Standard: zu → nicht sichtbar, nicht fokussierbar, nicht klickbar */
.mtb-trail-list {
  margin: calc(env(safe-area-inset-top, 0px) + 8px) auto 0;
  width: min(780px, 95vw);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transform: translateY(-16px);
  opacity: 0;
  visibility: hidden;        /* verhindert Fokus und Hit-Tests */
  pointer-events: none;      /* keine Maus-/Touch-Events */
  transition: transform 180ms ease, opacity 180ms ease, visibility 0s linear 180ms;
  overflow-x: hidden;
  will-change: transform, opacity;
  /* bestehend lassen: transform/opacity/visibility usw. */
  max-height: 80vh;              /* oder 70vh/75vh nach Geschmack */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iPhone Momentum-Scroll */
}

/* Offen → klickbar, sichtbar */
.mtb-trail-list.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;       /* sofort sichtbar */
  pointer-events: auto;      /* Panel fängt jetzt Events */
  transition: transform 180ms ease, opacity 180ms ease;
}

.mtb-trail-list__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 6px 14px; border-bottom: 1px solid #e5e7eb;
}
.mtb-trail-list__title { font-weight: 600; }

/* Parent bleibt wie bei dir, kein Flex nötig */
.mtb-trail-list__body {
  max-height: 70vh;              /* Wert nach Bedarf */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}


.mtb-trail-list__close {
	border: 1px solid #fff !important;
}

.mtb-trail-list__close:hover {
	background-color: #fff !important;
	color: #000 !important;
}

.mtb-trail-list__ul {
  list-style: none; margin: 0; padding: 8px;
}

.mtb-trail-list__li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: 10px; cursor: pointer;
}

.mtb-trail-list__li:hover { background: #f5f7fb; }
.mtb-trail-list__badge {
  flex: 0 0 auto; width: 42px; height: 24px; border-radius: 6px;
  display: grid; place-items: center; font-weight: 700; color: #fff;
  background: #0ea5e9;
}

.mtb-trail-list__name { font-weight: 600; }
.mtb-trail-list__meta { color: #6b7280; font-size: 12px; margin-left: auto; }

/* Basis: im Control-Pane, daher z-index ohnehin ~1000 */
.leaflet-control.mtb-watermark {
  pointer-events: none;
  margin: 0; /* wir steuern Abstände mit safe-area */
}

/* Position mit Safe-Area */
.leaflet-bottom.leaflet-right .leaflet-control.mtb-watermark {
  margin-right: 20px;
  margin-bottom: 10px;
}

.leaflet-control.mtb-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
@media (max-width: 767px) {
  .leaflet-pseudo-fullscreen .leaflet-control.mtb-watermark { position: fixed; right: 12px; bottom: 12px; right: 0; bottom: 0; }
  .leaflet-pseudo-fullscreen .mtb-fs-info { display: none !important; }
}