.tag {
  align-items: center;
  border-radius: $border-radius--max;
  display: inline-flex;
  height: $baseline * 4;
  opacity: 1;
  overflow: hidden;

  &.hide-tag {
    opacity: 0;
    transition: opacity $transition-duration--fast;
  }

  &__text {
    @include text-ellipsis;
  }


//default color : dark-blue
  &.tag--remove {
    .tag {
      &__text {
        @include font-style('body--m');
        line-height: $baseline * 2.9;
        margin-bottom: $baseline * 0.2;
        padding: 0 3px 0 15px;
      }

      &__close {
        align-items: center;
        background: transparent;
        border-radius: $border-radius--max;
        cursor: pointer;
        display: flex;
        height: $baseline * 3;
        justify-content: center;
        margin-right: 5px;
        transition: background $transition-duration--fast;
        width: 30px;

        &:hover {
          background: $color--two-80;
          transition: background $transition-duration--fast;

          .icon svg {
            fill: $color-brand--four;
            transition-duration: $transition-duration--faster;
          }
        }

        .icon {
          height: $icon-size--s;
          transition-duration: $transition-duration--faster;
          width: $icon-size--s;

          svg {
            fill: $color--two-50;
            transition-duration: $transition-duration--faster;
          }
        }
      }
    }
  }

  // light blue
  &.tag--remove.bg-brand--light-blue {
    background: $color--one-10;
    color: $color-brand--one;

    .tag__close:hover {
      background: $color-alpha--one-30;

      .icon svg {
        fill: $color-brand--one;
      }
    }

    .icon svg {
      fill: $color-brand--one;
    }
  }

  /// tag with checkbox
  &.tag--add {
    background: transparent;
    border: 1px solid $color-brand--one;
    color: $color-brand--one;
    transition: $transition-duration--fast ease;

    &:hover:not(.tag__checked-background-color) {
      background: $color--one-10;
      transition: background $transition-duration--fast;
      @media (hover: none) {
        &:hover:not(.tag__checked-background-color) {
          background: transparent;
        }
      }
    }

    label {
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }

    .tag {
      &__text {
        @include font-style('body--m');
        line-height: $baseline * 2.9;
        margin-bottom: $baseline * 0.4;
        padding-right: 15px;
      }

      &__checkbox {
        cursor: pointer;
        margin-left: 6px;

        .selection-control {
          &__input {
            align-items: center;
            background: transparent;
            border-radius: $border-radius--max;
            display: flex;
            height: $spacing--m;
            justify-content: center;
            top: $baseline * 0.1;
            transition: $transition-duration--fast ease;
            width: 30px;

            .icon {
              border: 1px solid $color-brand--one;
              height: $icon-size--s;
              transition: $transition-duration--fast ease;
              width: $icon-size--s;
            }
          }

          &__label {
            margin-left: $spacing--xxs;
          }

          &__control {
            transition: none;
          }

        }
      }
    }


    //set in tags.js
    &.tag__checked-background-color {
      background: $color-brand--one;
      color: $color-brand--four;
      transition: $transition-duration--fast ease;

      &:hover {
        .selection-control__input {
          background: $color--one-80;
          transition: $transition-duration--fast ease;

          .icon {
            background: $color--one-80;
            border: 1px solid $color--one-80;
            transition: $transition-duration--fast ease;
          }
        }
      }
    }
  }
}

// viewport l
@include viewport--l {
  .tag.tag--remove .tag__text {
    margin-bottom: $baseline * 0.4;
    padding: 0 5px 0 15px;
  }
}

