@import "~styles/variables";

.magic-input-outer-wrapper {
  display: flex;
}
.magic-input-wrapper {
  flex: 1;
  height: 32px;
  border: 1px solid rgb(217, 217, 217);
  border-radius: @border-radius;
  padding: 3px 0 3px 8px;
  display: flex;
  background-color: #fff;
  position: relative;

  :global {
    .ant-tag {
      background-color: @primary-color;
      color: #fff;
      font-size: 10px;
      height: 24px;
      line-height: 24px;
      border: none;
      padding: 0 4px;
      margin-right: 4px;

      .anticon-close {
        color: #fff;
        margin-left: 16px;
      }
    }
    .ant-btn {
      margin-top: -3px;
      margin-right: 0;
    }
    .ant-btn-icon-only {
      background-color: #fff;
      height: 30px;
    }
  }
}
.magic-input-wrapper-active {
  border-color: @primary-color;
  box-shadow: 0 0 0 2px rgba(0, 104, 255, 0.2);
}
.input-wrapper {
  margin-top: -4px;
  height: 32px;
  position: relative;
  flex-grow: 1;
  :global {
    .ant-input {
      border: none;
      box-shadow: none;
      padding-left: 0;
      background: none;
    }
    .ant-input:focus {
      border: none;
      box-shadow: none;
    }
    input::placeholder {
      font-size: 10px;
    }
    .ant-menu-vertical > .ant-menu-item {
      height: 26px;
      line-height: 26px;
    }
    .ant-menu-vertical .ant-menu-item {
      font-size: 10px;
      margin-top: 0px;
      margin-bottom: 0;
    }
  }
}
.tags {
  height: 24px;
  overflow: hidden;
  flex: 0 0 auto;
}
.input {
}
.menu {
  box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.09) !important;
}
.menu, .option-menu {
  position: absolute;
  z-index: 100;
  top: 34px;
  border-radius: @border-radius;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 310px;
}
.key {
  font-size: 10px;
  line-height: 24px;
  :global {
    .ant-divider,
    .ant-divider-vertical {
      margin-left: 4px;
      margin-right: 4px;
    }
  }
}
:global {
  .ant-form-item-has-error .magic-input-wrapper .ant-input,
  .ant-form-item-has-error .magic-input-wrapper .ant-input:focus,
  .ant-form-item-has-error .magic-input-wrapper .ant-input:not([disabled]):hover {
    background: none;
    border: none;
    box-shadow: none;
  }
}
.search-icon {
  position: absolute;
  right: 8px;
  top: 0;
  color: @color-text-body;
  font-size: 12px;
  line-height: 32px;
}
.close-btn {
  height: 28px !important;
}
.close-option-btn {
  height: 28px !important;
  top: 3px;
}
.magic-input-checks {
  line-height: 32px;
  margin-left: 8px;
}