.TagSelectionModal {
  &-controls {
    padding: 20px;
  }
}

@media @tablet, @desktop, @desktop-hd {
  .TagSelectionModal-form {
    display: table;
    width: 100%;
  }
  .TagSelectionModal-form-input {
    display: table-cell;
    width: 100%;
    vertical-align: top;
  }
  .TagSelectionModal-form-submit {
    display: table-cell;
    padding-left: 15px;
  }
}
.TagsInput {
  .add-keyboard-focus-ring(":focus-within");
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  height: auto;
  cursor: text;

  input {
    display: inline;
    outline: none;
    margin-top: -2px;
    border: 0 !important;
    padding: 0;
    max-width: 100%;
    min-width: 1ch;
    margin-right: -100%;
    background: transparent !important;
  }
}
.TagsInput-tag {
  cursor: not-allowed;
}
.TagsInput-selected {
  .TagsInput-tag {
    display: inline-flex;
    margin-right: 5px;

    &:last-child {
      margin-right: 10px;
    }
  }
}

.SelectTagListItem-checkIcon {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: transparent;
}

.SelectTagList {
  padding: 0;
  margin: 0;
  list-style: none;
  overflow: auto;
  max-height: 50vh;

  @media @phone {
    max-height: none;
  }

  > li {
    padding: 7px 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    display: flex;
    align-items: center;

    &.pinned:not(.child) {
      padding-top: 10px;
      padding-bottom: 10px;

      .SelectTagListItem-name {
        font-size: 16px;
      }
    }
    &.pinned + li:not(.pinned) {
      border-top: 2px solid var(--control-bg);
    }
    &.child {
      padding-left: 45px;

      .SelectTagListItem-name {
        width: 125px;
      }
    }
    &.active {
      background: var(--control-bg);
    }

    &.selected {
      .SelectTagListItem-checkIcon {
        display: inline-flex;
        color: var(--muted-color);
        font-size: 14px;
      }
      .SelectTagListItem-tagIcon::before {
        visibility: hidden;
      }
      &.colored .TagIcon + .SelectTagListItem-checkIcon {
        color: #fff;
      }
    }
  }
}
.SelectTagListItem-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  height: 16px;
  width: 16px;
}
.SelectTagListItem-name {
  display: inline-block;
  width: 150px;
  margin-right: 10px;
  margin-left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;

  @media @phone {
    width: auto;
  }
}
.SelectTagListItem-description {
  color: var(--muted-color);
  font-size: 12px;
  width: 370px;
  display: inline-block;
  vertical-align: top;
  margin-top: 2px;

  @media @phone {
    display: none;
  }
}
.SelectTagListItem mark {
  font-weight: bold;
  background: none;
  box-shadow: none;
  color: inherit;
}
