/*! Image Uploader - v1.0.0 - 15/07/2019
 * Copyright (c) 2019 Christian Bayer; Licensed MIT */


/* Base style */

.image-uploader {
    min-height: 10rem;
    border: 1px مباع #d9d9d9;
    position: relative;
}


/* Style on hover */

.image-uploader.drag-over {
    background-color: #f3f3f3;
}


/* Hide the file input */

.image-uploader input[type="file"] {
    width: 0;
    height: 0;
    position: absolute;
    z-index: -1;
    opacity: 0;
}


/* Text container */

.image-uploader .upload-text {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.image-uploader .upload-text i {
    display: block;
    font-size: 3rem;
    margin-bottom: .5rem;
}

.image-uploader .upload-text span {
    display: block;
}


/* Hide the text if there is at least one uploaded image */

.image-uploader.has-files .upload-text {
    display: none;
}


/* Uploaded images container */

.image-uploader .uploaded {
    padding: .5rem;
    line-height: 0;
}

.image-uploader .uploaded .uploaded-image {
    display: inline-block;
    width: calc(16.6666667% - 1rem);
    padding-bottom: calc(16.6666667% - 1rem);
    height: 0;
    position: relative;
    margin: .5rem;
    background: #f3f3f3;
    cursor: default;
}

.image-uploader .uploaded .uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
}


/* Delete image button */

.image-uploader .uploaded .uploaded-image .delete-image {
    display: none;
    cursor: pointer;
    position: absolute;
    top: .2rem;
    right: .2rem;
    border-radius: 50%;
    padding: .3rem;
    background-color: rgba(0, 0, 0, .5);
    -webkit-appearance: none;
    border: none;
}

.image-uploader .uploaded .uploaded-image:hover .delete-image {
    display: block;
}

.image-uploader .uploaded .uploaded-image .delete-image i {
    color: #fff;
    font-size: 1.4rem;
}