/* Badges/Tags */
.badge {
  display: flex;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  text-align: center;
}

a:hover .badge {
  text-decoration: none;
}

.badge-removable {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.2s;
  text-decoration: none;
}

.badge-removable:hover {
  opacity: 0.8;
  background-color: rgba(169, 177, 214, 0.3);
  text-decoration: none;
}

.badge-remove-icon {
  width: 0.875rem;
  height: 0.875rem;
  opacity: 0.7;
}

.badge-clear-all {
  background-color: rgba(247, 118, 142, 0.2);
  color: var(--danger);
}

.badge-clear-all:hover {
  background-color: rgba(247, 118, 142, 0.3);
}

.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-secondary);
  color: var(--fg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: normal;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.difficulty-text {
  display: inline-block;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--fg-secondary);
  text-underline-offset: 3px;
}

.difficulty-text::after {
  font-size: 0.875rem;
  white-space: pre-line;
  min-width: 200px;
  max-width: 300px;
  left: 0;
  transform: none;
}

.badge-icon {
  height: 20px;
  width: auto;
}

.badge-icon path,
.badge-icon circle,
.badge-icon ellipse,
.badge-icon line {
  stroke: currentColor;
}

.badge-icon ellipse[fill],
.badge-icon path[fill]:not([fill="none"]) {
  fill: currentColor;
}
