.wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background-color: var(--chat-input-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-3);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  min-height: 30px;
}

.trigger:hover:not(:disabled),
.trigger:focus {
  outline: none;
  border-color: var(--text-dim);
}

.trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.triggerLabel {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.triggerLabelMuted {
  color: var(--text-dim);
}

.chevron {
  color: var(--text-dim);
  flex-shrink: 0;
}

.popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  max-height: 320px;
  overflow: hidden;
}

.searchWrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--divider);
}

.searchIcon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.searchInput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  padding: 0;
}

.searchInput::placeholder {
  color: var(--text-dim);
}

.list {
  flex: 1;
  overflow-y: auto;
  padding: 4px;
}

.item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  gap: var(--space-2);
}

.item:hover,
.itemActive {
  background: var(--hover-bg);
}

.itemSelected .itemLabel {
  color: var(--accent-primary);
}

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

.check {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.emptyState {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

.statusLine {
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid var(--divider);
}
