@import 'vars';
// z-index
$file-action-wrap-z-index: $zindex-overlay;

.upload-form {
  cursor: pointer;
}

.upload-form input {
  position: absolute;
  top: 0;
  right: 0;
  display: none;
  width: 100%;
  height: 100%;
  margin: 0;
  font-size: 200px;
  cursor: pointer;
  -ms-filter: "alpha(opacity=0)";
  opacity: 0;
  direction: ltr;
}

.uploader-inline {
  border: 2px dashed $gray-400;
  border-radius: $border-radius;
}

.upload-instructions {
  margin: 150px 20px;
  font-size: 24px;
  text-align: center;
}

@include media-breakpoint-down(lg) {
  .upload-instructions {
    margin: 120px 20px;
    font-size: 22px;
  }
}

@include media-breakpoint-down(md) {
  .upload-instructions {
    margin: 100px 20px;
    font-size: 20px;
  }
}

@include media-breakpoint-down(sm) {
  .upload-instructions {
    margin: 60px 20px;
    font-size: 16px;
  }
}

.has-file {
  .file-wrap {
    padding: 20px;
    background: #fff;
    border-radius: $border-radius;
  }

  .uploader-inline {
    display: none;
  }
}

.file-wrap {
  .template-download {
    .file-action-wrap {
      display: none;
      opacity: 0;
    }

    &:hover {
      .file-action-wrap {
        display: block;
        opacity: 1;
      }
    }
  }

  .other-file {
    img {
      display: none;
    }

    .preview {
      background-image: url(file-type.png);
      background-repeat: no-repeat;
      background-position: center center;
    }
  }

  .file-item {
    position: relative;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: $border-radius;
    transition: all .3s;
  }

  .info-wrap {
    .title {
      overflow: hidden;
      text-align: center;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  .file-action {
    position: absolute;
    top: 90px;
    left: 0;
    width: 100%;
    text-align: center;

    &-wrap {
      position: absolute;
      top: 0;
      left: 0;
      // z-index: 999;
      z-index: $file-action-wrap-z-index;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, .6);
      transition: all .3s;
      //.z-index(overlay);
    }

    .icon {
      margin-right: 30px;
      font-size: 22px;
      color: #fff;

      &:last-child {
        margin-right: 0;
      }
    }
  }

  .preview {
    position: relative;
    width: 100%;
    height: 190px;
    margin-bottom: 10px;
    overflow: hidden;
    background-color: black;
    border-radius: 4px;
    opacity: .6;
    transition: all .3s;

    canvas {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }

    img {
      max-width: 100%;
      height: initial;
    }
  }

  .progress {
    position: absolute;
    top: 90px;
    display: none;
    width: 100%;
    text-align: center;
  }
}

.template-download {
  .preview {
    opacity: 1;

    img {
      width: 100%;
      height: 100%;
    }
  }
}

