@import "../../../style/themes/default";
@import "../../../style/mixins/index.less";

@enchanced-upload-uploadlist-prefix-cls: ~"@{mkui-prefix}-enhanced-upload-uploadlist";

@item-height: 46px;

.@{enchanced-upload-uploadlist-prefix-cls} {
  transition: all 0.3s;

  &-item {
    position: relative;
    margin-top: 10px;
    .size(242px, @item-height+2);
    background-color: #f9f9f9;
    border: 1px solid transparent;


    .@{enchanced-upload-uploadlist-prefix-cls}-thumbnail {
      float: left;
      &-img,
      &-file {
        display: flex;
        align-items: center;
        justify-content: middle;
        .size(@item-height, @item-height);
      }

      &-img {
        background-color: #999;

        img {
          width: 100%;
        }
      }

      &-file {
        border: solid 1px #3f3f3f;

        &-icon {
          width: 100%;
          font-size: 31px;
        }

        &.loading {
          border-color: #f9f9f9;

          .@{enchanced-upload-uploadlist-prefix-cls}-thumbnail-file-icon {
            font-size: 16px;
          }
        }
      }
    }

    &-detail {
      position: relative;
      margin-left: @item-height+16px;

      &-filename,
      &-filesize {
        .reset-component;
        font-size: 12px;
        line-height: @item-height / 2;
      }

      &-filesize {
        color: #999;
      }

      .@{enchanced-upload-uploadlist-prefix-cls}-icongroup {
        position: absolute;
        right: 0;
        bottom: 0;
        margin-right: 5px;
        opacity: 0;
        transition: opacity 0.2s;

        &-icon {
          margin: 2px 4px;
          color: #999;
          transition: color 0.2s;

          &:hover {
            color: @blue-6;
          }
        }
      }
    }

    &-progress {
      position: absolute;
      bottom: -3px;
      width: 100%;
      line-height: 2px;

      .@{mkui-prefix}-progress {
        line-height: 2px;
      }
    }

    &:hover {
      .@{enchanced-upload-uploadlist-prefix-cls}-icongroup {
        opacity: 1;
      }
    }
  }

  &-item-error {
    border: 1px dashed @error-color;
  }

  &-item-upload {
    border: 1px dashed #ddd;
  }

  &.horizontal {
    display: flex;
    flex-wrap: wrap;

    .@{enchanced-upload-uploadlist-prefix-cls}-item {
      margin-right: 13px;
    }
  }
}
