.command-autocomplete {
  position: absolute;
  z-index: 12;
  right: 24px;
  bottom: calc(100% + 1px);
  left: 52px;
  overflow: hidden;
  border: 1px solid rgba(113, 221, 201, 0.28);
  border-bottom-color: rgba(113, 221, 201, 0.18);
  border-radius: 12px 12px 0 0;
  background: rgba(3, 10, 12, 0.97);
  box-shadow: 0 -22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px) saturate(112%);
  -webkit-backdrop-filter: blur(14px) saturate(112%);
}

.command-autocomplete[hidden] {
  display: none;
}

.command-autocomplete-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #83918f;
  font: 500 8px/1.3 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.command-autocomplete-head span:first-child {
  color: var(--mint);
}

.command-autocomplete-list {
  max-height: min(320px, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(113, 221, 201, 0.26) transparent;
}

.command-autocomplete-option {
  position: relative;
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr) 18px;
  width: 100%;
  gap: 14px;
  align-items: center;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: transparent;
  color: #dfe7e5;
  text-align: left;
  cursor: pointer;
}

.command-autocomplete-option:last-child {
  border-bottom: 0;
}

.command-autocomplete-option::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  content: "";
  background: linear-gradient(180deg, var(--mint), var(--orange));
  opacity: 0;
  transform: scaleY(0.35);
  transition: opacity 160ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.command-autocomplete-option:hover,
.command-autocomplete-option:focus-visible,
.command-autocomplete-option.is-active {
  outline: 0;
  background: linear-gradient(90deg, rgba(113, 221, 201, 0.09), rgba(113, 221, 201, 0.025) 66%, transparent);
}

.command-autocomplete-option:hover::before,
.command-autocomplete-option:focus-visible::before,
.command-autocomplete-option.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.command-autocomplete-command {
  color: #9aeadc;
  font: 600 11px/1.35 var(--mono);
  white-space: nowrap;
}

.command-autocomplete-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.command-autocomplete-copy strong {
  overflow: hidden;
  color: #f1f5f4;
  font: 600 10.5px/1.35 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-autocomplete-copy span {
  overflow: hidden;
  color: #778581;
  font: 9px/1.4 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-autocomplete-action {
  color: var(--orange);
  font: 11px/1 var(--mono);
  opacity: 0.46;
  text-align: right;
  transition: opacity 160ms ease, transform 160ms ease;
}

.command-autocomplete-option:hover .command-autocomplete-action,
.command-autocomplete-option:focus-visible .command-autocomplete-action,
.command-autocomplete-option.is-active .command-autocomplete-action {
  opacity: 1;
  transform: translateX(2px);
}

@media (max-width: 680px) {
  .command-autocomplete {
    right: 16px;
    left: 42px;
    max-height: 48vh;
    border-radius: 10px 10px 0 0;
  }

  .command-autocomplete-head {
    padding: 9px 10px;
  }

  .command-autocomplete-head span:last-child {
    display: none;
  }

  .command-autocomplete-option {
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr) 16px;
    gap: 10px;
    padding: 12px 10px;
  }

  .command-autocomplete-command {
    font-size: 12px;
  }

  .command-autocomplete-copy strong {
    font-size: 10px;
  }

  .command-autocomplete-copy span {
    font-size: 8.8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .command-autocomplete-option::before,
  .command-autocomplete-action {
    transition: none;
  }
}