@import '../../styles/variables';

.ImageUpload {
  position: relative;
  display: inline-flex;
  border-radius: $border-radius;

  &_isUploaded {
    height: auto !important;
    min-height: auto !important;
  }

  &__title {
    margin-bottom: 10px;
  }

  &__description {
    width: 90%;
    text-align: center;
    margin-bottom: 24px;
    color: $gray70;
  }

  &__button {
    z-index: 1;
  }

  &__preview {
    position: relative;

    img {
      border-radius: $border-radius;
      overflow: hidden;
      height: auto;
      width: auto;
    }

    &-buttons {
      position: absolute;
      top: 0;
      right: 0;
      display: flex;
      align-items: center;
    }

    &-button {
      display: inline-flex;
      width: 25px;
      height: 26px;
      padding: 0;
      cursor: pointer;
      color: $white;
      border: 0;
      outline: 0;
      background-color: rgba(0, 0, 0, .5);
      font-size: $font-normal;
      font-weight: 100;
      justify-content: center;

      &:hover {
        background-color: rgba(0, 0, 0, .8);
      }

      &:first-child {
        border-bottom-left-radius: 3px;
      }
    }
  }

  &__uploader {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &__dropzone-area {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border: dashed 1px #999999;
    border-radius: $border-radius;
  }

  .Error {
    z-index: 2;
    position: absolute;
    bottom: 5px;
    right: 0;
  }
}
