@layer components {
.badge[role="button"],
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: 0.85em;
  font-weight: 400;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge[data-copy="true"] {
  gap: 0.45em;
  padding-right: 0.4em;
  cursor: pointer;
  user-select: none;
}

.badge .badge-copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  line-height: 1;
  font-size: 10px;
}

.badge .badge-copy-icon .bi {
  font-size: 0.95em;
}

.badge .badge-copy-icon .bi-check2 {
  display: none;
}

.badge.is-copied .badge-copy-icon .bi-copy {
  display: none;
}

.badge.is-copied .badge-copy-icon .bi-check2 {
  display: inline;
}

.badge[data-copy="true"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 6px;
}

.badge[data-variant="success"] {
  background: var(--badge-success-bg);
  color: var(--badge-success-color);
  border-color: var(--badge-success-border);
}

.badge[data-variant="danger"] {
  background: var(--badge-danger-bg);
  color: var(--badge-danger-color);
  border-color: var(--badge-danger-border);
}

.badge[data-variant="info"] {
  background: var(--badge-info-bg);
  color: var(--badge-info-color);
  border-color: var(--badge-info-border);
}

.badge[data-variant="primary"] {
  background: var(--badge-info-bg);
  color: var(--badge-info-color);
  border-color: var(--badge-info-border);
}

.badge[data-variant="secondary"] {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-color);
  border-color: var(--badge-neutral-border);
}

.badge[data-variant="warn"] {
  background: var(--badge-warn-bg);
  color: var(--badge-warn-color);
  border-color: var(--badge-warn-border);
}
.badge[data-variant="warning"] {
  background: var(--badge-warn-bg);
  color: var(--badge-warn-color);
  border-color: var(--badge-warn-border);
}

.badge[data-variant="neutral"] {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-color);
  border-color: var(--badge-neutral-border);
}

.badge .badge-color-dot {
  width: 0.85em;
  height: 0.85em;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid var(--app-border-color);
  background: currentColor;
  box-shadow: 0 0 0 2px var(--app-background-color) inset;
  flex: 0 0 auto;
}

[data-theme="dark"] .badge .badge-color-dot {
  border-color: var(--app-border-color);
  box-shadow: 0 0 0 2px var(--app-background-color) inset;
}

.badge-list {
  display: flex;
  gap: 0.35rem;
}
}
