.nut-badge {
  position: relative;
  display: inline-block;

  &-icon {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background: $badge-background-color;
    top: -10%;
    right: -15%;
    padding: $badge-icon-padding;
    text-align: center;
    border: $badge-border;
    border-radius: $badge-border-radius;
    z-index: $badge-z-index;

    .nut-icon {
      width: $badge-icon-size;
      height: $badge-icon-size;
      font-size: $badge-icon-size;
    }
  }

  &-sup {
    height: $badge-height;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background: $badge-background-color;
    color: $badge-color;
    padding: $badge-padding;
    font-size: $badge-font-size;
    font-weight: normal;
    text-align: center;
    border: $badge-border;
    border-radius: $badge-border-radius;
    min-width: $badge-min-width;
    white-space: nowrap;
    z-index: 1;
  }

  &-one {
    height: $badge-height;
    width: $badge-height;
    padding: 0;
  }

  &-content {
    transform: $badge-content-transform;
  }

  &-dot {
    width: $badge-dot-width;
    height: $badge-dot-width;
    border: $badge-dot-border;
    border-radius: $badge-dot-width;
    padding: 0;
  }

  &-outline {
    .nut-badge-content {
      background: $color-primary-text;
      border: 1px solid $color-primary;
      color: $color-primary;
    }
  }
}

[dir='rtl'] .nut-badge,
.nut-rtl .nut-badge {
  &-icon {
    right: auto;
    left: -15%;
  }

  &-content {
    transform: var(
      --nutui-badge-content-transform,
      translateY(-50%) translateX(-100%)
    );
  }
}
