.ant-form-item-control {
  &.has-error {
    .load-more-selector {
      .results {
        border: 1px solid $color-danger;
      }
    }
  }
}

.load-more-selector {
  white-space: normal;

  .results {
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 32px;
    max-height: 96px;
    padding: 0 6px 0 12px;
    overflow: auto;
    border: 1px solid $color-border;
    border-radius: $radius;

    &.small {
      min-height: 28px;
      padding: 2px 8px;
    }

    &:hover {
      border: 1px solid $color-primary;
      outline: 0;
      box-shadow: 0 0 0 2px rgba($color-primary, 0.2);

      .close {
        visibility: visible;
      }
    }

    &.border-none {
      box-shadow: none;
    }

    .placeholder {
      color: $color-dark-3;
    }

    .values {
      line-height: 100%;

      .value-item {
        display: inline-block;
        white-space: nowrap;
      }

      .ant-tag {
        background-color: $color-dark-04;
        border: unset;
      }

      > * {
        margin-top: 1px;
        margin-bottom: 1px;
      }
    }

    .close {
      color: $color-dark-2;
      font-size: 12px;
      visibility: hidden;
      padding-top: 2px;
    }
  }
}

.load-more-selector-dropdown {
  padding-bottom: 0;
  @extend %shallow-shadow;

  .load-more-dropdown-menu {
    .search {
      padding: 0 4px;
      margin-top: 5px;

      .ant-input {
        background-color: transparent !important;
      }
    }

    &.ant-dropdown-menu {
      padding-bottom: 0;
      color: $color-default;
      height: 100%;
    }

    .ant-dropdown-menu-item:hover,
    .ant-dropdown-menu-submenu-title:hover {
      background-color: transparent;
    }

    .chosen-info {
      display: flex;
      justify-content: space-between;
      padding-top: 0;
      padding-bottom: 0;
      color: $lightgray;
      font-size: 14px;
    }

    .options {
      margin-top: -4px;
      padding: 0;
    }
  }

  .ant-input-affix-wrapper {
    margin-bottom: 8px;
    line-height: 24px;
    border-color: transparent;
    background-color: $color-default-06;

    &:hover,
    &:focus {
      border-color: transparent;
    }
  }
}

.load-more-selector-container {
  .ant-dropdown-menu-submenu-title,
  .ant-spin-container {
    color: $color-default !important;
  }

  .content {
    display: flex;
    min-height: 150px;
    max-height: 240px;
    margin: 4px 0;
    background-color: $color-default-02;

    &.normal {
      border: unset;
    }

    .menu {
      overflow: hidden;
      overflow-y: auto;
      text-overflow: ellipsis;
      margin: 4px 0;

      .menu-item {
        height: 36px;
        margin-top: 0;
        margin-bottom: 0;
        background-color: $color-default-04 !important;

        &.ant-menu-item:active {
          background-color: $color-default-04 !important;
        }

        &.ant-menu-item-selected {
          background-color: $white !important;
          position: relative;
          color: $color-purple-600;

          &:before {
            display: block;
            position: absolute;
            content: '';
            width: 3px;
            height: 100%;
            background-color: $color-purple-600;
            top: 0;
            bottom: 0;
            right: 0;
          }
        }
      }

      .ant-empty-image {
        margin-top: 16px;
      }

      .ant-menu-vertical {
        border-right: unset;
      }
    }

    .list {
      display: flex;
      flex: 1;
      flex-direction: column;
      overflow: auto;
      background-color: $white;
      border-left: 1px solid $color-border;

      .ant-empty-image {
        margin-top: 16px;
      }

      .load-more-list-item {
        display: flex;
        align-items: center;
        // justify-content: space-between;
        margin: 0 8px;
        padding: 8px;

        .ant-checkbox {
          top: 0;
        }

        &:hover,
        &.checked {
          color: $color-default;
          background-color: $color-default-04;
        }
      }
    }
  }
}
