/* === Offcanvas als Expandable Bottom Sheet auf Mobile === */
@media (max-width: 767.98px) {
  .offcanvas-end {
    /* Verstecke die Offcanvas standardmäßig komplett unter dem Bildschirm */
    bottom: -100vh;
    height: 100vh;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    transition: bottom 0.3s ease-out;
    overflow-y: auto;
    touch-action: pinch-zoom;
  }

  /* Wenn geöffnet: ziehe nach oben, bis 80% der Höhe */
  .offcanvas-end.show {
    bottom: 0;
  }

  /* Optional: Greifbalken für Benutzerhinweis */
  .offcanvas-end::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background-color: #ccc;
    border-radius: 2px;
    margin: 8px auto;
    opacity: 0.5;
  }

  /* Verhindere, dass der Body mitscrollt, wenn Offcanvas offen ist */
  body.offcanvas-open {
    overflow: hidden;
  }
}

/* === Desktop: Standard-Offcanvas rechts === */
@media (min-width: 768px) {
  .offcanvas-end {
    width: 400px;
    bottom: auto;
    height: auto;
    border-radius: 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
  }

  .offcanvas-end.show {
    bottom: auto;
  }

  /* Auf Desktop: Kein Greifbalken */
  .offcanvas-end::before {
    display: none;
  }
}

#map {
  position: relative;
  z-index: 1;
}