// @import '../_utils.scss';

.#{$badge-prefix-cls} {
  position: relative;
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
  color: $text-color;
  @include theme-color($__badge_font-color);

  &-count {
    position: absolute;
    transform: translateX(50%);
    top: $badge-count-top;
    right: $badge-count-right;
    height: $badge-count-height;
    border-radius: $badge-count-border-radius;
    min-width: $badge-count-min-width;
    background: $badge-count-background;
    @include theme-background-color($__badge-count_background-color);
    border: $badge-count-border;
    @include theme-border-color($__badge-count_border-color);
    color: $badge-count-color;
    @include theme-color($__badge-count_font-color);
    line-height: $badge-count-line-height;
    text-align: center;
    padding: $badge-count-padding;
    font-size: $badge-count-font-size;
    white-space: nowrap;
    transform-origin: -10% center;
    z-index: 10;
    box-shadow: $badge-count-box-shadow;
    @include theme-box-shadow($__badge_box-shadow);

    a,
    a:hover {
      color: $badge-a-hover-color;
      @include theme-color($__badge-count-a_font-color);
    }

    &-alone {
      top: auto;
      display: block;
      position: relative;
      transform: translateX(0);
    }
  }

  &-dot {
    position: absolute;
    transform: translateX(-50%);
    transform-origin: 0 center;
    top: $badge-dot-top;
    right: $badge-dot-right;
    height: $badge-dot-height;
    width: $badge-dot-width;
    border-radius: $badge-dot-border-radius;
    background: $badge-dot-background;
    @include theme-background-color($__badge-dot_background-color);
    z-index: 10;
    box-shadow: $badge-dot-box-shadow;
    @include theme-box-shadow($__badge_box-shadow);
  }

  a {
    @include theme-color($__common-a_font-color);
    &:hover {
      @include theme-color($__common-a_hover_font-color);
    }

    &:active {
      @include theme-color($__common-a_active_font-color);
    }
  }
}
