// Bootstrap v4.4.1 (https://getbootstrap.com/)
// Copyright 2011-2019 The Bootstrap Authors
// Copyright 2011-2019 Twitter, Inc.
// Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)

.badge {
  border-radius: .25rem;
  display: inline-block;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  padding: .25em .4em;
  text-align: center;
  vertical-align: baseline;
  white-space: nowrap;

  // Empty badges collapse automatically
  &:empty {
    display: none;
  }
}

// Quick fix for badges in buttons
.btn .badge {
  position: relative;
  top: -1px;
}

.badge-pill {
  border-radius: 10rem;
  padding-left: .6em;
  padding-right: .6em;
}

@each $name, $color in $semantic-colors {
  .badge-#{$name} {
    background-color: $color;
    color: text-color($name);
  }

  .badge-#{$name}[href]:focus,
  .badge-#{$name}[href]:hover {
    background-color: darken($color, 10%);
    color: text-color($name);
    text-decoration: none;
  }
}
