html, body { 
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* Map immer vollflächig sichtbar – unabhängig von anderen Absolut-Elementen */
#map {
  position: fixed;
  inset: 0;           /* top/right/bottom/left: 0 */
}

.leaflet-top.leaflet-left {
  top: 20px; /* Abstand von oben in Pixeln anpassen */
}

#toggleBar { 
  position: absolute; 
  z-index: 1000; 
  bottom: 40px; 
  left: 8px; 
  background: rgba(255,255,255,0.95); 
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); 
  border-radius: 10px; 
  padding: 8px 12px; 
}

.toggle { display: flex; align-items: center; gap: 8px; }
.toggle input { transform: scale(1.2); }

.custom-popup { font-size: 14px; }

.label-badge { 
  background-color: red; 
  color: white; 
  padding: 2px 6px; 
  border-radius: 4px; 
  font-size: 12px; 
  font-weight: bold; 
  box-shadow: 0 0 2px rgba(0,0,0,0.4); 
  transform: translateY(-10px); 
}

button { 
  margin-top: 6px; 
  padding: 6px 10px; 
  border: none; 
  border-radius: 6px; 
  background: #0d6efd; 
  color: white; 
}

button.secondary { background: #6c757d; }

.loc-btn {
  position: absolute;
  bottom: 60px; /* unterhalb deines Push-Kippschalters */
  right: 10px;
  z-index: 1000;
  background: #fff;
  color: #000;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

#searchBar{
  position:absolute; 
  top: calc(env(safe-area-inset-top, 0) + 30px);
  left:55%; 
  transform:translateX(-50%);
  z-index:1000;
  background:#fff;
  padding:6px 8px; 
  border-radius:10px; 
  box-shadow:0 2px 8px rgba(0,0,0,.15);
  display:flex; 
  gap:6px; 
  align-items:center;
}

#searchBar input{
  width:200px; 
  padding:6px 8px; 
  border:1px solid #ddd; 
  border-radius:8px; 
  font-size:14px;
  color: #111;
}

#searchBar button{
  padding:6px 10px; 
  border:1px solid #bbb; 
  border-radius:8px; 
  background:#ffffff; 
  color: #111;
  font-weight: 600;
  cursor:pointer;
}
#searchBar button:hover{ background:#f1f3f5; }

/* kleines X direkt neben dem Input */
#clearSearchBtn {
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;                  /* Vorschlag 2: margin neutralisieren */
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 18px;
  font-weight: 700;
  border: 1px solid #bbb;
  border-radius: 50%;
  background: #fff;
  color: #111;
  cursor: pointer;
}
#clearSearchBtn:hover { background: #f1f3f5; }
#clearSearchBtn:focus { outline: 2px solid #0d6efd; outline-offset: 2px; }

.fly-btn {
  position: absolute;         
  bottom: 50px;
  right: 20px;
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 50%;
  border: none;
  background-color: #fff;
  background-image: url('assets/mein_Standort.png');  
  background-size: 64%;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  cursor: pointer;
  z-index: 3000;              
  pointer-events: auto;       
}
.fly-btn:hover { background-color: #f5f5f5; }

.custom-popup .bench-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 15px;
}
.custom-popup .bench-msg {
  font-size: 14px;
}

/* =========================================================
   Button unten links (Fragezeichen)
   ========================================================= */
#helpBtn {
  position: absolute;
  bottom: 50px;
  left: 20px;
  background: #0078d7;
  color: white;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1000;
}

/* =========================================================
   Overlay-Hintergrund (halbtransparent)
   ========================================================= */
#helpOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  justify-content: center;
  align-items: flex-start; /* oben ausrichten */
  padding-top: calc(env(safe-area-inset-top, 0) ); /* ca. Hamburger-Höhe */
}
#helpOverlay.is-open { display: flex; }

/* =========================================================
   Popup-Inhalt (weißes Fenster)
   ========================================================= */
#helpContent {
  position: relative;              /* <— WICHTIG: Bezugspunkt für .closeTop */
  background: #fff;
  width: min(90vw, 600px);
  max-height: calc(100dvh - 120px);   /* Höhe auf Bildschirm begrenzt */
  overflow-y: auto;                  /* Scrollfunktion aktiviert */
  -webkit-overflow-scrolling: touch; /* sanftes Scrollen auf iOS */
  padding: 25px 20px;
  border-radius: 12px;
  font-family: sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* =========================================================
   Überschrift & Text
   ========================================================= */
#helpContent h2 {
  text-align: center;
  margin-bottom: 10px;
  margin-top: 0;
  font-size: 1.5em;
}

/* =========================================================
   Schließen-Button (oben rechts, als „×“)
   ========================================================= */
#helpContent .closeTop {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  color: #0078d7;
  font-size: 28px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

#helpContent .closeTop:hover {
  color: #005fa3;
}


/* =========================================================
   Hintergrund fixieren, wenn Anleitung offen ist
   ========================================================= */
body.modal-open {
  overflow: hidden;
}

/* Hamburger-Icon */
.hamburger {
  position: fixed;
  width: 28px; height: 22px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 2001;
  top: calc(env(safe-area-inset-top, 0) + 30px);
  left: calc(env(safe-area-inset-left, 0) + 12px);
}
.hamburger span {
  display: block;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Halbtransparenter Hintergrund beim offenen Menü */
#menuBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(1px);
  z-index: 1999; /* unter .side-menu (2000), über Inhalt */
  display: none; /* wird per JS ein/ausgeblendet */
}

/* Scrollen unterbinden, wenn Menü offen */
body.no-scroll { 
  overflow: hidden; 
  touch-action: none; 
}
body.lock-scroll { 
  position: fixed; 
  width: 100%; 
}

/* Seitenmenü */
.side-menu {
  position: fixed;
  top: 0; left: 0;
  width: 240px; height: 100%;
  background: #fff;
  box-shadow: 2px 0 6px rgba(0,0,0,0.2);
  padding: 60px 15px 20px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 2000;
  box-sizing: border-box;
}

.side-menu ul { list-style: none; padding:0; margin:0; }
.side-menu li { margin-bottom: 15px; }
.side-menu a, .side-menu button {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 0;
}

/* --- Unterer Bereich im Seitenmenü (Rechtliches) --- */
.side-menu hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 12px 0;
}

.side-menu a {
  display: block;
  padding: 6px 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.side-menu a:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Sichtbar */
.side-menu.active { transform: translateX(0); }
/* Hamburger-Animation bei Aktivierung */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(9px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-9px);
}

/* --- iOS Auto-Zoom auf Inputs verhindern --- */
input, select, textarea, button { 
  font-size: 16px; 
  -webkit-text-size-adjust: 100%;
}


/* ===== iOS Safe Area für Top-Bar / "Zur App" ===== */
:root { --safe-top: env(safe-area-inset-top, 0px); }

header.appbar {
  position: sticky;   /* bleibt oben kleben */
  top: 0;             /* am echten Viewport-Rand */
  padding-top: var(--safe-top);  /* Platz für Notch/Statusleiste */
  z-index: 50;
}

/* etwas Luft innen (optional) */
.appbar-inner { padding-top: 8px; }

