/**
* DevExtreme (widgets/material/fileUploader.material.less)
* Version: 20.1.2
* Build date: Mon Apr 06 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
@import (once) "./button.material.less";
@import (once) "./progressBar.material.less";

.dx-size-default() {
    @MATERIAL_FILEUPLOADER_VERTICAL_PADDING: 7px;
    @MATERIAL_FILEUPLOADER_FILE_CONTAINER_PADDING: 5px 8px;
    @MATERIAL_FILEUPLOADER_FILE_CONTAINER_TEXT_MARGIN: 15px;
    @MATERIAL_FILEUPLOADER_FILE_CONTAINER_BUTTON_MARGIN: 5px;
    @MATERIAL_FILEUPLOADER_FILE_CONTAINER_BUTTON_SIZE: 36px;
}
.dx-size-compact() {
    @MATERIAL_FILEUPLOADER_VERTICAL_PADDING: 7px;
    @MATERIAL_FILEUPLOADER_FILE_CONTAINER_PADDING: 2px 4px;
    @MATERIAL_FILEUPLOADER_FILE_CONTAINER_TEXT_MARGIN: 6px;
    @MATERIAL_FILEUPLOADER_FILE_CONTAINER_BUTTON_MARGIN: 2px;
    @MATERIAL_FILEUPLOADER_FILE_CONTAINER_BUTTON_SIZE: 28px;
}
@MATERIAL_FILEUPLOADER_FILE_WRAPPER_BORDER_SIZE: 3px;

.dx-fileuploader-wrapper {
    padding: @MATERIAL_FILEUPLOADER_VERTICAL_PADDING;
}

.dx-fileuploader-content > .dx-fileuploader-upload-button {
    margin-left: 3px;
    margin-right: 3px;
}

.dx-fileuploader-input-wrapper {
    padding: @MATERIAL_FILEUPLOADER_VERTICAL_PADDING 0 @MATERIAL_FILEUPLOADER_VERTICAL_PADDING;
    border: @MATERIAL_FILEUPLOADER_FILE_WRAPPER_BORDER_SIZE dashed transparent;
}

.dx-fileuploader.dx-state-disabled .dx-fileuploader-input-label {
    position: relative;
}

.dx-fileuploader-dragover {
    .dx-fileuploader-input-wrapper {
        border: none;
        padding: 0;

        .dx-fileuploader-button {
            display: none;
        }
    }

    .dx-fileuploader-input-label {
        text-align: center;
    }

    .dx-fileuploader-input-container {
        display: block;
        border: @MATERIAL_FILEUPLOADER_FILE_WRAPPER_BORDER_SIZE dashed @fileuploader-border-color;
        width: 100%;
    }

    .dx-fileuploader-input {
        display: block;
        width: 100%;
        padding: @MATERIAL_FILEUPLOADER_VERTICAL_PADDING*2 @MATERIAL_FILEUPLOADER_FILE_WRAPPER_BORDER_SIZE;
        //NOTE: height of the widget should be the same in default and drag over states
        margin-bottom: 1px;
        box-sizing: content-box;
    }

    .dx-fileuploader-input-label { // stylelint-disable-line no-duplicate-selectors
        padding: @MATERIAL_FILEUPLOADER_VERTICAL_PADDING*2 @MATERIAL_FILEUPLOADER_VERTICAL_PADDING + 2px;
    }
}

.dx-fileuploader-file-status-message,
.dx-fileuploader-file-size {
    color: @fileuploader-falename-status-color;
}

.dx-fileuploader-input {
    padding: @MATERIAL_FILEUPLOADER_VERTICAL_PADDING 0;
}

.dx-fileuploader-input-label {
    padding: @MATERIAL_FILEUPLOADER_VERTICAL_PADDING + (@MATERIAL_BASE_FONT_SIZE/2 - @MATERIAL_FILEUPLOADER_VERTICAL_PADDING)/2 + 1px @MATERIAL_FILEUPLOADER_VERTICAL_PADDING + 2px;
    color: @fileuploader-filename-color;
    .dx-overflow();
}

.dx-fileuploader-files-container {
    .dx-fileuploader-show-file-list & {
        padding: 14px 3px 0;
    }

    .dx-fileuploader-empty & {
        padding: 0;
    }

    .dx-invalid & {
        padding-top: 50px;
    }

    .dx-fileuploader-button .dx-button-content {
        padding: 0;
    }

    .dx-fileuploader-file-container {
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
        padding: @MATERIAL_FILEUPLOADER_FILE_CONTAINER_PADDING;
        margin-bottom: 4px;

        .dx-fileuploader-button-container + .dx-fileuploader-button-container {
            .dx-button {
                margin-right: @MATERIAL_FILEUPLOADER_FILE_CONTAINER_TEXT_MARGIN;

                .dx-rtl & {
                    margin-left: @MATERIAL_FILEUPLOADER_FILE_CONTAINER_TEXT_MARGIN;
                    margin-right: 0;
                }
            }
        }

        .dx-button {
            height: @MATERIAL_FILEUPLOADER_FILE_CONTAINER_BUTTON_SIZE;
            width: @MATERIAL_FILEUPLOADER_FILE_CONTAINER_BUTTON_SIZE;
            margin-right: @MATERIAL_FILEUPLOADER_FILE_CONTAINER_BUTTON_MARGIN;

            .dx-rtl & {
                margin-left: @MATERIAL_FILEUPLOADER_FILE_CONTAINER_BUTTON_MARGIN;
                margin-right: 0;
            }
        }
    }
}

.dx-fileuploader-file {
    padding-top: 5px;
    line-height: 13px;
}

.dx-fileuploader-file-name {
    padding-bottom: @MATERIAL_FILEUPLOADER_VERTICAL_PADDING/2;
    color: @fileuploader-filename-color;
    font-weight: 500;
}

.dx-fileuploader-file-size {
    padding-bottom: @MATERIAL_FILEUPLOADER_VERTICAL_PADDING/2;
}

.dx-fileuploader-invalid {
    .dx-fileuploader-file-status-message {
        color: @base-danger;

        span {
            &:first-child {
                margin-top: 2px;
            }

            &:last-child {
                margin-bottom: 2px;
            }
        }
    }

    .dx-fileuploader-button-container {
        vertical-align: middle;
    }

    .dx-fileuploader-cancel-button {
        margin-top: 0;
    }
}
