/* Tag styles */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  padding-right: 2rem; /* Increased padding to add more space for the button */
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.tag:hover {
  filter: brightness(0.95);
}

.tag svg {
  margin-right: 0.25rem;
}

.tag.active {
  box-shadow: 0 0 0 2px currentColor;
}

.tag.excluded {
  opacity: 0.7;
  text-decoration: line-through;
}

/* Tag action buttons */
.tag-actions {
  position: absolute;
  top: 50%;
  right: 8px; /* Increased right spacing */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column; /* Stack buttons vertically */
  gap: 3px; /* Small gap between buttons */
  align-items: center; /* Center buttons horizontally */
  width: 16px; /* Fixed width for better alignment */
}

.tag .exclude-button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--surface);
  border: 1px solid var(--border);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 0 1px 0; /* Add bottom padding to center the cross vertically */
  margin: 0; /* Remove any margin */
  line-height: 1; /* Ensure consistent line height */
  text-align: center; /* Center text */
  color: #ef4444; /* Red color for exclude */
  letter-spacing: 1px; /* Add letter spacing to give the cross more room */
}

.tag .exclude-button:hover {
  background-color: #ef4444;
  color: white;
  border-color: #ef4444;
}

.tag.excluded .exclude-button {
  background-color: var(--primary);
  color: white;
}

.tag.excluded .exclude-button:hover {
  background-color: var(--primary-hover);
}