.wrap {
  position: relative;
}

.trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.trigger:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.trigger:disabled {
  opacity: 0.4;
  cursor: default;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
}

.badge {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: var(--accent-primary);
  box-shadow: 0 0 0 1.5px var(--sidebar-bg);
}

.dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: min(340px, calc(100vw - 28px));
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 40;
  animation: fadeUp 160ms var(--ease-out-quick);
}

.item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  font-size: var(--fs-base);
  font-family: inherit;
  transition: background var(--transition-fast);
}

.item:hover:not(:disabled) {
  background: var(--hover-bg);
}

.item:disabled {
  cursor: default;
  opacity: 0.45;
}

.itemActive {
  background: var(--selected-bg);
  color: var(--accent-primary);
}

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

.itemError .itemIcon,
.itemError .itemMeta {
  color: var(--diff-removed-text);
}

.itemIcon {
  display: flex;
  align-items: center;
  width: 16px;
  min-height: 18px;
  justify-content: center;
  flex-shrink: 0;
}

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

.itemLabel {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
  color: currentColor;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.itemDetail {
  color: var(--text-dim);
  font-size: var(--fs-xs);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.itemMeta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  line-height: 1.4;
  flex-shrink: 0;
}

.remoteGroup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-md);
}

.remoteGroupActive {
  background: var(--selected-bg);
  color: var(--accent-primary);
}

.remoteGroupError {
  color: var(--diff-removed-text);
}

/* Mid-turn "queued enable" visual state — Radio icon stays (no spinner —
 * pending ≠ enabling), accent-primary tint and reduced opacity signal
 * "armed but not yet active." Mirrors the language of `.queuedLabel` in
 * ChatPanel.module.css: a small uppercase chip in the meta column. */
.remoteGroupPending {
  color: var(--accent-primary);
}

.remoteGroupPending .itemIcon {
  opacity: 0.75;
}

.remoteGroupPending .itemMeta {
  text-transform: uppercase;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.remoteGroupActive .itemMeta,
.remoteGroupError .itemIcon,
.remoteGroupError .itemMeta,
.remoteGroupPending .itemMeta {
  color: currentColor;
}

.remoteSummary {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  color: inherit;
  border: none;
  border-radius: var(--radius-md);
  text-align: left;
  cursor: pointer;
  font-size: var(--fs-base);
  font-family: inherit;
  transition: background var(--transition-fast);
}

.remoteSummary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--hover-bg);
}

.remoteSummary[aria-disabled="true"] {
  cursor: default;
}

.remoteSummary:disabled {
  cursor: default;
}

.remoteActions {
  display: flex;
  gap: 4px;
  padding-right: 8px;
}

.actionButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--hover-bg);
  color: var(--text-muted);
  cursor: pointer;
}

.actionButton:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--selected-bg);
}

.actionButton:disabled {
  cursor: default;
  opacity: 0.45;
}

.spin {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
