.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  background: #ff0000;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tag-pill .remove {
  color: #fff;
  cursor: pointer;
  font-weight: normal;
  font-size: 14px;
  transition: opacity 0.2s;
  opacity: 0.8;
}

.tag-pill .remove:hover {
  opacity: 1;
}

.pending-tag-pill {
  background: #05913A;
  color: #fff;
  padding: 5px 8px 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.pending-tag-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pending-tag-btn {
  background: transparent;
  border: none;
  color: #fff;
  padding: 0;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: normal;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  transition: opacity 0.15s;
  opacity: 0.8;
}

.pending-tag-btn:hover {
  opacity: 1;
}

.references-section {
  margin-top: 24px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.references-section h4 {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.reference-search {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.reference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  align-content: flex-start;
  flex-shrink: 0;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
}

.reference-list::-webkit-scrollbar {
  width: 6px;
}

.reference-list::-webkit-scrollbar-thumb {
  background: #3f3f3f;
  border-radius: 3px;
}

.reference-list::-webkit-scrollbar-track {
  background: transparent;
}

.reference-chip {
  background: #ff0000;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s;
  white-space: nowrap;
  height: fit-content;
}

.reference-chip .remove {
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: opacity 0.2s;
  opacity: 0.7;
}

.reference-chip .remove:hover {
  opacity: 1;
}

.reference-chip.empty {
  color: #666;
  font-style: italic;
  background: transparent;
  border: 1px dashed #3f3f3f;
  cursor: default;
}

.available-tags {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #0f0f0f;
  border: 1px solid #3f3f3f;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
}

.available-tags::-webkit-scrollbar {
  width: 6px;
}

.available-tags::-webkit-scrollbar-thumb {
  background: #3f3f3f;
  border-radius: 3px;
}

.available-tags::-webkit-scrollbar-track {
  background: transparent;
}

.available-tag {
  background: #ff0000;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
  height: fit-content;
}

.available-tag:hover {
  background: #cc0000;
}

.available-tag.empty {
  text-align: center;
  color: #666;
  font-style: italic;
  background: transparent;
  cursor: default;
  width: 100%;
  padding: 12px;
}

.available-tag.empty:hover {
  background: transparent;
}
