@keyframes autocomplete-spin {
  to { transform: rotate(360deg); }
}

@layer modules {
  .autocomplete-suggestion {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: absolute;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    cursor: pointer;
    max-width: 500px;
    z-index: 1000;
    font-size: 0.875rem;
    color: #374151;
    transition: background-color 0.2s ease;
  }

  .autocomplete-suggestion:hover {
    background-color: #f3f4f6;
  }

  .autocomplete-shortcut-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
  }

  .autocomplete-shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    padding: 0.125rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: #f9fafb;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .autocomplete-suggestion-text {
    flex: 1;
    padding-right: 0.5rem;
  }

  .autocomplete-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border: 2px solid #d1d5db;
    border-top-color: #3b82f6;
    border-radius: 9999px;
    animation: autocomplete-spin 0.75s linear infinite;
  }
}
