
/* Dropzone plugin */

.dropzone,
.form-group.dropzone {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: start;
  flex-wrap: wrap;
  min-height: $spacing-xxl;
  padding: $spacing-md;
  border: $border-width dashed $primary;
  border-radius: $border-radius;
  color: $black;
  cursor: pointer;
  &:hover, &.hovered {
    border-color: $link-hover-color;
    color: $link-hover-color;
  }
}

.dz-preview {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  height: auto;
  width: $spacing-xxl;
  margin-right: 0;
  border: none;
  background: transparent;
  overflow: hidden;
  box-shadow: none;

  & .dz-details {
    margin-top: $spacing-xxs;
    text-align: center;
    font-size: $font-size-xs;
    font-weight: normal;
    color: $black;
    white-space: normal;
    word-break: break-all;
  }

  & .dz-remove {
    z-index: 2;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    right: 0;
    width: $btn-sm-height;
    height: $btn-sm-height;
    background-color: $danger;
    border-radius: 0 $border-radius 0 0;
    &:hover {
      background-color: $link-hover-color;
    }
  }

  & .dz-remove::after {
    content: "";
    display: inline-block;
    height: $icon-sm;
    width: 14px;
    mask-image: url("@images/remove.svg");
    mask-repeat: no-repeat;
    background-color: $white;
  }
}

.dz-preview .dz-image {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  width: $spacing-xxl;
  height: $spacing-xxl;
  border-image-width: 0;
  color: $white;
  background-color: $primary;
  border-radius: $border-radius;
}


/*/// Fallback image  ///*/

.dz-image::after {
  content: "";
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-image: url("@images/attachment-fallbackimage.svg");
  background-size: cover;
}

.dz-preview .dz-image .icon {
  font-size: $icon-lg;
}

.dz-preview .dz-image img {
  z-index: 1;
  min-width: 100%;
  height: $spacing-xxl
}

.dz-filename {
  line-height: 1.1;
}

.dz-success-mark {
  display: none;
}

.dz-error-mark {
  display: none;
}

.dz-started {
  justify-content: start;
}

.dz-message {
  align-self: center;
}

.dz-started .dz-message {
  display: none;
}

.dz-error-message {
  margin-top: $spacing-xxs;
  color: $danger;
  font-size: $font-size-xs;
}

.dropzone-msg-title {
  text-align: center;
}

.dropzone-msg-desc {
  text-align: center;
  font-size: $font-size-xs;
}

.dz-size, .dz-size strong {
  font-size: $font-size-xs;
  font-weight: normal;
}

.dropzone.inverted {
  color: $white;
  &:hover, &.hovered {
    color: $link-hover-color;
  }
}

.dropzone.inverted .dz-preview, 
.dropzone.inverted .dz-preview .dz-image { 
  color: $white;
}

.dropzone.inverted .dz-details {
  color: $white;
}
