@import '../index.scss';

.ts-com-assetsuplad {
  width: 100%;
  height: 100%;
  padding: 0 40px;
  padding-top: 25px;

  .ts-com-assetsuplad-preview {
    width: 100%;
    height: calc(50% - 25px);
    // border: solid 1px #eaeaea;
    border: solid 1px $border-color-eaeaea;

    .ts-com-assetsuplad-preview-content {
      height: calc(100% - 40px);
    }

    .ts-com-assetsuplad-preview-footer {
      height: 40px;
      padding-left: 16px;
      font-size: 12px;
      line-height: 40px;
      color: $font-color-3f3f3f;
      background-color: rgba(0, 0, 0, 0.1);
      border-top: solid 1px $border-color-eaeaea;
    }
  }

  .ts-com-assetsuplad-tabs {
    width: 100%;
    height: calc(50% + 25px);
    padding-top: 5px;
  }

  .ts-image-item-veiw {
    display: inline-flex;
    margin-right: 18px;
    margin-bottom: 18px;
    text-align: center;
    vertical-align: top;
    flex-direction: column;
    align-items: center;
    cursor: pointer;

    &:hover {
      .ts-assets-item-veiw-img .ts-assets-item-veiw-close {
        display: block;
      }
    }

    .ts-assets-item-veiw-img {
      position: relative;
      height: 112px;
      cursor: pointer;

      .ts-assets-item-veiw-close {
        position: absolute;
        top: -7px;
        right: -7px;
        display: none;

        > img {
          width: 14px;
          height: 14px;
          background: black;
          border-radius: 50%;
        }
      }

      > img {
        height: 100%;
        max-width: 100%;
        min-width: 112px;
        min-height: 100%;
        object-fit: contain;
        border: solid 1px $border-color-eaeaea;
      }
    }

    .ts-assets-item-veiw-name {
      text-align: center;
    }
  }

  .ts-file-item-veiw {
    display: inline-flex;
    margin-right: 18px;
    margin-bottom: 18px;
    text-align: center;
    vertical-align: top;
    flex-direction: column;
    align-items: center;
    cursor: pointer;

    &:hover {
      .ts-assets-item-veiw-img .ts-assets-item-veiw-close {
        display: block;
      }
    }

    .ts-assets-item-veiw-img {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 112px;
      height: 112px;
      cursor: pointer;
      border: solid 1px #e3e4e5;

      .ts-assets-item-veiw-close {
        position: absolute;
        top: -7px;
        right: -7px;
        display: none;

        > img {
          width: 14px;
          height: 14px;
          background: black;
          border-radius: 50%;
        }
      }
    }

    .ts-assets-item-veiw-name {
      width: 120px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
}

.ts-com-assetsuplad-btn {
  display: flex;
  width: 113px;
  height: 112px;
  margin-right: 18px;
  color: #06f;
  cursor: pointer;
  // border: solid 1px #06f;
  border: solid 1px $border-color-06f;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  &:hover {
    opacity: 0.8;
  }

  img {
    width: 26px;
  }
}

.ts-com-assetsuplad-list {
  padding-top: 10px;
}

.ts-com-assetsuplad-preview-content {
  > img {
    // width: 100%;
    width:auto;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: auto;
  }

  > div {
    width: 100%;
    height: 100%;
    color: $font-color-black;
  }
}
