/*!
 * Copyright 2021 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Gantt Chart start

// Gantt Main Layout

.k-gantt {
    box-sizing: border-box;
    white-space: nowrap;
    position: relative;
    display: flex;
    flex-flow: column nowrap;

    .k-splitbar {
        width: 5px;
        border-width: 0 1px;
        background-repeat: repeat-y;
        position: relative;
        cursor: e-resize;
        display: inline-block;
        vertical-align: top;
        flex-shrink: 0;
    }
}


// Gantt header
.k-gantt-header {
    border-width: 0 0 @toolbar-border-width;
    flex: 0 0 auto;
    z-index: 2;
}


// Gantt footer
.k-gantt-footer {
    border-width: @toolbar-border-width 0 0;
    flex: 0 0 auto;
}


// Toolbar
.k-gantt-toolbar {}
.k-gantt-toggle {
    display: none;
}


// View switcher
.k-gantt-views-wrapper {

    select.k-dropdown {
        width: auto;
        font: inherit;
        display: none;
        cursor: pointer;
    }

    @media (max-width: 1024px) {
        select.k-dropdown {
            display: inline-flex;
        }
        .k-gantt-views {
            display: none;
        }
    }
}


// Content
.k-gantt-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.k-gantt .k-gantt-content th,
.k-gantt .k-gantt-content .k-grid-header td
{
    vertical-align: bottom;
}

.k-gantt td
{
    overflow: hidden;
    white-space: nowrap;
    vertical-align: top;
}

.k-gantt .k-grid .k-edit-cell
{
    vertical-align: middle;
}

.k-gantt-treelist > .k-treelist,
.k-gantt-timeline > .k-timeline
{
    border-width: 0;
    height: 100%;
}

// Gantt TreeList
.k-gantt-treelist {
    display: inline-block;
    vertical-align: top;
    white-space: normal;
}

.k-gantt-treelist .k-grid-header tr
{
    height: 5em;
}

.k-gantt .k-treelist .k-grid-header
{
    padding: 0 !important;
}

.k-gantt .k-treelist .k-grid-content
{
    overflow-y: hidden;
    overflow-x: scroll;
}

.k-treelist-group > tr > span
{
    font-weight: bold;
}

.k-treelist-group .k-widget
{
    font-weight: normal;
}


// Gantt TimeLine
.k-gantt-timeline {
    display: inline-block;
    vertical-align: top;
    white-space: normal;
}

.k-gantt-timeline .k-grid-header tr,
.k-gantt-treelist .k-gantt-treelist-nested-columns .k-grid-header tr
{
    height: 2.5em;
}

.k-gantt-timeline .k-grid-header .k-header {
    vertical-align: bottom;
    cursor: default;
}

.k-gantt-tasks
{
    // needed for RTL
    position: relative;
}

.k-gantt-rows tr,
.k-gantt-tasks tr,
.k-gantt .k-grid-content tr
{
    height: 2.3em;
}

.k-gantt .k-gantt-tasks td:after {
    content: "\a0";
}

.k-gantt-timeline
{
    background: transparent;
}

.k-gantt-rows,
.k-gantt-columns,
.k-gantt-dependencies
{
    position: absolute;
    top: 0;
    left: 0;
}

.k-gantt-tables
{
    position: relative;
}

.k-gantt .k-timeline .k-grid-content
{
    overflow-x: scroll;
}

.k-gantt .k-gantt-timeline th,
.k-gantt-timeline .k-grid-header td
{
    text-align: center;
}

.k-gantt .k-gantt-timeline tr:first-child th,
.k-gantt .k-gantt-timeline .k-grid-header tr:first-child td
{
    border-bottom-width: 1px;
}

.k-gantt-timeline td.k-header {
    overflow: hidden;
    border-style: solid;
    border-width: 0 0 1px 1px;
    padding: .5em .6em .4em .6em;
    font-weight: 400;
    white-space: nowrap;
    text-overflow: ellipsis;
}

// Gantt TimeLine objects

// Summary

.k-task-summary
{
    height: 10px;
    display: inline-block;
    vertical-align: top;
    margin-top: 3px;
}

.k-task-summary-complete
{
    height: 10px;
    position: relative;
    z-index: 2;
}

.k-task-summary-progress
{
    height: 15px;
    overflow: hidden;
}

.k-task-summary:before,
.k-task-summary-complete:before,
.k-task-summary:after,
.k-task-summary-complete:after
{
    content: "";
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px;
    border-color: transparent;
}

.k-task-summary:before,
.k-task-summary-complete:before
{
    left: 0;
    border-left-color: inherit;
}

.k-task-summary:after,
.k-task-summary-complete:after
{
    right: 0;
    border-right-color: inherit;
}

// Lines
.k-gantt-line-h,
.k-gantt-line-v
{
    position: absolute;
}

.k-gantt-line-h
{
    height: 2px;
}

.k-gantt-line-v
{
    width: 2px;
}

.k-arrow-e,
.k-arrow-w
{
    position: absolute;
    top: -4px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px;
}

.k-arrow-e
{
    right: -6px;
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-right-color: transparent;
}

.k-arrow-w
{
    left: -6px;
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
}

// Milestone

.k-task-milestone
{
    width: 13px;
    height: 13px;
    margin-top: 3px;
    border-style: solid;
    border-width: 1px;
    transform: rotate(45deg);
    margin-left: -0.2em;
}

// Button

.k-gantt .k-gantt-treelist .k-button,
.k-gantt .k-gantt-tasks .k-button-icon
{
    padding-top: 0;
    padding-bottom: 0;
}

.k-gantt .k-gantt-tasks .k-button-icon
{
    margin-top: 4px;
}

.k-gantt .k-gantt-treelist .k-button
{
    margin-top: -4px;
    margin-bottom: -2px;
}

.k-gantt .k-gantt-tasks .k-button-icon
{
    padding-left: 2px;
    padding-right: 2px;
}

.k-gantt .k-gantt-treelist .k-button .k-icon,
.k-gantt .k-gantt-tasks .k-button .k-icon
{
    vertical-align: text-top;
}

.k-rel .k-button-icon
{
    position: absolute;
    left: 200px;
}

// Tasks

.k-rel
{
    position: relative;
    height: 0;
    top: -.3em;
}

.k-task-wrap
{
    position: absolute;
    display: inline;
    padding: 0 23px 5px;
    margin: -1px -23px 0;
    z-index: 2;
}

.k-task-wrap:hover,
.k-gantt-line.k-state-selected
{
    z-index: 3;
}

.k-milestone-wrap
{
    margin: 0 -13px 0 -27px;
}

.k-task-content
{
    position: relative;
    z-index: 2;
}

.k-task-complete
{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 20%;
    z-index: 1;
}

.k-task-dot
{
    position: absolute;
    top: 0;
    width: 16px;
    height: 16px;
    line-height: 16px;
    display: none;
    cursor: pointer;
}

.k-task-dot.k-state-hover
{
    background-color: transparent;
}

.k-task-single + .k-task-dot,
.k-task-single + .k-task-dot + .k-task-dot
{
    top: .2em;
}

.k-task-wrap:hover .k-task-dot,
.k-task-wrap-active .k-task-dot
{
    display: block;
}

.k-task-dot:before
{
    content: "\a0";
    display: inline-block;
    width: 0;
    height: 16px;
}

.k-task-dot:after
{
    content: "";
    display: inline-block;
    vertical-align: middle;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    margin-left: 4px;
}

.k-task-dot:hover:after,
.k-task-dot.k-state-hover:after,
.k-task-wrap-active .k-task-dot:after
{
    border-style: solid;
    border-width: 1px;
    margin-left: 3px;
}

.k-task-start
{
    left: 0;
}

.k-task-end
{
    right: 0;
}

.k-task-single
{
    border-style: solid;
    border-width: 1px;
    text-align: left;
    overflow: hidden;
    cursor: default;
    min-height: 1.3em;
    white-space: nowrap;
}

.k-task-template
{
    padding: .2em 1.4em .2em .6em;
    line-height: normal;
}

.k-task-actions,
.k-task-content > .k-link
{
    position: absolute;
    top: 0;
    right: 4px;
    white-space: nowrap;
}

.k-task-actions
{
    z-index: 1;
}

.k-task-actions:first-child
{
    position: static;
    float: left;
    margin: 4px 2px 0 4px;
}

.k-webkit .k-task-actions:first-child
{
    margin-top: 3px;
}

.k-task-actions:first-child > .k-link
{
    display: inline-block;
}

.k-task-delete
{
    display: none;
}

.k-task-wrap:hover .k-task-delete,
.k-task-wrap-active .k-task-delete
{
    display: inline-block;
}

.k-task-single .k-resize-handle
{
    position: absolute;
    visibility: hidden;
    z-index: 2;
    height: auto;
}

.k-task-single:hover .k-resize-handle,
.k-task-wrap-active .k-resize-handle
{
    visibility: visible;
}

.k-task-single .k-resize-handle:after
{
    content: "";
    position: absolute;
    opacity: .5;
}

.k-task-content > .k-resize-e
{
    right: 0;
    top: 0;
    bottom: 0;
    width: .4em;
}

.k-task-content > .k-resize-w
{
    left: 0;
    top: 0;
    bottom: 0;
    width: .4em;
}

.k-task-content > .k-resize-e:after,
.k-task-content > .k-resize-w:after
{
    left: 1px;
    top: 50%;
    margin-top: -.7em;
    height: 1.4em;
    width: 1px;
}

.k-task-content > .k-resize-e:after
{
    left: auto;
    right: 1px;
}

.k-task-draghandle
{
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    margin: 0 18px;
    border-width: 5px;
    border-style: solid;
    border-top-color: transparent;
    border-left-color: transparent;
    border-right-color: transparent;
    display: none;
    cursor: e-resize;
}

.k-task-wrap:hover .k-task-draghandle,
.k-task-wrap-active .k-task-draghandle
{
    display: block;
}

.k-gantt-dependency-hint
{
    z-index: 4;
}

// Higher row height styles

.k-gantt-rowheight .k-task-summary,
.k-gantt-rowheight .k-task-milestone,
.k-gantt-rowheight .k-task-dot,
.k-gantt-rowheight .k-task-single + .k-task-dot,
.k-gantt-rowheight .k-task-single + .k-task-dot + .k-task-dot
{
    top: 50%;
}

.k-gantt-rowheight .k-task-summary,
.k-gantt-rowheight .k-task-milestone
{
    margin-top: -6px;
}

.k-gantt-rowheight .k-task-dot,
.k-gantt-rowheight .k-task-single + .k-task-dot,
.k-gantt-rowheight .k-task-single + .k-task-dot + .k-task-dot
{
    margin-top: -11px;
}

.k-gantt-rowheight .k-task-single
{
    height: calc(100% - 2px);
}

.k-ie .k-gantt-rowheight .k-task-single
{
    height: 99%;
}

.k-gantt-rowheight .k-task-content
{
    height: 100%;
}

.k-gantt-rowheight .k-task-content > .k-resize-e:after,
.k-gantt-rowheight .k-task-content > .k-resize-w:after
{
    top: 0;
    margin-top: 0;
    height: 100%;
}

// Task Hover Tooltip

.k-task-details
{
    padding: .4em;
    text-align: left;
    white-space: nowrap;
}

.k-task-details > strong
{
    font-size: 120%;
    display: block;
}

.k-task-pct
{
    margin: .5em 0 .1em;
    font-size: 170%;
}

.k-task-details > ul
{
    line-height: 1.2;
}

// Resources

.k-resources-wrap
{
    position: absolute;
    display: inline;
    z-index: 2;
    zoom: 1;
    margin-left: 20px;
    margin-top: -2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.k-resources-wrap .k-resource
{
    margin: 0px 5px;
}

// Gantt Edit form

.k-gantt-edit-form > .k-edit-form-container
{
    width: 430px;
}

.k-gantt-edit-form > .k-resources-form-container
{
    width: 506px;
}

.k-resources-form-container > .k-grid
{
    margin: 0 .9em;
}

.k-gantt-edit-form > .k-edit-form-container .k-textbox,
.k-gantt-edit-form > .k-edit-form-container .k-numerictextbox
{
    width: 15em;
}

.k-gantt-edit-form .k-edit-buttons .k-gantt-delete
{
    float: left;
}

// Gantt Chart PDF export

.k-pdf-export-shadow .k-gantt {
    float: left;
}

// Remove all sizes and scrolling
.k-pdf-export-shadow .k-gantt,
.k-pdf-export-shadow .k-gantt-timeline,
.k-pdf-export-shadow .k-gantt .k-grid-content
{
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

.k-pdf-export-shadow .k-gantt-treelist
{
    height: auto !important;
    overflow: visible !important;
}

// Remove empty space reserved above the scrollbar
.k-pdf-export-shadow .k-gantt-timeline .k-grid-header
{
    padding: 0 !important;
}

// Hide the splitter
.k-pdf-export-shadow .k-gantt .k-splitbar,
.k-pdf-export-shadow .k-pdf-export
{
    display: none;
}


// Responsive styles

@media (max-width: 480px) {
    .k-gantt-toolbar {
        .k-gantt-toggle { display: inline-flex; }
        .k-button {
            padding: @button-padding-y;
            width: @button-calc-size;
            height: @button-calc-size;
        }
        .k-button .k-icon { margin: 0; }
        .k-button .k-button-text { display: none; }
    }

    .k-gantt .k-treelist .k-grid-content {
        overflow-y: scroll;
    }
}

// Gantt Chart end


.k-gantt-resize-hint {
    white-space: nowrap;
}
