.leaflet-control-geocoder {
  border-radius: 2px;
  background: white;
  min-width: 26px;
  min-height: 26px;
}

.leaflet-touch .leaflet-control-geocoder {
  min-width: 26px;
  min-height: 26px;
}

.leaflet-control-geocoder a,
.leaflet-control-geocoder .leaflet-control-geocoder-icon {
  border-bottom: none;
  display: inline-block;
}

.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a {
  width: inherit;
  height: inherit;
}

.leaflet-control-geocoder a:hover,
.leaflet-control-geocoder .leaflet-control-geocoder-icon:hover {
  border-bottom: none; 
  display: inline-block;
  background-color: #AAB315;
}

.leaflet-control-geocoder-form {
  display: none;
  vertical-align: middle;
}
.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form {
  display: inline-block;
}
.leaflet-control-geocoder-form input {
  font-size: 120%;
  border: 0;
  background-color: transparent;
  width: 246px;
  padding-left: 5px;
}

.leaflet-control-geocoder-icon {
  border-radius: 2px;
  width: 26px;
  height: 26px;
  border: none;
  background-color: #005B79;
  background-image: url(images/geocoder3.png);
  background-repeat: no-repeat;
  background-size: 16px auto;
  background-position: center;
  cursor: pointer;
}

.leaflet-touch .leaflet-control-geocoder-icon {
  width: 26px;
  height: 26px;
}

.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon {
  background-image: url(images/throbber.gif);
}

.leaflet-control-geocoder-form-no-error {
  display: none;
}

.leaflet-control-geocoder-form input:focus {
  outline: none;
}

.leaflet-control-geocoder-form button {
  display: none;
}
.leaflet-control-geocoder-error {
  margin-top: 8px;
  margin-left: 8px;
  display: block;
  color: #444;
}

.leaflet-control-geocoder-alternatives {
  max-height: 300px;
  width: 250px; /* Oder eine kleinere Breite, falls du sie noch schmaler willst */
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
  cursor: grab;
  user-select: none;
  position: relative;
  z-index: 1001;
  padding: 0px !important;
}


/* **Während Dragging (Optische Anzeige)** */
.leaflet-control-geocoder-alternatives:active {
  cursor: grabbing;
}


.leaflet-control-geocoder-alternatives-minimized {
  display: none;
  height: 0;
}

.leaflet-control-geocoder-alternatives li {
  white-space: nowrap;
  display: block;
  overflow: hidden;
  padding: 8px 6px;
  text-overflow: ellipsis;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
  color: black;
}

.leaflet-control-geocoder-alternatives li a,
.leaflet-control-geocoder-alternatives li a:hover {
  width: inherit;
  height: inherit;
  background: inherit;
  border-radius: inherit;
  text-align: left;
  color: black;
}

.leaflet-control-geocoder-alternatives li:last-child {
  border-bottom: none;
}

.leaflet-control-geocoder-alternatives li:hover,
.leaflet-control-geocoder-selected {
  background-color: #f5f5f5;
  color: black;
}

.leaflet-control-geocoder-address-detail {
}
.leaflet-control-geocoder-address-context {
  color: #666;
}

/* --- Scrollbar-Styling für bessere Optik --- */
.leaflet-control-geocoder-alternatives::-webkit-scrollbar {
  width: 6px;
}

.leaflet-control-geocoder-alternatives::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.leaflet-control-geocoder-alternatives::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Ergebnissliste Konfiguration für Drag & Scroll */
/* Mobile Geräte */
@media (max-width: 768px) { 
  .leaflet-control-geocoder-alternatives {
    padding-right: 0 !important;
    padding-left: 0 !important; 
    padding-top: 0 !important; 
    padding-bottom: 0 !important; 
    width: 250px !important;
  }

  /* Dickere Scrollbar für Touch */
  .leaflet-control-geocoder-alternatives::-webkit-scrollbar {
    width: 8px;
  }

  .leaflet-control-geocoder-alternatives::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
  }

  .leaflet-control-geocoder-alternatives::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.8);
  }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) { 
  .leaflet-control-geocoder-alternatives {
    padding-right: 0 !important;
    padding-left: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: 270px !important;
  }

  /* Dünnere Scrollbar für Tablets */
  .leaflet-control-geocoder-alternatives::-webkit-scrollbar {
    width: 7px;
  }

  .leaflet-control-geocoder-alternatives::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
  }

  .leaflet-control-geocoder-alternatives::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.7);
  }
}

/* Desktop */
@media (min-width: 1025px) { 
  .leaflet-control-geocoder-alternatives {
    padding: 0 !important;
    width: auto !important;
    max-width: 300px !important;
  }

  /* Dünnste Scrollbar für Desktop */
  .leaflet-control-geocoder-alternatives::-webkit-scrollbar {
    width: 6px;
  }

  .leaflet-control-geocoder-alternatives::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
  }

  .leaflet-control-geocoder-alternatives::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.6);
  }
}
