@use 'src/styles/abstracts' as *;

.Badge {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  height: 1.75rem;
  border-radius: 0.375rem;
  font-weight: $font-500;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;

  &__label {
    flex-wrap: nowrap;
    white-space: nowrap;
    line-height: 1rem;
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
  }
  i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: unset;
    height: unset;
    margin: 0;
  }

  &__deleteIcon,
  &__startIcon {
    width: 1.125rem;
    height: 1.125rem;
    margin-left: unset;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: $border-radius-xs;
    transition: all 0.18s ease-out;
  }
  &__deleteIcon {
    cursor: pointer;
  }
  &__select {
    margin-top: $space-xxxs;
    margin-right: $space-xxxs;
  }
  &__disabled {
    pointer-events: none;
    opacity: 0.5;
  }
  &__default {
    color: #414b6d;
    background-color: $cuddle-10;
    border: $border-grey;
    &:hover {
      background-color: $cuddle-10;
    }
    .Badge__startIcon {
      i {
        color: $text-color;
      }
    }
    .Badge__deleteIcon {
      i {
        color: $text-color;
      }
      &:hover {
        background-color: $cuddle-30;
      }
    }
  }

  &__small,
  &__xSmall {
    font-size: $text-sm;
    i {
      font-size: 0.4375rem;
      margin-bottom: 1px;
    }
    .Badge__label {
      padding: 0 $space-xs;
    }
    .Badge__deleteIcon,
    .Badge__startIcon {
      width: 0.875rem;
      height: 0.875rem;
    }
    .Badge__deleteIcon {
      margin-right: 0.25rem;
    }
    .Badge__startIcon {
      margin-left: 0.25rem;
    }
  }
  &__small {
    height: 1.5rem;
  }

  &__xSmall {
    height: 1.125rem;
  }
  &__medium {
    height: 1.5rem;
    font-size: $text-md;
    .Badge__label {
      padding: 0 $space-sm;
    }
    i {
      font-size: $text-xxs;
    }
    .Badge__deleteIcon {
      margin-right: $space-xs;
    }
    .Badge__startIcon {
      margin-left: $space-xs;
    }
  }

  &__large,
  &__xLarge {
    font-size: $text-md;
    height: 1.75rem;
    .Badge__label {
      padding: 0 $space-sm;
    }
    .Badge__deleteIcon {
      margin-right: $space-xs;
      i {
        font-size: $text-xxs;
      }
    }
    .Badge__startIcon {
      margin-left: $space-xs;
      i {
        font-size: $text-xxs;
      }
    }
  }
  &__xLarge {
    height: 2rem;
    .Badge__label {
      padding: 0 $space-unit;
    }
  }
}
