/* VScode-like autocomplete */

#autocomplete-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 24px;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

#autocomplete-dropdown.visible {
  display: block;
}

#autocomplete-dropdown::-webkit-scrollbar {
  width: 5px;
}
#autocomplete-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
#autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Individual items */
.ac-item {
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--fg);
}

.ac-item .ac-cmd {
  color: var(--fg-bright);
  font-weight: bold;
  min-width: 80px;
}

.ac-item .ac-desc {
  color: var(--fg-dim);
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-item:hover,
.ac-item.active {
  background: var(--selection-bg);
}

.ac-item.active .ac-cmd,
.ac-item:hover .ac-cmd {
  color: var(--fg-bright);
}

/* No results */
.ac-empty {
  padding: 8px 12px;
  color: var(--fg-faint);
  font-style: italic;
}
