/* Autocomplete Container */
.autocomplete {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 300px;
  font-family: system-ui, sans-serif;
}

/* Eingabefeld */
.autocomplete input {
  padding: 10px 14px;
  font-size: 16px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.autocomplete input:focus {
  border-color: #1e90ff;
  box-shadow: 0 0 4px rgba(30, 144, 255, 0.4);
  outline: none;
}

/* Vorschlagsliste */
.autocomplete-items {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  background-color: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left; 
  animation: fadeIn 0.15s ease-in-out;
  
  max-height: 220px; /* z. B. für 5–6 Einträge */
  overflow-y: auto;
  scroll-behavior: smooth;
}


/* Einzelne Vorschläge */
.autocomplete-items div {
  padding: 10px 14px;
  cursor: pointer;
  text-align: left; 
  transition: background-color 0.15s ease-in-out;
}

.autocomplete-items div:hover {
  background-color: #f0f8ff;
}

/* Aktives Item (per Tastatur ausgewählt) */
.autocomplete-active {
  background-color: #1e90ff !important;
  color: white;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
