/* Console autocomplete dropdown.
   Positioned absolutely under the console input by JS; visuals match
   the editor's tooltip styling (var(--cm-*) tokens defined in
   tokens.css and editor.css). */

.console-autocomplete-dropdown {
  position: absolute;
  z-index: 1000;
  max-height: calc(8 * 2.4rem);
  overflow-y: auto;
  background-color: var(--cm-bg, #1e1e1e);
  color: var(--cm-fg, #e0e0e0);
  border: 1px solid var(--color-border, #444);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.console-autocomplete-row {
  display: flex;
  align-items: baseline;
  gap: 0.75em;
  padding: 0.3em 0.6em;
  cursor: pointer;
  white-space: nowrap;
}

.console-autocomplete-row[aria-selected="true"] {
  background-color: var(--cm-selection, #264f78);
}

.console-autocomplete-row:hover {
  background-color: var(--cm-selection, #264f78);
}

.console-autocomplete-name {
  font-weight: 600;
}

.console-autocomplete-row.kind-cvar .console-autocomplete-name {
  color: var(--cm-keyword, #569cd6);
}

.console-autocomplete-row.kind-command .console-autocomplete-name {
  color: var(--cm-string, #ce9178);
}

.console-autocomplete-row.kind-sourcemod .console-autocomplete-name {
  color: var(--cm-number, #884488);
}

/* Color legend rendered under the console input, mirroring the
   three name colors used in dropdown rows. */
.console-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2em;
  margin-top: 0.4em;
  padding: 0 0.2em;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--color-muted, #888);
}

.console-color-legend-swatch {
  font-weight: 600;
}

.console-color-legend-swatch.swatch-cvar {
  color: var(--cm-keyword, #569cd6);
}

.console-color-legend-swatch.swatch-command {
  color: var(--cm-string, #ce9178);
}

.console-color-legend-swatch.swatch-sourcemod {
  color: var(--cm-number, #884488);
}

.console-autocomplete-desc {
  color: var(--color-muted, #888);
  font-size: 0.9em;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40em;
}
