/* ============================================================
   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: 4px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
  animation: suggest-in .13s cubic-bezier(.2, 0, .2, 1);
}

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

.suggest__item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 7px 8px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text-2);
}

.suggest__item:hover {
  background: rgba(255, 255, 255, .045);
}

.suggest__item.is-active {
  background: rgba(20, 184, 166, .14);
  color: var(--accent-lt2);
}

/* One flex item, so the gap can't land between the bolded 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: 700;
  color: var(--text);
}

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

.suggest__avatar {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 184, 166, .16);
  color: var(--accent-lt);
  font-size: 11px;
  font-weight: 700;
}

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

.suggest__foot {
  padding: 6px 8px 3px;
  margin-top: 3px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-5);
}
