/* =========================
   Badges
   Figma: Badges.
========================= */

@use "../kit-deps" as *;

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: $space-1;
  min-height: 24px;
  padding: $space-1 $space-2;
  font-family: $font-family-base;
  font-size: 12px;
  font-weight: $font-weight-semibold;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  border-radius: $radius-full;
  background-color: $neutral-200;
  color: $neutral-900;
  transition:
    background-color $motion-base $motion-ease,
    color $motion-base $motion-ease;

  &.with-icon {
    padding-left: $space-1;
  }

  .vmk-icon {
    font-size: 14px;
  }

  // Variants
  &.badge-primary {
    background-color: $neutral-900;
    color: $neutral-25;
  }

  &.badge-secondary {
    background-color: $mint-300;
    color: $neutral-900;
  }

  &.badge-accent {
    background-color: $yellow-300;
    color: $neutral-900;
  }

  &.badge-success {
    background-color: $success-bg;
    color: $success-text;
  }

  &.badge-warning {
    background-color: $warning-bg;
    color: $warning-text;
  }

  &.badge-info {
    background-color: $info-bg;
    color: $info-text;
  }

  &.badge-danger,
  &.badge-error {
    background-color: $danger-bg;
    color: $danger-text;
  }

  // Owner / lavender variant from Mode 1 tokens
  &.badge-owner {
    background-color: $lavender-300;
    color: $lavender-700;
  }

  // Outline
  &.badge-outline {
    background-color: transparent;
    border: $border-width-base $border-style-base $neutral-900;
    color: $neutral-900;
  }

  &.badge-primary-outline,
  &.badge-primary.badge-outline {
    background-color: transparent;
    border-color: $neutral-900;
    color: $neutral-900;
  }

  &.badge-secondary.badge-outline {
    background-color: transparent;
    border-color: $mint-600;
    color: $mint-700;
  }

  &.badge-accent.badge-outline {
    background-color: transparent;
    border-color: $yellow-500;
    color: $neutral-900;
  }

  &.badge-success.badge-outline {
    background-color: transparent;
    border-color: $success-text;
    color: $success-text;
  }

  &.badge-warning.badge-outline {
    background-color: transparent;
    border-color: $warning-text;
    color: $warning-text;
  }

  &.badge-info.badge-outline {
    background-color: transparent;
    border-color: $info-text;
    color: $info-text;
  }

  &.badge-danger.badge-outline,
  &.badge-error.badge-outline {
    background-color: transparent;
    border-color: $danger-text;
    color: $danger-text;
  }

  &.badge-owner.badge-outline {
    background-color: transparent;
    border-color: $lavender-700;
    color: $lavender-700;
  }

  // Sizes
  &.badge-sm {
    min-height: 20px;
    padding: 2px $space-2;
    font-size: 11px;
  }

  &.badge-lg {
    min-height: 28px;
    padding: $space-1 $space-3;
    font-size: 13px;
  }
}
