/******************************
    Tags
*******************************/
$tag-border: solid 1px $dp-greyscale-300;
$tag-height: 18px;

.dp-tag {
  font-family: $primary-font;
  font-size: $font-size-m;
  font-weight: $pf-regular;
  color: $dp-greyscale-850;

  background-color: $dp-greyscale-150;
  border: $tag-border;

  height: $tag-height;
  border-radius: $rad-size-s;
  padding-left: 4px;
  padding-right: 4px;

  margin-right: 4px;
  &.editable {
    padding-right: 6px;
  }
  &, * {
    box-sizing: border-box;
  }
}
.dp-tag__close {
  margin-left: 3px;
  font-size: $icon-size-xs;
  color: $dp-greyscale-500;
  cursor: pointer;
}
/******************************
    Tag input
*******************************/
.dp-tag-input {
  padding: 4px;
  border: 1px solid $dp-greyscale-300;
  border-radius: $rad-size-m;
  cursor: text;
  input {
    font-family: $primary-font;
    font-size: $font-size-m;
    border: 0;
    box-shadow: none;
    padding: 1px;
    &:focus {
      border: 0;
      outline: 0;
    }
    &::placeholder {
      color: $dp-greyscale-450;
    }
  }
  .react-autosuggest__container {
     position: relative;
     display: inline-block;
  }
  .react-autosuggest__input {
    width: 240px;
    height: 30px;
    padding: 10px 20px;
    font-family: $primary-font;
    font-weight: 300;
    font-size: $font-size-m;
    border: 1px solid #aaa;
    border-radius: 4px;
  }
  .react-autosuggest__input:focus {
    outline: none;
  }
  .react-autosuggest__container--open .react-autosuggest__input {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .react-autosuggest__suggestions-container {
    position: absolute;
    top: 18px;
    width: 280px;
    margin: 0;
    list-style-type: none;
    background-color: #fff;
    font-family: $primary-font;
    font-weight: 300;
    font-size: $font-size-m;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    z-index: 2;
  }
  .react-autosuggest__suggestions-container--open {
    border: 1px solid #aaa;
  }
  .react-autosuggest__suggestions-list {
    -webkit-margin-before: 0;
    -webkit-margin-after: 0;
    -webkit-padding-start: 0;
    list-style: none;
  }
  .react-autosuggest__suggestion {
    cursor: pointer;
    padding: 0 5px;
  }

  .react-autosuggest__suggestion--highlighted,
  .react-autosuggest__suggestion--focused {
    background-color: $dp-morning-sky;
  }
}
.dp-tag-set {
  &, * {
    box-sizing: border-box;
  }
  .dp-search-button {
    .dp-button {
      box-shadow: none;
      background-color: $dp-greyscale-00;
      border: $tag-border;
      height: $tag-height;
      vertical-align: bottom;
      padding: 0 4px;
      cursor: pointer;
      i {
        display: none;
      }
      &::after {
        content: '+';
        top: -1px;
        display: inline-block;
        position: relative;
        color: $dp-greyscale-500;
      }
      &.dp-button--active {
        background-color: $dp-morning-sky;
        border-color: $dp-sonic-primary;
        color: $dp-sonic-primary;
        box-shadow: 0 1px 0 $dp-sonic-primary inset;
        mix-blend-mode: normal;
        &::after {
          color: $dp-sonic-primary;
        }
      }
    }
  }
}