.blip-tag-wrapper {
  margin-right: 5px;
  position: relative;
  font-weight: normal;
  display: inline-block;
  outline: 0;
  max-width: 100%;
}

.blip-tag-wrapper,
.blip-tag-select-color,
.blip-tag__label,
.blip-tag__remove {
  font-size: $bp-fs-6;
  line-height: $bp-lh-simple;
}

.blip-tag-select-color {
  background: #fff;
  box-shadow: 0 1px 12px 0 rgba(173, 182, 185, 0.29);
  padding: 14px;
  margin: 0;
  width: 178px;
  position: absolute;
  top: 160%;
  border-radius: 3px;
  transform-origin: 0 0;
  transition: 300ms;
  list-style: none;
  z-index: 2;
  box-sizing: border-box;

  &:focus {
    outline: 0;
  }

  &:before {
    content: " ";
    position: absolute;
    left: 20px;
    top: -16px;
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid #fff;
  }
}

.blip-tag {
  @include flex-box;
  padding: 3px 12px;
  margin: 0;
  border-radius: 20px;
  background: $bp-color-bot;
  max-width: 300px;
  transition: max-width 1.2s, max-height 1s cubic-bezier(0, 1, 0, 1);
  cursor: pointer;
  color: #fff;

  &:focus { outline: 0; }
}

.blip-tag--can-remove {
  .blip-tag:focus {
    background: $bp-color-rooftop !important; // Tags background is set inline, so !important is necessary
  }
}

.blip-tag--compact {
  .blip-tag__remove { display: none }

  .blip-tag {
    max-width: 15px;
    max-height: 15px;
    min-width: 15px;
    min-height: 15px;
    padding: 0;
    transition: max-width 600ms,
    max-height 500ms,
    min-width 600ms,
    min-height 600ms,
    padding 600ms cubic-bezier(0, 1, 0, 1);

    .blip-tag__label {
      opacity: 0;
      transition: 60ms;
    }
  }
}

.blip-tag__label {
  opacity: 1;
  transition: opacity 1.2s;
  max-width: 100%;
  text-overflow: ellipsis;
  overflow: hidden;
  word-break: normal;
}

.blip-tag--on-list {
  margin: 6px 0;
}

.blip-tag__remove {
  display: inline-block;
  background: transparent;
  border: 0;
  cursor: pointer;
  height: auto;
  min-width: auto;
  padding: 0;
  margin-left: 0.8*$m;
  color: #fff;

  &:focus {
    outline: none;
  }
}

.blip-tag-color-option {
  width: 2.4*$m;
  height: 2.4*$m;
  margin: 0.3*$m;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
}
