.input-group-upload {
  cursor: pointer;

  & > .dada-input-group-input {
    overflow: hidden;
    align-items: center;

    & > .dada-input-addon-before {
      margin-right: $input-padding-x;
    }

    & > .input-field {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      opacity: 0;
    }
  }

  &.disabled {
    cursor: not-allowed;
  }
}

.dada-upload-placeholder {
  color: $input-placeholder-color;
}

/* 图片上传样式 start */
.upload-preview {
  position: relative;
  display: inline-block;
  width: $upload-preview-width;
  height: $upload-preview-height;
  vertical-align: middle;

  & > input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    opacity: 0;
  }
}

.upload-preview-inner {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  color: $upload-preview-color;
  border-radius: $border-radius;
}

.upload-preview-tool {
  border: $border-width dashed $upload-preview-border-color;
  background-color: $upload-preview-bg;

  &.disabled {
    cursor: not-allowed;
    color: $gray;
  }
}

.upload-preview-addon {
  width: $upload-preview-addon-width;
  height: $upload-preview-addon-height;
  font-size: $upload-preview-addon-font-size;
  line-height: $upload-preview-addon-height;
}

.upload-preview-text {
  padding-top: $upload-preview-text-padding-top;
  font-size: $upload-preview-text-font-size;
  line-height: $upload-preview-text-font-size;
}

/* 图片上传样式 end */

/* 图片预览样式 start */
.upload-preview-img {
  overflow: hidden;
  border: $border-width solid $upload-preview-img-border-color;
  background-color: $upload-preview-img-bg;

  &.disabled {
    cursor: default;

    & > .dada-upload-preview-mask {
      cursor: pointer;
    }
  }

  & > img {
    width: 100%;
    height: 100%;
    padding: $upload-preview-img-offset;
  }
}

.dada-upload-preview-img {
  width: $upload-preview-width;
  height: $upload-preview-height;
}

.dada-upload-preview-mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: $upload-preview-transition;
  opacity: 0;
  background-color: $upload-preview-wrapper-bg;

  &:hover {
    opacity: 1;
  }
}

.dada-upload-preview-action {
  padding: $upload-preview-ic-padding;
  font-size: $upload-preview-ic-font-size;
  opacity: .6;
  color: white;

  &:hover {
    opacity: 1;
  }
}

/* 图片预览样式 end */
// 大图查看 开始
.dada-big-img-preview {
  position: fixed;
  z-index: $zindex-modal;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  animation: fadeIn .36s ease;
  outline: 0;
  background-color: $upload-preview-wrapper-bg;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  &-container {
    position: relative;
    border: 1px solid #fff;
    &-wrap {
      width: 1000px;
      overflow: hidden;
      height: 100%;
      display: flex;
      flex-wrap: wrap;
      transition: transform .3s ease;
      .img {
        width: 100%;
        height: 100%;
      }
    }
    &-actions {
      position: absolute;
      bottom: 0;
      left: 50%;
      width: 252px;
      height: 35px;
      transform: translateX(-50%);
      background-color: aqua;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .actions-arrow {
        width: 40px;
        height: 40px;
        background: rgba(48,49,51,0.8);
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        .dada-ico {
          color: #fff;
        }
      }
    }
  }

  .dada-ico {
    cursor: pointer;
    opacity: .6;
    color: $upload-preview-remove-color;

    &:hover {
      opacity: 1;
    }
  }
}

.dada-big-img-preview-operations {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  text-align: center;

  & > .dada-ico {
    width: $upload-preview-big-img-action-btn-size;
    height: $upload-preview-big-img-action-btn-size;
    margin: $spacer-x;
    border-radius: $upload-preview-ic-border-radius;

    &:hover {
      box-shadow: $upload-preview-ic-shadow;
    }
  }
}

.dada-big-img-preview-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  overflow: auto;
}

.dada-big-img-preview-image {
  max-width: $upload-preview-big-img-max-width;
  max-height: $upload-preview-big-img-max-height;
  margin: auto;
}

.dada-big-img-preview-close {
  position: absolute;
  z-index: 1;
  top: $upload-preview-close-top;
  right: $upload-preview-close-right;
}

// 大图查看 结束
// 多图片上传
.dada-upload-preview-multiple {
  & > .upload-preview:not(:last-child) {
    margin-right: rem(16px);
  }
}
/* 多个文件上传列表样式 start */
.dada-upload-ul-outer {
  @include scroll-reset();

  width: 360px;
  max-height: 32px * 5;
  margin-top: 16px;
  overflow-y: scroll;
}

.dada-upload-ul {
  margin: 0;
  padding: 0;
}

.dada-upload-li {
  position: relative;
  display: flex;
  padding: 0 8px;
  align-items: center;
  list-style: none;

  &:hover {
    background-color: $gray-lightest;
  }
}

.dada-upload-li-text {
  display: flex;
  overflow: hidden;
  align-items: center;
  flex: 1;

  & > span {
    @include set-font-size(14px);

    padding: 5px 0;
    overflow: hidden;
    flex: 1;
    cursor: pointer;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: $gray-darker;

    &:hover {
      color: $brand-primary;
    }
  }
}

.dada-upload-li-ico {
  margin-right: 8px;
  color: $disabled-color;
}

.dada-upload-li-remove {
  cursor: pointer;
  color: $text-muted;
}

/* 多个文件上传列表样式 end */
