.container {
  position: relative;
  font-size: 13px;
}

.trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.15));
  border-radius: 6px;
  background: var(--color-background, #fff);
  color: var(--color-foreground, #1f2328);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1;
  min-height: 40px;
}

.trigger:hover {
  border-color: var(--color-border-emphasis, rgba(0, 0, 0, 0.3));
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}

.label {
  font-weight: 600;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  font-size: 14px;
  color: var(--color-foreground-muted, #656d76);
  font-variant-numeric: tabular-nums;
}

.chevron {
  color: var(--color-foreground-muted, #656d76);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.chevronOpen {
  transform: rotate(180deg);
}

.menuPositioner {
  z-index: 1000;
}

.menu {
  min-width: 260px;
  max-width: 360px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  background: var(--color-background, #fff);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.15));
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.menuList {
  margin: 0;
  padding: 0;
  list-style: none;
}

.item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px 8px 4px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--color-foreground, #1f2328);
}

.itemContent {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.itemLink {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.dragHandle {
  opacity: 0;
  color: var(--color-foreground-muted, #656d76);
  cursor: grab;
  flex-shrink: 0;
  padding: 2px;
}

.item:hover .dragHandle {
  opacity: 1;
}

.duplicateBtn {
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--color-foreground-muted, #656d76);
  cursor: pointer;
  flex-shrink: 0;
}

.duplicateBtn:hover {
  color: var(--color-foreground, #1f2328);
  background: var(--color-background-neutral-muted, rgba(0, 0, 0, 0.06));
}

.item:hover .duplicateBtn {
  opacity: 1;
}

.itemDragging {
  opacity: 0.5;
}

.dropIndicator {
  position: absolute;
  top: -1px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--color-border-accent-emphasis, #0969da);
  border-radius: 1px;
  pointer-events: none;
}

.dropZoneEnd {
  position: relative;
  padding-top: 8px;
  list-style: none;
}

.item:hover {
  background: var(--color-background-muted, #f6f8fa);
}

.item:focus-visible {
  outline: 2px solid var(--color-border-accent-emphasis, #0969da);
  outline-offset: -2px;
}

.itemActive {
  font-weight: 600;
  background: var(--color-background-accent-muted, #ddf4ff);
}

.itemActive:hover {
  background: var(--color-background-accent-muted, #ddf4ff);
}

.itemPrivate {
  opacity: 0.55;
}

.itemPrivate:hover {
  opacity: 1;
}

.privateIcon {
  color: var(--color-foreground-muted, #656d76);
  flex-shrink: 0;
  margin-left: 4px;
}

.separator {
  height: 1px;
  background: var(--color-border, rgba(0, 0, 0, 0.15));
  margin: 4px 8px;
  list-style: none;
}

.separatorRow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px 6px 4px;
  border-radius: 4px;
  list-style: none;
  cursor: default;
}

.separatorRow:hover .dragHandle {
  opacity: 1;
}

.separatorLine {
  flex: 1;
  height: 1px;
  background: var(--color-border, rgba(0, 0, 0, 0.15));
}

.addItem {
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--color-foreground-muted, #656d76);
  font-size: 12px;
  background: var(--color-background-muted, #f6f8fa);
}

.addItem:hover {
  background: var(--color-background-neutral-muted, rgba(0, 0, 0, 0.08));
  color: var(--color-foreground, #1f2328);
}

.addForm {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  list-style: none;
}

.addInput {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.15));
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.addInput:focus {
  border-color: var(--color-border-accent-emphasis, #0969da);
  box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.3);
}

.addSubmit {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  background: var(--color-background-accent-emphasis, #0969da);
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.addSubmit:hover {
  opacity: 0.9;
}

.addSubmit:disabled {
  opacity: 0.5;
  cursor: default;
}

.successMsg {
  padding: 4px 12px 6px;
  font-size: 11px;
  color: #1a7f37;
  font-weight: 500;
}
