.tag-input-container {
  position: relative;
  width: 100%;
}

.tag-input-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  min-height: 38px;
  border: 1px solid var(--vscode-input-border, #3c3c3c);
  border-radius: 4px;
  background: var(--vscode-input-background, #3c3c3c);
  cursor: text;
}

.tag-input-wrapper:focus-within {
  border-color: var(--vscode-focusBorder, #007fd4);
  outline: none;
}

/* Tag chips */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.85rem;
  background: var(--vscode-badge-background, #4d4d4d);
  border: 1px solid var(--vscode-widget-border, #454545);
  border-radius: 4px;
  color: var(--vscode-badge-foreground, #ffffff);
  white-space: nowrap;
}

.tag-chip.has-color {
  border-radius: 12px;
  padding: 3px 10px;
}

.tag-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  margin-left: 2px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  border-radius: 50%;
  transition: opacity 0.15s, background 0.15s;
}

.tag-chip-remove:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

.tag-chip.has-color .tag-chip-remove:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Input field */
.tag-input-field {
  flex: 1;
  min-width: 120px;
  padding: 2px 4px;
  border: none;
  background: transparent;
  color: var(--vscode-input-foreground, #cccccc);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

.tag-input-field::placeholder {
  color: var(--vscode-input-placeholderForeground, #a6a6a6);
}

.tag-input-field:disabled {
  cursor: not-allowed;
}

/* Suggestions dropdown */
.tag-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  padding: 4px;
  background: var(--vscode-dropdown-background, #3c3c3c);
  border: 1px solid var(--vscode-widget-border, #454545);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
}

.tag-suggestion {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--vscode-dropdown-foreground, #f0f0f0);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s;
}

.tag-suggestion:hover,
.tag-suggestion.selected {
  background: var(--vscode-list-hoverBackground, #2a2d2e);
}

.tag-suggestion-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tag-suggestion-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Create new tag option */
.tag-suggestion.create-new {
  border-top: 1px solid var(--vscode-widget-border, #454545);
  margin-top: 4px;
  padding-top: 12px;
  color: var(--vscode-notificationsInfoIcon-foreground, #75beff);
}

.tag-suggestion.create-new:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 8px;
}

.tag-suggestion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px dashed currentColor;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}
