.ant-select {
  &.select-with-all-selection {
    width: 100%;
    .ant-select-selection-overflow-item {
      max-width: 97%;
      & > span {
        display: flex;
        align-items: center;
      }
    }
    .ant-tag {
      max-width: 100%;
      margin: 0;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      background: #f5f5f5;
      border: 1px solid #f0f0f0;
      margin-inline-end: 4px;
    }
  }
}

.ant-select-dropdown {
  &.select-with-all-dropdown {
    max-width: 768px;
    max-height: 360px;
    padding: 4px;
    overflow: auto;
    .ant-input-affix-wrapper {
      &.search-input {
        margin-bottom: 4px;
        background: rgba(0, 0, 0, 0.03);
        border: none;
        border-radius: 4px;
        box-shadow: none;
        .ant-input-prefix {
          font-size: 16px;
        }
        .ant-input {
          background: none;
        }
      }
    }
    .items {
      h5 {
        margin: 0;
        padding: 5px 8px;
        color: rgba(0, 0, 0, 0.85);
        font-size: 13px;
      }
      .ant-checkbox-wrapper {
        display: flex;
        width: 100%;
        margin: 2px 0;
        padding: 5px 8px 5px 16px;
        color: rgba(0, 0, 0, 0.65);
        border-radius: 4px;
        &.checkbox-all {
          padding-left: 8px;
          font-weight: 500;
        }
        &.ant-checkbox-wrapper-checked {
          font-weight: 500;
          background: #f0f7ff;
        }
        &:not(.ant-checkbox-wrapper-checked):hover,
        &:not(.ant-checkbox-wrapper-checked):focus {
          background: #f5f5f5;
        }
        .ant-tag {
          margin-left: 4px;
          color: #595959;
          background: #f4f4f4;
          border: none;
          border-radius: 4px;
        }
      }
    }
  }
}
