.autocomplete {
  position: relative;
  width: 100%;
  max-width: var(--control-width);
}

.autocomplete-input {
  width: 100%;
  cursor: pointer;
}

.autocomplete-panel {
  /* shared chrome in components/chips.css; padding frames the search box */
  padding: var(--space-1);
}

.autocomplete-panel.show {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.autocomplete-search {
  width: 100%;
  box-sizing: border-box;
}

.autocomplete-results {
  display: grid;
  gap: var(--space-1);
}

.autocomplete-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  min-height: 2rem;
}

.autocomplete-option.selected {
  background-color: var(--bg-accent);
  font-weight: 600;
}

.autocomplete-option-label {
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-option-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.autocomplete-empty {
  padding: var(--space-2);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* .autocomplete-chip / -chips / -remove live in components/chips.css */

.autocomplete-chip-label {
  color: var(--text-main);
}
