/*
File Upload

Theses are styles that drive our file upload

Markup:
<div>
    Default:
    <div style="padding:15px;height:210px;width:520px;position:relative;border:1px solid #E2E2E2;border-radius: 5px;">
        <h1 class="modal__title modal__title--file-upload" style="font-size: 20px">Upload File</h1>
        <button type="button" class="svgicon--btn icon-modal-close btn-close">
            <span class="screen-reader-only">Close file uploader</span>
        </button>
        <div class="file-upload__dropzone">
            Drag & Drop files here or
            <label class="file-upload__button">
                <input class="file-upload__input form-element--file-upload" type="file" name="files[]" id="file-upload-input"/>
                <span class="btn-cancel btn--default file-upload__link">Browse.</span>
            </label>
        </div>
    </div>
    <br/>
    File drag state:
    <div style="padding:15px;height:210px;width:520px;position:relative;border:1px solid #E2E2E2;border-radius: 5px;">
        <h1 class="modal__title modal__title--file-upload" style="font-size: 20px">Upload File</h1>
        <button type="button" class="svgicon--btn icon-modal-close btn-close">
            <span class="screen-reader-only">Close file uploader</span>
        </button>
        <div class="file-upload__dropzone file-upload__dropzone--hover">
            Drag & Drop files here or
            <label class="file-upload__button">
                <input class="file-upload__input form-element--file-upload" type="file" name="files[]" id="file-upload-input"/>
                <span class="btn-cancel btn--default file-upload__link">Browse.</span>
            </label>
        </div>
    </div>
    <br/>
    <div style="padding:15px;height:190px;width:520px;position:relative;border:1px solid #E2E2E2;border-radius: 5px;">
        Progress Bar Empty:
        <div class="file-upload__progress-field">
            <div class="file-upload__progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
                <span class=""></span>
            </div>
        </div>
        <br/>
        Progress Bar Full:
        <div class="file-upload__progress-field">
            <div class="file-upload__progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="100">
                <span class="file-upload__progress-bar-uploaded"></span>
            </div>
        </div>
    </div>
</div>

Name: fileUpload

Styleguide 2.16
*/
@color-border-progress-bar: @theme-grey10;
@color-file-upload-dropzone-text: @theme-grey12;
@color-file-upload-border: @theme-grey12;
@color-file-preview-border: @theme-grey3;

.file-upload {
}

.file-upload__button {
    position: relative;
    cursor: pointer;
}

.file-upload__link {
    min-width: 124px;
    text-align: center;
    color: @theme-green1;
    text-decoration: underline;
    font-size: @font-size-base;
}

.file-upload__input {
    display: none;
}

.file-upload__dropzone {
    width: 100%;
    margin-top: 45px;
    line-height: 100px;
    background-color: #ffffff;
    color: @color-file-upload-dropzone-text;
    text-align: center;
    border-radius: 7px;
    border: 1px dashed @color-file-upload-border;
    cursor: default;
}

.file-upload__dropzone--hover {
    border: 1px dashed @color-border-dashed-hover;
    box-shadow: 0 6px 12px 2px rgba(0,0,0,0.15);
}

.file-upload__dropzone-text {
    font-size: @font-size-base;
}

.file-upload__progress-field {
}

.file-upload__progress-bar {
    height: 10px;
    margin-bottom: 25px;
    margin-top: 25px;
    background: #FFFFFF;
    border: 1px solid @color-border-progress-bar;
    border-radius: @border-radius-default;
}

.file-upload__progress-bar-uploaded {
    display: block;
    height: 10px;
    background: linear-gradient(270deg, @color-gradient-start 0%, @color-gradient-end 100%);
    border-radius: 100px;
}

.file-upload-not-available-message {
    color: @color-not-available-message;
}

.files__modal-image {
    height: 300px;
    margin: 15px 0;
    text-align: center;
    background-color: #FFFFFF;
    line-height: 300px;
    border: 1px solid @color-file-preview-border;
    &:hover {
        text-decoration: none;
    }
}

.files__modal-image--image-preview {
    height: auto;
    max-height: 300px;
    line-height: normal;
    margin-left: auto;
    margin-right: auto;
}

.files__modal-image--file {
    display: block;
    line-height: normal;
    padding-top: 50px;
}

.files__modal-image--small-padding {
    padding-top: 38px;
}

.files__modal-image--preview {
    background-image: url("@{icons}file-preview-bg.png");
    background-repeat: no-repeat;

    box-sizing: border-box;

    &:hover {
        cursor: pointer;
    }
}

.files__modal-image--enforce-image-size {
    min-width: 100px;
    min-height: 100px;
    max-width: 500px;
    max-height: 300px;
}

.files__cannot-preview-message {
    margin-top: 10px;
    font-size: @font-size-base;
    color: @theme-grey9;
}

.files__preview-icon-container {
    width: 145px;
    height: 145px;
    margin: 0 auto;
    padding-left: 7px;
    padding-top: 40px;
    background-color: #FFFFFF;
    box-shadow: @full-page-content-box-shadow;
    border-radius: 50%;
    box-sizing: border-box;
}

.files__preview-icon {
    display:inline-block;
    background-image: url("@{icons}Unknown-preview-icon.svg");
    background-repeat: no-repeat;
    width: 60px;
    height: 60px;
}

.files__preview-icon--Excel {
    background-image: url("@{icons}Excel-preview-icon.svg");
    background-repeat: no-repeat;
}

.files__preview-icon--HTML {
    background-image: url("@{icons}HTML-preview-icon.svg");
    background-repeat: no-repeat;
}

.files__preview-icon--PDF {
    background-image: url("@{icons}PDF-preview-icon.svg");
    background-repeat: no-repeat;
}

.files__preview-icon--PowerPoint {
    background-image: url("@{icons}PowerPoint-preview-icon.svg");
    background-repeat: no-repeat;
}

.files__preview-icon--Word {
    background-image: url("@{icons}Word-preview-icon.svg");
    background-repeat: no-repeat;
}

.files__preview-icon--Zip {
    background-image: url("@{icons}zip-preview-icon.svg");
    background-repeat: no-repeat;
}

.files__modal-image-preview {
    max-height: 290px;
    max-width: 100%;
    vertical-align: middle;
}

.files__modal-image-preview--no-crop {
    max-width: 290px;
}

.file-upload__rotate-btn {
    position: absolute;
    top: 454px;
}

.file-upload__rotate-btn--no-crop {
    top: 368px;
}

.file-upload__rotate-btn--left {
    left: 60px;
}

.file-upload__rotate-btn--right {
    right: 60px;
}

.files__modal-image-rotate-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 290px;
}

/* this is used to style old code with file upload's that replaces the progress bar with an inline replaceable file upload. */

.replace {
    #filedrag, .file-upload__dropzone {
        position: relative;
        line-height: 70px !important;
        top: -35px;
    }

    .file-upload {
        padding-bottom: 0;
        margin-bottom: 10px;
    }

    .fileinput-button {
        margin: 0;
    }
}

.fileinput-button-font-size {
    font-size: 12px !important;
}
