@import '../../styles/basis.less';

.yk-upload-picture {
  overflow: hidden;
  width: 80px;
  height: 80px;
  border-radius: @radius-m;
  background: @bg-color-m;
  &--circle {
    border-radius: 50%;
  }
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  &__overlay-hover {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0;
    transition: opacity 0.3s ease;
    flex-direction: row;
    &--error {
      opacity: 0.2;
    }
  }
  .upload-icon {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    flex-direction: row;
  }
  .uploading-icons {
    cursor: pointer;
    fill: #fff;
    .progress-path {
      opacity: 0.5;
    }
  }
  .fail-icon {
    color: #fff;
    svg {
      font-size: 22px;
    }
  }
  .hover-icons {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 56px;
    height: 16px;
    font-size: @size-s;
    color: #fff;
    visibility: hidden;
    flex-direction: row;
    transform: translate(-50%, -50%);
    span {
      width: 100%;
    }
    svg {
      font-size: @size-s;
      cursor: pointer;
    }
  }
  &__review {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    flex-direction: row;
    img {
      max-width: 100%;
      max-height: 100%;
    }
  }
}
.yk-upload-picture:hover {
  .yk-upload-picture__overlay-hover {
    opacity: 0.4;
  }
  .yk-upload-picture__overlay-hover--error {
    opacity: 0.4;
  }
  .hover-icons {
    visibility: visible;
  }
  .fail-icon {
    visibility: hidden;
  }
}
