
@imagePickerPrefixCls: fxm-image-picker;

.fxm-image-picker {
  &-list {
    padding: @v-spacing-md @h-spacing-md 0;
    margin-bottom: @h-spacing-lg;

    .fxm-flexbox {
      margin-bottom: @v-spacing-sm;
       justify-content: space-between;
      .fxm-flexbox-item {
        position: relative;
        margin-left: @h-spacing-sm;
        // margin-left: 0;
        flex: 0 0 32%;
        &:after {
          display: block;
          content: ' ';
          padding-bottom: 100%;
        }
        &.item-empty{
          flex: 0 0 100% !important;
          max-height: 100px !important;
          margin-left: 0 !important;
        }
        &:first{
          margin-left: 0 !important;
        }
      }
    }

    .fxm-image-picker-item {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 100%;
      height: 100%;
      
      .fxm-image-picker-item-remove {
        width: @icon-size-xxs;
        height: @icon-size-xxs;
        position: absolute;
        right: 6 * @hd;
        top: 6 * @hd;
        text-align: right;
        vertical-align: top;
        z-index: 2;
        background-size: @icon-size-xxs auto;
        .encoded-svg-background('image_picker_delete');
      }

      .fxm-image-picker-item-content {
        height: 100%;
        width: 100%;
        border-radius: @radius-sm;
        background-size: cover;
        border-radius: @image-picker-12;
      }

      img {
        width: 100%;
      }
    }

    .fxm-image-picker-upload-btn {
      box-sizing: border-box;
      border-radius: @radius-sm;
      // border: @border-width-md solid @border-color-base;
      // background-color: @fill-base;

      // &:before,
      // &:after {
      //   width: @border-width-md;
      //   height: 25 * @hd;
      //   content: " ";
      //   position: absolute;
      //   top: 50%;
      //   left: 50%;
      //   transform: translate(-50%, -50%);
      //   background-color: @color-icon-base;
      // }

      // &:after {
      //   width: 25 * @hd;
      //   height: @border-width-md;
      // }

      &-active {
        background-color: @fill-tap;
      }

      input {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        opacity: 0;
        width: 100%;
        height: 100%;
      }
      .bg{
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        background: rgba(0, 0, 0, 0.04);
        border-radius: @image-picker-12;
        .upload-btn-img{
          width: @image-picker-bg-width;
          height: auto;
          display: inline-block;
          margin: 0 auto;
        }
        .upload-btn-label1{
          font-size: @image-picker-label1-font-size;
          font-family: SFProText-Regular, SFProText;
          font-weight: 400;
          color: rgba(0, 0, 0, 0.65);
          line-height: @image-picker-16;
          white-space: nowrap;
          margin-top: 4 * @hd;
        }
        .upload-btn-label2{
          font-size: @image-picker-12;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: rgba(0, 0, 0, 0.45);
          line-height: 17 * @hd;
        }
      }
    }
  }
}
