/**
* DevExtreme (widgets/material/fileManager.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) "../base/fileManager.less";
@import (once) "./toast.material.less";
@import (once) "./drawer.material.less";
@import (once) "./menu.material.less";
@import (once) "./contextMenu.material.less";
@import (once) "./popup.material.less";
@import (once) "./textBox.material.less";
@import (once) "./button.material.less";
@import (once) "./treeView.material.less";
@import (once) "./dataGrid.material.less";
@import (once) "./progressBar.material.less";
@import (once) "./scrollView.material.less";
@import (once) "./toolbar.material.less";
@import (once) "./splitter.material.less";

.dx-filemanager {
    border-color: @filemanager-border-color;

    .dx-filemanager-notification-common {
        border-color: @filemanager-border-color;
        color: @base-danger;
    }

    .dx-drawer-shrink .dx-filemanager-progress-panel {
        border-left-color: @filemanager-border-color;
    }

    .dx-filemanager-progress-panel {
        background-color: @base-bg;

        .dx-filemanager-progress-panel-title {
            padding-top: @FILEMANAGER_PROGRESS_PANEL_TITLE_PADDING;
            padding-bottom: @FILEMANAGER_PROGRESS_PANEL_TITLE_PADDING;
        }
    }

    .dx-filemanager-progress-box-image {
        font-size: @MATERIAL_BASE_ICON_SIZE;
    }

    .dx-filemanager-progress-box-error {
        color: @base-inverted-text-color;
        background: @base-danger;
    }

    .dx-filemanager-progress-box .dx-filemanager-progress-box-close-button {
        margin-top: @FILEMANAGER_PROGRESS_BOX_BUTTON_CLOSE_MARGIN_TOP;
    }

    .dx-filemanager-toolbar {
        background: @base-bg;

        &.dx-filemanager-file-toolbar,
        &.dx-filemanager-file-toolbar .dx-toolbar {
            background: @filemanager-file-toolbar-bg;
        }

        .dx-filemanager-toolbar-separator-item {
            height: @FILEMANAGER_TOOLBAR_SEPARATOR_HEIGHT;
            background: @filemanager-border-color;
        }

        .dx-filemanager-toolbar-viewmode-item .dx-texteditor {
            width: @FILEMANAGER_TOOLBAR_VIEWMODE_WIDTH;
        }

        .dx-texteditor.dx-editor-filled {
            background: transparent;

            &.dx-state-hover,
            &.dx-state-active,
            &.dx-state-focused {
                background: @filemanager-editor-active-bg;
            }

            &.dx-dropdowneditor {
                border-color: transparent;

                .dx-dropdowneditor-icon {
                    background: transparent;
                }

                &.dx-state-hover .dx-dropdowneditor-icon,
                &.dx-state-active .dx-dropdowneditor-icon {
                    background: transparent;
                    border-color: transparent;
                }
            }
        }

        .dx-toolbar .dx-filemanager-toolbar-viewmode-item .dx-button-content {
            padding-left: @FILEMANAGER_TOOLBAR_VIEWMODE_PADDING;
            padding-right: @FILEMANAGER_TOOLBAR_VIEWMODE_PADDING;
        }
    }

    .dx-filemanager-container {
        border-top-color: @filemanager-border-color;
    }

    .dx-filemanager-dirs-panel {
        border-right-color: @filemanager-border-color;
    }

    .dx-filemanager-breadcrumbs {
        border-bottom-color: @filemanager-border-color;

        .dx-menu-item {
            &.dx-state-focused {
                background: @filemanager-breadcrumbs-item-focus-bg;
                color: @filemanager-breadcrumbs-item-focus-color;
            }
        }

        .dx-menu-item-content {
            padding-top: @FILEMANAGER_BREADCRUMBS_ITEM_PADDING_TOP;
            padding-bottom: @FILEMANAGER_BREADCRUMBS_ITEM_PADDING_BOTTOM;
        }

        .dx-filemanager-breadcrumbs-separator-item .dx-menu-item-content {
            background: @filemanager-border-color;
        }

        .dx-filemanager-breadcrumbs-separator-item,
        .dx-filemanager-breadcrumbs-path-separator-item {
            &.dx-state-hover {
                background: transparent;
            }
        }
    }

    .dx-filemanager-thumbnails {
        &.dx-filemanager-inactive-area .dx-filemanager-thumbnails-view-port .dx-filemanager-thumbnails-item.dx-filemanager-item-selected {
            color: @base-text-color;
            background: @base-bg;
        }

        .dx-filemanager-thumbnails-item {
            &.dx-item-selected {
                color: @filemanager-file-item-select-color;
                background: @filemanager-file-item-select-bg;
            }

            &.dx-state-hover:not(.dx-state-focused):not(.dx-item-selected) {
                background: @filemanager-file-item-hover-bg;
            }

            &.dx-state-focused {
                border: @filemanager-file-item-focused-border 1px solid;
            }

            &.dx-item-selected.dx-state-focused {
                color: @filemanager-file-item-select-focus-color;
                background: @filemanager-file-item-select-focus-bg;
            }

            .dx-filemanager-thumbnails-item-thumbnail {
                width: @MATERIAL_BASE_ICON_SIZE * 2;
                height: @MATERIAL_BASE_ICON_SIZE * 2;
                font-size: @MATERIAL_BASE_ICON_SIZE * 2;
            }

            .dx-filemanager-item-custom-thumbnail {
                color: @filemanager-custom-thumbnail-color;
            }
        }
    }

    .dx-filemanager-files-view {
        background: @base-bg;

        &.dx-filemanager-details {
            .dx-filemanager-details-item-thumbnail {
                font-size: @MATERIAL_BASE_ICON_SIZE;
            }

            .dx-datagrid .dx-datagrid-content .dx-datagrid-table {
                .dx-command-select {
                    padding: 0;
                    width: @FILEMANAGER_DETAILS_VIEW_CHECKBOX_COLUMN_WIDTH;
                    min-width: @FILEMANAGER_DETAILS_VIEW_CHECKBOX_COLUMN_WIDTH;
                    max-width: @FILEMANAGER_DETAILS_VIEW_CHECKBOX_COLUMN_WIDTH;
                }

                .dx-filemanager-details-item-is-directory {
                    padding-right: 0;
                    padding-left: 0;
                }
            }

            .dx-row-focused .dx-filemanager-file-actions-button .dx-button .dx-icon {
                color: @filemanager-item-focused-color;
            }
        }
    }

    .dx-filemanager-details {
        .dx-filemanager-details-item-name-wrapper {
            align-items: center;
        }
    }
}

.dx-filemanager-dirs-tree.dx-treeview {
    .dx-treeview-item {
        padding-top: @FILEMANAGER_TREEVIEW_ITEM_TOP_BOTTOM_PADDING;
        padding-bottom: @FILEMANAGER_TREEVIEW_ITEM_TOP_BOTTOM_PADDING;
    }

    .dx-state-focused > .dx-treeview-item {
        background: transparent;

        &.dx-state-hover {
            background: @filemanager-dirs-tree-item-focus-bg;
        }

        & * {
            color: @filemanager-dirs-tree-item-focus-color;
        }
    }

    .dx-treeview-item-without-checkbox > .dx-treeview-item.dx-filemanager-focused-item {
        background: @filemanager-dirs-tree-item-focus-bg;

        & * {
            color: @filemanager-dirs-tree-item-focus-color;
        }
    }
}

.dx-filemanager-view-switcher-popup {
    width: 2 * @FILEMANAGER_TOOLBAR_VIEWMODE_PADDING + @MATERIAL_BASE_ICON_SIZE;

    .dx-dropdownbutton-popup-wrapper.dx-dropdownbutton-popup-wrapper .dx-list:not(.dx-list-select-decorator-enabled) .dx-list-item-content {
        padding-left: @FILEMANAGER_TOOLBAR_VIEWMODE_PADDING - 1px;
        padding-right: @FILEMANAGER_TOOLBAR_VIEWMODE_PADDING;
        text-overflow: clip;
    }
}

.dx-filemanager-dirs-tree.dx-treeview .dx-filemanager-file-actions-button .dx-button .dx-button-content {
    padding: 0;
}

.dx-filemanager-file-actions-button {
    .dx-button {
        min-width: @FILEMANAGER_FILE_ACTIONS_BUTTON_SIZE;
        height: @FILEMANAGER_FILE_ACTIONS_BUTTON_SIZE;

        .dx-button-content {
            padding: @FILEMANAGER_FILE_ACTIONS_BUTTON_TOP_BOTTOM_PADDING 6px;
        }
    }
}

.dx-filemanager-context-menu .dx-menu-item-has-text:not(.dx-menu-item-has-icon) .dx-menu-item-text {
    margin-left: @FILEMANAGER_CONTEXTMENU_TEXT_ITEM_LEFT_MARGIN;
}

.filemanager-icons-mixin(@base-text-color, @base-success, @base-inverted-text-color, @base-danger, @base-inverted-text-color, @FILEMANAGER_LARGE_ICON_SIZE);
