@import '../scss/base';

$imageSize: 100px;

.r-upload{
  .r-upload-select{
    display: inline-block;
  }

  .r-upload-input{
    display: none;
  }

  .r-upload-list{
    margin-top: 8px;
  }
  .r-upload-listimage{
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
  }
  
  .r-upload-list-file{
    padding: 4px;

    >div{
      display: flex;
      align-items: center;

      >span{
        cursor: pointer;
        display: inline-flex;
        align-items: center;
  
        span{
          margin-left: 4px;
        }
      }
    }

    .r-upload-list-remove{
      cursor: pointer;
      margin-right: 4px;
      display: none;
      margin-left: auto;
    }

    &:hover{
      background-color: $color-white-dark;
      color: $color-primary; 

      .r-upload-list-remove{
        display: inline-block;
      }
    }
  }

  .r-upload-list-image{
    display: inline-flex;
    align-items: center;

    width: $imageSize;
    height: $imageSize;
    text-align: center;
    border: 1px solid $color-border;
    overflow: hidden;
    background-color: $color-white;
    position: relative;

    margin-right: 4px;
    margin-bottom: 4px;

    img{
      width: 100%;
    }

    .r-upload-list-image-cover{
      display: none;
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      background-color: rgba(0, 0, 0, 0.6); 

      i{
        color: $color-white;
        font-size: 20px;
        cursor: pointer;
        display: inline;
        margin: 0 2px;
      }
    }

    &:hover{
      .r-upload-list-image-cover{
        display: flex;
        align-items: center;
        justify-content: center; 
      }
    }
  }
}