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

.photo-upload-item {
  width: 100%;
  height: 252px;
  margin-bottom: 24px;

  .ant-upload-picture-card-wrapper {
    width: 100%;
    height: 100%;
  }

  .ant-upload.ant-upload-select-picture-card {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    margin: 0;
    background-color: $white;
    border: 1px dashed $gray4;

    .ant-upload {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      padding: 0;
      height: 100%;
      position: absolute;
      top: 0;
      width: 100%;
    }
  }

  .ant-upload--has-data {
    .ant-upload {
      border: none;
    }
  }

  .photo-preview-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    &__hover {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border-radius: $borderRadius;
      background: rgba(255, 255, 255, 0.6);
    }
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: top;
      border-radius: $borderRadius;
    }

    .btn-delete {
      position: absolute;
      top: -12px;
      right: -12px;
      z-index: 99;
      width: 24px;
      height: 24px;
      border: none;
      background-color: $white;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12) !important;
      padding: 0;

      svg {
        width: 24px;
        height: 24px;
      }
    }
  }
}

@media only screen and (max-width: 768px) {
  .photo-upload-item {
    height: 163px;

    .profile-upload {
      width: 163px !important;

      .ant-upload {
        height: 163px !important;
      }
    }
  }
}
