/* ============================================================
   Suggestions
   Owner autocomplete. Floats over the form so the layout
   doesn't jump as matches appear and disappear.
   ============================================================ */

.chips-field {
  position: relative;
}

.suggest {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-3);
  border-radius: var(--r);
  padding: var(--space-2);
  box-shadow: 0 12px 28px rgb(0 0 0 / .45);
  animation: suggest-in .13s cubic-bezier(.2, 0, .2, 1);
}

/* ---------- Item ---------- */

.suggest__item {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: var(--space-3) var(--space-4);
  font: inherit;
  font-size: var(--fs-base);
  color: var(--text-2);
}

.suggest__item:hover {
  background: var(--hover);
}

.suggest__item.is-active {
  background: var(--select-bg-hover);
  color: var(--text);
}

/* One flex item, so the gap can't land between the tinted run and the rest */
.suggest__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* <b> marks the substring that matched what you typed */
.suggest__item b {
  font-weight: var(--fw-medium);
  color: var(--text);
}

.suggest__item.is-active b {
  color: var(--text);
}

.suggest__avatar {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hover-strong);
  color: var(--accent-lt);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
}

/* ---------- Footer hint ---------- */

.suggest__foot {
  padding: var(--space-3) var(--space-4) var(--space-2);
  margin-top: var(--space-2);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-5);
}
