$primary: #106cc8 !default;
$warn: #f44336 !default;

:host {
  outline: none;
  user-select: none;
  backface-visibility: hidden;
}

.md2-tags-container {
  position: relative;
  display: block;
  max-width: 100%;
  padding: 2px 2px 4px;
  border-bottom: 1px solid rgba(black, 0.12);
  box-sizing: content-box;
  min-width: 64px;
  min-height: 26px;
  cursor: text;

  &::before, &::after {
    display: table;
    content: ' ';
  }

  &::after {
    clear: both;
  }
}

.focus .md2-tags-container {
  padding-bottom: 3px;
  border-bottom: 2px solid $primary;
}

.md2-tags-disabled .md2-tags-container {
  color: rgba(black, 0.38);
  cursor: default;
}

.md2-tags-disabled.focus .md2-tags-container {
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(black, 0.38);
}

.md2-tag {
  position: relative;
  cursor: default;
  border-radius: 16px;
  display: block;
  height: 32px;
  line-height: 32px;
  margin: 4px 4px 0 0;
  padding: 0 26px 0 12px;
  float: left;
  box-sizing: border-box;
  max-width: 100%;
  background: #e0e0e0;
  color: rgb(66, 66, 66);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  &.active {
    background: $primary;
    color: rgba(white, 0.87);

    svg {
      color: rgba(white, 0.87);
    }
  }

  svg {
    position: absolute;
    top: 4px;
    right: 2px;
    cursor: pointer;
    display: inline-block;
    overflow: hidden;
    fill: currentColor;
    color: rgba(black, 0.54);
  }
}

.md2-tag-add {
  position: relative;
  display: inline-block;
  margin-left: 4px;
}

input {
  border: 0;
  outline: 0;
  margin-top: 6px;
  height: 30px;
  line-height: 30px;
  padding: 0;
  color: rgba(black, 0.87);
  background: 0 0;
}

.md2-tags-placeholder {
  color: rgba(black, 0.38);
}

.md2-tags-menu {
  position: absolute;
  left: 0;
  top: 100%;
  display: block;
  z-index: 10;
  flex-direction: column;
  width: 100%;
  margin: 6px 0 0;
  padding: 8px 0;
  box-shadow: 0 1px 3px 0 rgba(black, 0.2), 0 1px 1px 0 rgba(black, 0.14), 0 2px 1px -1px rgba(black, 0.12);
  max-height: 256px;
  min-height: 48px;
  overflow-y: auto;
  transform: scale(1);
  background: #fff;
  backface-visibility: hidden;

  .md2-tag-option {
    cursor: pointer;
    position: relative;
    display: block;
    color: #212121;
    align-items: center;
    width: auto;
    transition: background 150ms linear;
    padding: 12px 16px;
    line-height: 24px;
    box-sizing: border-box;
    word-wrap:break-word;

    &:hover,
    &.focused {
      background: #eeeeee;
    }

    .md2-tag-option-text {
      width: auto;
      font-size: 16px;
    }
  }
}

.highlight {
  color: #757575;
}
