@import (reference) './variable.less';

@imageUploadPrefix: ant-image-upload;

.@{imageUploadPrefix} {
  display: flex;
  flex-wrap: wrap;
  background: @image-upload-background-color;

  &-show {
    position: relative;
  }

  &-image {
    width: 160 * @rpx;
    height: 160 * @rpx;
    margin: @image-upload-common-margin;
    border-radius: @corner-radius-md;
  }

  &-close {
    width: @image-upload-close-tip-width;
    height: @image-upload-close-tip-height;
    position: absolute;
    z-index: 99;
    top: @image-upload-size-base * -1;
    right: 0;
    background: url(@image-upload-close-tip-url) no-repeat;
    background-size: cover;
  }

  &-add-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160 * @rpx;
    height: 160 * @rpx;
    margin: @image-upload-add-image-container-margin;
    background-color: @image-upload-wrapper-background;
    border-radius: @corner-radius-md;
  }
  &-add-image-icon {
    color: @COLOR_TEXT_ASSIST;
  }
  &-cover {
    position: absolute;
    width: 160 * @rpx;
    height: 160 * @rpx;
    margin: @image-upload-common-margin;
    border-radius: @corner-radius-md;
    background-color: @image-upload-cover-background;
    display: flex;
    justify-content: center;
    align-items: center;

    &-loading {
      text-align: center;

      &-icon {
        width: 48 * @rpx;
        height: 48 * @rpx;
      }

      &-text {
        color: @image-upload-text-color;
        font-size: 24 * @rpx;
        margin-top: 8 * @rpx;
      }
    }

    &-error {
      text-align: center;

      &-icon {
        font-size: 48rpx;
        color: @image-upload-text-color;
      }

      &-text {
        color: @image-upload-text-color;
        font-size: 24rpx;
        margin-top: 8rpx;
      }
    }
  }
}
