.commandPalette {
  display: flex;
  flex-direction: column;
  height: min(560px, 75vh);
  max-height: 75vh;
  overflow: hidden;
}

.searchRow {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-block-end: 1px solid var(--separatorColor);
}

.searchIcon {
  flex: none;
  opacity: 0.5;
}

// Hint shown at the right end of the input bar
.hint {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75em;
  white-space: nowrap;
  opacity: 0.5;
}

.hintKey {
  padding: 0 5px;
  border-radius: 4px;
  font-family: monospace;
  background-color: var(--chatListItemBgPinned);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  max-width: 30%;
  font-weight: 500;

  :global(.avatar.small) {
    --local-avatar-size: 20px;
    --local-avatar-font-size: 12px;
  }
}

.crumbLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crumbSep {
  opacity: 0.4;
  margin-inline-start: 2px;
}

.filterCrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 2px 4px 2px 8px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9em;
  background-color: var(--chatListItemBgPinned);
}

.crumbRemove {
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  opacity: 0.6;

  &:hover {
    opacity: 1;
  }
}

input.searchInput {
  flex: 1;
  min-width: 80px;
  box-sizing: border-box;
  border: none;
  background: transparent;
  font-size: 1em;
}

.clearButton {
  flex: none;
  display: flex;
  align-items: center;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.6;
  padding: 2px;

  &:hover {
    opacity: 1;
  }
}

.list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-block: 6px;
}

.sectionHeader {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 2px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.5;
}

.item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.itemActive {
  background-color: var(--chatListItemBgPinned);

  .dimmed {
    opacity: 0.85;
  }
}

.itemIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  // Match the footprint of `Avatar small` so labels line up across rows.
  inline-size: 32px;
  block-size: 32px;
  flex: none;
  opacity: 0.7;
}

.accountAvatar:global(.avatar) :global(.content) {
  border-radius: 10%;
}

.itemText {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

// `flex: none` makes `.itemText` shrink
// (and ellipsize) to leave room for the hint.
.tabHint {
  flex: none;
  margin-inline-start: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75em;
  white-space: nowrap;
  border: 1px solid #888;
}

.freshMessageCounter {
  flex: none;
  margin-inline-start: 8px;
  color: var(--unreadCountLabel);
  background-color: var(--unreadCountBg);
  text-align: center;
  font-size: 9pt;
  height: 20px;
  padding: 0 5pt;
  line-height: 20px;
  border-radius: 10px;
  font-weight: bold;
}

.freshMessageCounterMuted {
  background-color: var(--unreadCountBgMuted);
}

.itemLabel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itemSubtitle {
  font-size: 0.85em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dimmed {
  opacity: 0.6;
}

.empty {
  padding: 24px 16px;
  text-align: center;
  opacity: 0.6;
}
