.imupl-files-list {
  width: 100%;
  position: relative;
  padding: 20px 0 0 0;
  float: left;
}

.imupl-file-item {
  width: 140px;
  height: 140px;
  background-color: #F5F5F5;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  margin:0 20px 20px 0;
  display: inline-block;
  overflow: hidden;
  position: relative;
  cursor: move;
  float: left;
}
.imupl-file-item:nth-child(1) {
  border: 2px solid blue;
}
.imupl-file-item:nth-child(1)::before {
  content: 'MAIN';
  display: block;
  position: absolute;
  right: 0;
  bottom: 0;
  border-top-left-radius: 10px;
  background: blue;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 6px;
}
.imupl-file-item .imupl-button-remove, .imupl-file-item .imupl-button-edit, .imupl-file-item .imupl-button-rotate-cw, .imupl-file-item .imupl-button-rotate-ccw {
  display: block;
  position: absolute;
  background: #e6e6e6;
  font-size: 18px;
  padding: 3px 6px;
  cursor: pointer;
}
.imupl-file-item.loading .imupl-button-remove, .imupl-file-item.loading .imupl-button-edit, .imupl-file-item.loading .imupl-button-rotate-cw, .imupl-file-item.loading .imupl-button-rotate-ccw {
  display: none;
}
.imupl-file-item .imupl-button-remove {
  left: 0;
  top: 0;
  border-bottom-right-radius: 10px;
  padding-right: 10px;
}
.imupl-file-item .imupl-button-edit {
  right: 0;
  top: 0;
  border-bottom-left-radius: 10px;
  padding-left: 10px;
}
.imupl-file-item .imupl-button-rotate-cw {
  bottom: 0;
  left: 30px;
  border-top-right-radius: 10px;
  padding-left: 10px;
}
.imupl-file-item .imupl-button-rotate-ccw {
  bottom: 0;
  left: 0;
  padding-left: 10px;
}

@media (max-width: 400px) {
  .imupl-file-item {
    width: 150px;
    height: 150px;
  }
}
.imupl-fileinput {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: fixed;
  left: -10px;
}

.imupl-dragdrop-hover {
  z-index: 9999;
  position: fixed;
  top: 25px;
  left: 25px;
  right: 25px;
  bottom: 25px;
  border: 5px rgba(0, 150, 0, 0.5) dashed;
  border-radius: 25px;
  background: rgba(0, 150, 0, 0.1);
  display: none;
  pointer-events: none;
}
.imupl-dragdrop-hover.active {
  display: initial;
}

.imupl-edit-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  transition: 0.2s opacity;
}
.imupl-edit-overlay .thumbnail {
  -webkit-transform: translateY(-100%);
          transform: translateY(-100%);
  transition: 0.5s -webkit-transform ease-in-out;
  transition: 0.5s transform ease-in-out;
  transition: 0.5s transform ease-in-out, 0.5s -webkit-transform ease-in-out;
}
.imupl-edit-overlay .thumbnail .img {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}
.imupl-edit-overlay.active {
  opacity: 1;
  pointer-events: initial;
}
.imupl-edit-overlay.active .thumbnail {
  -webkit-transform: translateY(0);
          transform: translateY(0);
}

.imupl-crop-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.imupl-cropper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid rgba(0, 0, 0, 0.5);
}

.imupl-cropper-start, .imupl-cropper-end {
  position: absolute;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
}

.imupl-cropper-start {
  top: -2px;
  left: -2px;
  border-top: 4px solid black;
  border-left: 4px solid black;
}

.imupl-cropper-end {
  bottom: -2px;
  right: -2px;
  border-bottom: 4px solid black;
  border-right: 4px solid black;
}

.ui-sortable-handle1 {display: inline-block; margin-bottom: 20px; position: relative; vertical-align: top; width: 140px; height: 140px; background: #fff; cursor: pointer; border: 1px solid #cccccc;}
.ui-sortable-handle i {position: absolute;
left: 0;
top: 50%;
right: 0;
text-align: center;
transform: translateY(-50%);
font-style: normal;
font-size: 32px;
font-weight: 100;
color: #333333;
}
.imupl-button-rotate-cw,
.imupl-button-rotate-ccw {display: none !important;}
.imupl-file-item .imupl-button-remove { left: 0; top: 20%;}
.imupl-file-item .imupl-button-edit {position: absolute; right: 0; top: 20%;}

/******************-*/

.upload-new {display: inline-block; margin-bottom: 20px; position: relative; vertical-align: top; width: 140px; height: 140px; background: #fff; cursor: pointer; border: 1px solid #cccccc; position: relative;}
.upload-new i {position: absolute;
left: 0;
top: 50%;
right: 0;
text-align: center;
transform: translateY(-50%);
font-style: normal;
font-size: 32px;
font-weight: 100;
color: #333333;
}

.upload-new input
  {
    width: 100%;
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
}

.upload-new .previewHolder {width: 140px; height: 140px; position: relative; cursor: default;}

.imupl-button-remove{
  display: block;
  position: absolute;
  background: #e6e6e6;
  font-size: 18px;
  padding: 3px 6px;
  cursor: pointer;
  width: 30px; height: 31px;
}
.imupl-button-remove {
  left: 0;
  top: 0;
  border-bottom-right-radius: 10px;
  padding-right: 10px;
}
.imupl-button-remove i {font-size: 18px;}

.imupl-files-list .pdiv.upload-new {
    margin: 0 19px 20px 0;
}
.imupl-files-list .pdiv.upload-new:nth-child(7) {
    margin-right: 0;
}

.upload-new .help-block {position: absolute; left: 0; bottom: -20px; margin: 0px;}