/* Wrapper um das Such‑Formular */
.form-table {
  background-color: var(--color-card);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

/* Die eigentliche Tabelle im Form-Wrapper */
.form-table table {
  width: 100%;
  border-collapse: collapse;
}

/* Beschriftungszellen */
.form-table td:first-child {
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  width: 8rem; /* fixe Breite für Labels */
}

/* Eingabezellen */
.form-table td:last-child {
  padding: 0.5rem;
}

/* Inputs gleichmäßig groß und passend gestylt */
.form-table input, select {
  width: 100%;
  max-width: 20rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-bg);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background-color: #fff;
  transition: border-color .2s ease;
}

.form-table input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-table .form-actions {
  display: flex;
  justify-content: center;  /* Buttons horizontal zentrieren */
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Style für die Buttons */
.form-table button {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-bg);
  border-radius: var(--radius-sm);
  background-color: #fff;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}

.form-table button:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary);
  color: #fff;
}



.autocomplete-wrapper {
  position: relative;
  overflow: visible;
}

.autocomplete-wrapper .ac-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  
  margin: 4px 0 0;       /* kleiner Abstand zum Input */
  padding: 0;            /* keine Einrückung */
  list-style: none;      /* entfernt die Listenpunkte */
  
  max-height: 200px;     /* nach Wunsch anpassen */
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 1000;
}

.autocomplete-wrapper .ac-list li {
  margin: 0;             /* keine Abstände zwischen den Items */
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  /* optional: heller Trennstrich zwischen den Einträgen */
  border-bottom: 1px solid #eee;
}

.autocomplete-wrapper .ac-list li:last-child {
  border-bottom: none;   /* beim letzten Item den Strich weglassen */
}

.autocomplete-wrapper .ac-list li.active,
.autocomplete-wrapper .ac-list li:hover {
  background-color: #f5f5f5;
}
