@import (reference) '../style/themes/default.less';

.am-badge {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  // line-height: @line-height-paragraph;
  // line-height: var(--am-badge-line-height, @line-height-paragraph);

  &-text {
    display: flex;
    position: absolute;
    align-items: center;
    justify-content: center;
    top: 0;
    min-width: 28 * @pixelSize;
    padding: 0;
    height: 28 * @pixelSize;
    text-align: center;
    font-size: 24.5 * @pixelSize;
    background-color: #FF411C;
    background-color: var(--am-badge-bg-color, #FF411C);
    border-radius: @corner-radius-circle;
    border-radius: var(--am-badge-border-radius, @corner-radius-circle);
    color: @color-text-base;
    color: var(--am-badge-font-color, @color-text-base);
    z-index: 1;

    &-left {
      right: 0;
      transform: translate(50%, -50%);
    }
    &-right {
      left: 0;
      transform: translate(-50%, -50%);
    }
    &-middle {
      right: 50%;
      transform: translate(50%, -100%);
    }

    &-padding {
      font-size: 20 * @pixelSize;
      opacity: 0;
    }

    &-inner {
      position: relative;
      z-index: 2;
      font-size: 24.5 * @pixelSize;
      white-space: nowrap;
    }
    &-inner-absolute {
      position: absolute;
      left: 50%;
      transform-origin: 0 center;
      transform: scale(0.75) translate3d(-50%, 0, 0);
      z-index: 3;
    }
    &-inner-opacity {
      transform: scale(1);
      zoom: 0.75;
      opacity: 0;
    }

    &.am-badge-double {
      padding: 0 8 * @pixelSize;
    }
  }

  &-not-a-wrapper .am-badge-text {
    position: relative;
    top: auto;
    right: auto;
    transform: translateX(0);
  }

  &-text.is-dot {
    padding: 0;
    width: 20 * @pixelSize;
    min-width: 20 * @pixelSize;
    height: 20 * @pixelSize;
    min-height: 20 * @pixelSize;
    border-radius: @corner-radius-circle;
    border-radius: var(--am-badge-border-radius, @corner-radius-circle);
  }
  &-arrow {
    position: absolute;
    height: 8 * @pixelSize;
    width: 8 * @pixelSize;
    bottom: -4 * @pixelSize;
    left: 50%;
    margin-left: -4 * @pixelSize;
    transform: rotate(45deg);
    z-index: 1;
    border-radius: 50vh 0 0;
    background: @color-fill-warning;
    background-color: var(--am-badge-bg-color, @color-fill-warning);
    &.am-badge-stroke {
      border: 0 none;
      filter: drop-shadow(@border-width-standard @border-width-standard 0 @color-fill-grey-inverse);
    }
  }
  &-text-arrow-right {
    border-radius: @corner-radius-lg @corner-radius-lg 0 @corner-radius-lg;
  }
  &-text-arrow-left {
    border-radius: @corner-radius-lg @corner-radius-lg @corner-radius-lg 0;
  }
  &-stroke {
    border: @border-width-standard solid @color-fill-grey-inverse;
  }
}
