/**
* DevExtreme (widgets/generic/gantt.generic.less)
* Version: 20.1.8 (build 20303-1716)
* Build date: Thu Oct 29 2020
*
* Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
@import (once) "../base/gantt.less";
@import (once) "./scrollView.generic.less";
@import (once) "./treeList.generic.less";
@import (once) "./splitter.generic.less";

@gantt_successor_background_color: white;

.dx-gantt {
    border: 1px solid @base-border-color;

    .dx-gantt-toolbar-wrapper {
        padding: 5px;
        border-bottom: 1px solid @base-border-color;

        .dx-gantt-toolbar-separator {
            border-left-color: @base-border-color;
        }
    }

    .dx-treelist-text-content {
        min-height: @GANTT_TREELIST_TEXT_MIN_HEIGHT;
    }

    .dx-treelist-icon-container {
        max-height: @GANTT_TREELIST_TEXT_MIN_HEIGHT;
    }

    .dx-treelist .dx-treelist-rowsview .dx-selection.dx-row > td,
    .dx-treelist .dx-treelist-rowsview .dx-selection.dx-row:hover > td,
    .dx-treelist .dx-treelist-rowsview .dx-selection.dx-row > tr > td,
    .dx-treelist .dx-treelist-rowsview .dx-selection.dx-row:hover > tr > td {
        background-color: @gantt-selection-bg;
    }

    .dx-treelist-rowsview .dx-selection.dx-row > td,
    .dx-treelist-rowsview .dx-selection.dx-row:hover > td,
    .dx-treelist-rowsview .dx-selection.dx-row > tr > td,
    .dx-treelist-rowsview .dx-selection.dx-row:hover > tr > td {
        color: @base-text-color;
    }

    .dx-treelist-rowsview .dx-selection.dx-row.dx-row-lines > td,
    .dx-treelist-rowsview .dx-selection.dx-row:hover.dx-row-lines > td,
    .dx-treelist-rowsview .dx-selection.dx-row.dx-row-lines > tr > td,
    .dx-treelist-rowsview .dx-selection.dx-row:hover.dx-row-lines > tr > td {
        border-bottom-color: @base-border-color;
    }

    .dx-treelist-rowsview .dx-selection.dx-row.dx-column-lines > td,
    .dx-treelist-rowsview .dx-selection.dx-row:hover.dx-column-lines > td,
    .dx-treelist-rowsview .dx-selection.dx-row.dx-column-lines > tr > td,
    .dx-treelist-rowsview .dx-selection.dx-row:hover.dx-column-lines > tr > td {
        border-left-color: @base-border-color;
        border-right-color: @base-border-color;
    }

    .dx-treelist-rowsview tr:not(.dx-row-focused).dx-selection .dx-treelist-empty-space {
        color: @base-label-color;
    }

    .dx-gantt-view {
        background-color: @base-bg;
    }

    .dx-header-row {
        height: @GANTT_HEADER_ITEM_HEIGHT;
    }

    .dx-gantt-header {
        color: @datagrid-columnchooser-item-color;

        .dx-gantt-tsac,
        .dx-gantt-tsa,
        .dx-gantt-hb,
        .dx-gantt-vb {
            border-color: @base-border-color;
            background-color: @base-bg;
        }
    }

    .dx-gantt-si {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dx-gantt-tsac,
    .dx-gantt-tsa {
        border-bottom: 1px solid @base-border-color;
    }

    .dx-gantt-hb {
        border-top: 1px solid @base-border-color;
    }

    .dx-gantt-vb {
        border-left: 1px solid @base-border-color;
    }

    .dx-gantt-taskWrapper {
        padding-top: @GANTT_TASK_WRAPPER_PADDING_TOP;

        .dx-gantt-task,
        .dx-gantt-titleOut {
            height: @GANTT_TASK_HEIGHT;
            line-height: @GANTT_TASK_HEIGHT;
        }

        .dx-gantt-task {
            background-color: @base-accent;
            border-radius: @base-border-radius;

            .dx-gantt-tPrg {
                border-radius: @base-border-radius;
                background-color: rgba(0, 0, 0, 0.2);
            }

            &.dx-gantt-smallTask {
                border-radius: @base-border-radius;

                .dx-gantt-titleIn {
                    padding: 0 2px;
                }
            }

            &.dx-gantt-parent {
                height: @GANTT_TASK_HEIGHT - 2px;
                line-height: @GANTT_TASK_HEIGHT - 2px;
                background-color: @gantt-parent-task-bg;
                border-left-color: @gantt-parent-task-bg;
                border-right-color: @gantt-parent-task-bg;
                border-top-color: @gantt-parent-task-bg;
                border-bottom-right-radius: 0;
                border-bottom-left-radius: 0;

                &:not(.dx-gantt-noPrg) .dx-gantt-tPrg {
                    background-color: rgba(255, 255, 255, 0.2);
                }

                &:not(.dx-gantt-smallTask)::before,
                &:not(.dx-gantt-smallTask)::after,
                &:not(.dx-gantt-smallTask):not(.dx-gantt-noPrg) .dx-gantt-tPrg::before,
                &:not(.dx-gantt-smallTask).dx-gantt-cmpl .dx-gantt-tPrg::after {
                    content: '';
                    position: absolute;
                    bottom: -8px;
                    border-width: 4px;
                    border-style: solid;
                }

                &::before,
                &:not(.dx-gantt-noPrg) .dx-gantt-tPrg::before {
                    left: 0;
                    border-right-color: transparent;
                    border-bottom-color: transparent;
                }

                &:not(.dx-gantt-noPrg) .dx-gantt-tPrg::before {
                    border-left-color: rgba(255, 255, 255, 0.2);
                    border-top-color: rgba(255, 255, 255, 0.2);
                }

                &::after,
                &.dx-gantt-cmpl .dx-gantt-tPrg::after {
                    right: 0;
                    border-left-color: transparent;
                    border-bottom-color: transparent;
                }

                &.dx-gantt-cmpl::after {
                    border-right-color: rgba(255, 255, 255, 0.2);
                    border-top-color: rgba(255, 255, 255, 0.2);
                }

                &.dx-gantt-cmpl .dx-gantt-tPrg::after {
                    border-right-color: @gantt-parent-task-bg;
                    border-top-color: @gantt-parent-task-bg;
                }

                .dx-gantt-task-edit-frame {
                    height: @GANTT_TASK_HEIGHT - 2px;
                }
            }
        }

        .dx-gantt-titleIn {
            color: #fff;
            padding: 0 @GANTT_TASK_TITLE_PADDING_LEFT;
        }
    }

    .dx-gantt-taskRes {
        height: @GANTT_TASK_HEIGHT;
        line-height: @GANTT_TASK_HEIGHT;
        color: #fff;
        background-color: #999;
        border-radius: @base-border-radius;
        margin-left: 21px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .dx-gantt-titleOut {
        padding-right: 20px;
    }

    .dx-gantt-milestone {
        background-color: @base-text-color;
        width: @GANTT_MILESTONE_SIZE;
        height: @GANTT_MILESTONE_SIZE;
    }

    .dx-gantt-task-edit-wrapper {
        padding-top: @GANTT_TASK_WRAPPER_PADDING_TOP;
        padding-left: 1px;

        .dx-gantt-task-edit-frame {
            height: @GANTT_TASK_HEIGHT;
            border: 1px solid darken(@base-accent, 10%);
            border-radius: @base-border-radius;

            .dx-gantt-task-edit-progress {
                border-color: transparent transparent darken(@base-accent, 10%) transparent;

                &:before {
                    width: 12px;
                    height: 6px;
                    bottom: -14px;
                    border: 1px solid darken(@base-accent, 10%);
                }
            }

            .dx-gantt-task-edit-progress-status {
                border-radius: @base-border-radius;
            }
        }
    }

    .dx-gantt-task-edit-wrapper-successor {
        padding-top: @GANTT_TASK_WRAPPER_PADDING_TOP;

        .dx-gantt-task-edit-frame-successor {
            height: @GANTT_TASK_HEIGHT;
        }
    }

    .dx-gantt-task-edit-dependency-r,
    .dx-gantt-task-edit-successor-dependency-r,
    .dx-gantt-task-edit-dependency-l,
    .dx-gantt-task-edit-successor-dependency-l {
        background: @gantt_successor_background_color;
        border: 1px solid darken(@base-accent, 10%);
        width: @GANTT_DEPENDENCY_SUCCESSOR_SIZE;
        height: @GANTT_DEPENDENCY_SUCCESSOR_SIZE;
        top: (@GANTT_TASK_HEIGHT - @GANTT_DEPENDENCY_SUCCESSOR_SIZE - 1) / 2;
    }

    .dx-gantt-task-edit-dependency-r,
    .dx-gantt-task-edit-successor-dependency-r {
        left: -@GANTT_DEPENDENCY_SUCCESSOR_SIZE - 1px;
    }

    .dx-gantt-task-edit-dependency-l,
    .dx-gantt-task-edit-successor-dependency-l {
        right: -@GANTT_DEPENDENCY_SUCCESSOR_SIZE - 1px;
    }

    .dx-gantt-task-edit-dependency-line {
        background-color: @base-text-color;
    }

    .dx-gantt-sel {
        background-color: @gantt-selection-bg;
        border-top: 1px solid @datagrid-selection-bg;
        border-bottom: 1px solid @datagrid-selection-bg;
    }

    .dx-gantt-tac-hb .dx-gantt-sel {
        border: none;
    }

    .dx-gantt-conn-v {
        border-left-color: @base-text-color;
    }

    .dx-gantt-conn-h {
        border-top-color: @base-text-color;
    }

    .dx-gantt-arrow {
        border: 5px solid @base-text-color;
    }

    .dx-gantt-tm {
        border-left: 1px dashed @base-accent;
    }

    .dx-gantt-ti {
        border-left: 1px dashed @base-accent;
        border-right: 1px dashed @base-accent;
        background-color: fade(@base-accent, 15%);
    }

    .dx-gantt-altRow,
    .dx-gantt-collapsable-row {
        background-color: @gantt-collapsable-row-bg;
    }
}

.dx-form {
    &.dx-cv-dialog {
        padding-bottom: @GANTT_CV_DIALOG_PADDING_BOTTOM;

        .dx-cv-dialog-row {
            padding-top: @GANTT_CV_DIALOG_ROW_PADDING_TOP;
        }
    }
}

.gantt-icons-mixin(@gantt-icon-color);
