@import './../common/abstracts/_mixin';
@import './../common/abstracts/variable';

.wot-theme-dark {
  @include b(badge) {
    @include e(content) {
      border-color: $-dark-background2;
    }
  }
}

@include b(badge) {
  position: relative;
  display: inline-block;
  vertical-align: middle;

  @include e(content) {
    display: inline-block;
    height: $-badge-height;
    padding: $-badge-padding;
    font-size: $-badge-fs;
    font-weight: 500;
    line-height: $-badge-height;
    color: $-badge-color;
    text-align: center;
    white-space: nowrap;
    background-color: $-badge-bg;
    border: $-badge-border;
    border-radius: calc($-badge-height / 2 + 2px);

    @include when(fixed) {
      position: absolute;
      transform: translateY(-50%) translateX(50%);
    }

    @include when(dot) {
      width: $-badge-dot-size;
      height: $-badge-dot-size;
      padding: 0;
      border-radius: 50%;
    }

    @each $type in (primary, success, warning, info, danger) {
      @include m($type) {
        @if $type == primary {
          background-color: $-badge-primary;
        } @else if $type == success {
          background-color: $-badge-success;
        } @else if $type == warning {
          background-color: $-badge-warning;
        } @else if $type == info {
          background-color: $-badge-info;
        } @else {
          background-color: $-badge-danger;
        }
      }
    }
  }
}
