@badge-prefix: ~"@{prefix}badge";
.@{badge-prefix} {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  &-count {
    position: absolute;
    transform: translateX(50%) scale(0);
    top: -8px;
    right: 0;
    border-radius: 100px;
    background: @red-color;
    color: #fff;
    line-height: 18px;
    text-align: center;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    transition: @transition-time cubic-bezier(0.24, 0.71, 0.73, 1.19);
    min-width: 18px;
    height: 18px;
    padding: 0 4px;

    &-show {
      transform: translateX(50%) scale(1);
    }
    &-dot {
      height: 6px;
      width: 6px;
      min-width: 0;
      padding: 0;
      top: -3px;
    }
    a,
    a:hover {
      color: #fff;
    }
    &-alone {
      top: auto;
      display: block;
      position: relative;
      transform: translateX(0);
    }
  }

  &-position-right{
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);

    .@{badge-prefix}-count {
      right: 10px;
      transform: scale(0);
      &-show {
        transform: scale(1);
      }
    }
  }
}