@import '../../style/common';

.@{prefix}badge {
  position: relative;
  display: inline-block;

  &__info {
    position: absolute;
    top: 0;
    right: 8px;
    display: block;
    min-width: 8px;
    height: @badge-height;
    padding: 0 4px;
    color: @white;
    font-size: @badge-font-size;
    line-height: @badge-height;
    white-space: nowrap;
    text-align: center;
    background-color: @badge-background-color;
    border-radius: @badge-height / 2;
    transform: translateY(-50%) translateX(100%);

    &--is-dot {
      right: @badge-dot-width / 2;
      width: @badge-dot-width;
      height: @badge-dot-width;
      padding: 0;
    }

    &::after {
      position: absolute;
      top: -1px;
      right: -1px;
      display: block;
      box-sizing: content-box;
      width: 100%;
      height: 100%;
      border: 1px solid @white;
      border-radius: @badge-height / 2 + 2px;
      content: '';
    }
  }
}
