/*
 * CVR register search — the typeahead dropdown (slice 71).
 *
 * Reuses the dropdown component's floating-panel and item classes; this file
 * adds only what a *results* list needs over a menu: the relative anchor on
 * the field, list reset, the name/meta line pair, the inactive badge, and
 * the keyboard-active row.
 */

@layer components {
  .cvr-search {
    position: relative;
  }

  .cvr-search__list {
    margin: 0;
    list-style: none;
    max-height: 20rem;
    overflow-y: auto;
  }

  .cvr-search__item {
    /* name | meta | (inactive) on one row; meta hugs the name, badge trails. */
    gap: var(--space-2);
  }

  .cvr-search__item--active {
    background: var(--color-bg-hover-quiet);
  }

  .cvr-search__name {
    font-weight: 500;
  }

  .cvr-search__meta {
    color: var(--color-text-body);
    font-size: var(--text-xs);
    font-weight: 400;
  }

  .cvr-search__inactive {
    margin-left: auto;
    color: var(--color-text-body);
    font-size: var(--text-xs);
    font-style: italic;
  }

  .cvr-search__error {
    margin-top: var(--space-1);
    color: var(--color-danger);
    font-size: var(--text-sm);
  }

  .cvr-quick-add__panel {
    /* Room for the embedded search field — wider than a menu panel. */
    min-width: 20rem;
    padding: var(--space-2);
  }

  .cvr-quick-add__status {
    margin: var(--space-1) 0 0;
    color: var(--color-text-body);
    font-size: var(--text-sm);
  }
}
