html, body {
    height: 100%;
    width: 100%;
    -ms-high-contrast-adjust: none;
    cursor: default;
}

#plugin-contextmenu-container {
    /**
     * This puts the plugin context menu element behind all of our view
     * so that it does not intercept any events. This element is only used
     * to generate HTML passed to the context menu ScriptedSandbox instance
     * and is never shown on this DOM.
     */
    z-index: -1;
}

body {
    margin: 0px;
    padding: 0px;
    font-family: var(--plugin-font-family, "Segoe Script"), Arial, sans-serif;
    font-size: var(--plugin-font-size, 12px);
    color: var(--plugin-color, rgb(0, 0, 0));
    /* This will set the toolbar as the top row and the grid using the remaining space */
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr;
}

.icon {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

    .icon svg {
        width: auto;
        height: 100%;
        vertical-align: baseline;
    }

.mainArea {
    grid-row: 2;
    grid-column: 1;
    position: relative;
    flex-direction: row;
    display: flex;
    overflow: hidden;
}

.container {
    position: relative;
    overflow: hidden;
}

#leftSide {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.header {
    font-weight: bold;
    font-size: 1.25em;
    border: 1px solid #CCCEDB;
    border-left-width: 0px;
    border-right-width: 0px;
    padding: 3px 0px 2px 5px;
    margin-top: 0px;
    display: block;
}

.subHeader {
    border: 1px solid var(--Header-SeparatorLine-Background, chartreuse);
    border-left-width: 0px;
    border-right-width: 0px;
    padding: 3px 0px 2px 5px;
    margin-top: 0px;
    display: block;
}

.boxedTreeGrid {
    padding: 5px;
}

.dashboardTitleRow > th {
    text-align: left;
    background-color: var(--CommonControls-InnerTabActiveBackground-Background, lawngreen);
}

.issueDescription {
    white-space: normal;
}

.dashboardName {
    min-width: 40em; /* Provides space for name to show while not being overly large */
}

#GcSummary {
    flex: 1 1 auto;
    overflow: hidden;
}

.treeGridContainer {
    width: 100%;
    height: 100%;
}

#sideBar {
    border-left: 1px solid var(--Environment-CommandBarOptionsBackground-Background, chartreuse);
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 10em;
    overflow: auto;
    min-height: 8em; /* forces containers to resize to fit proportionally */
}

    #sideBar > div {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    #sideBar .title {
        flex: 0 0 auto;
        line-height: 26px; /* TODO(Nik) Match this to the tree grid next to it */
        text-align: center;
        background-color: var(--Environment-CommandBarGradientBegin-Background, chartreuse);
        white-space: nowrap;
    }

    #sideBar .pieChartContainer {
        /* Setting the basis to 1px forces the chart to resize to whatever the remaining size is */
        flex: 1 1 1px;
        display: flex; /* allows pie chart to shrink its height */
        min-height: 20px; /* prevents it from disappearing */
        min-width: 20px;
        height: 100%;
        width: 100%;
        justify-content: center
    }

    #sideBar .legend {
        flex: 0 0 auto;
        margin: 2px;
    }

/* Sidebar style overrides */
.sidebar-container {
    position: relative;
    /* Setting the basis to 1px forces the chart to resize to whatever the remaining size is */
    flex: 1 1 1px;
    min-height: auto;
}

/* Toolbar style overrides */
.toolbar-container {
    grid-row: 1;
}

    .toolbar-container > * {
        margin: auto 3px;
    }

    .toolbar-container > *:first-child {
        /** This anchors our content to the right side of the toolbar */
        margin-left: auto;
    }

/* Default element styles */
.checkboxLabel {
    color: var(--CommonControls-CheckBoxText-Background, fuchsia);
}

checkboxLabel:hover {
    color: var(--CommonControls-CheckBoxTextHover-Background, fuchsia);
}

.checkboxLabel:active {
    color: var(--CommonControls-CheckBoxTextPressed-Background, fuchsia);
}

.checkboxLabel:focus {
    color: var(--CommonControls-CheckBoxTextFocused-Background, fuchsia);
}

.checkboxLabel:disabled {
    color: var(--CommonControls-CheckBoxTextDisabled-Background, fuchsia);
}

input[type=checkbox] {
    outline: none;
}

    input[type=checkbox]:checked {
        color: var(--CommonControls-CheckBoxGlyph-Background, fuchsia);
        background-color: var(--CommonControls-CheckBoxBackground-Background, aquamarine);
        border: 1px solid var(--CommonControls-CheckBoxBorder-Background, red)
    }

    input[type=checkbox]:active:checked {
        color: var(--CommonControls-CheckBoxGlyphPressed-Background, fuchsia);
        border-color: var(--CommonControls-CheckBoxBorderPressed-Background, red);
        background-color: var(--CommonControls-CheckBoxBackgroundPressed-Background, red);
    }

    input[type=checkbox]:focus:checked {
        color: var(--CommonControls-CheckBoxGlyphFocused-Background, fuchsia);
        border-color: var(--CommonControls-CheckBoxBorderFocused-Background, red);
        background-color: var(--CommonControls-CheckBoxBackgroundFocused-Background, red);
    }

    input[type=checkbox]:disabled:checked {
        color: var(--CommonControls-CheckBoxGlyphDisabled-Background, fuchsia);
        border-color: var(--CommonControls-CheckBoxBorderDisabled-Background, red);
        background-color: var(--CommonControls-CheckBoxBackgroundDisabled-Background, transparent);
    }

/* Filter control */
input.filter {
    padding: 0px 0px 0px 3px;
    width: 150px;
    border: 1px solid var(--SearchControl-UnfocusedBorder-Background, lawngreen);
    background-color: var(--SearchControl-Unfocused-Background, lawngreen);
    color: var(--SearchControl-Unfocused-Foreground, fuchsia);
}

    input.filter:focus {
        color: var(--SearchControl-FocusedBackground-Foreground, coral);
        background-color: var(--SearchControl-FocusedBackground-Background, lawngreen);
        border-color: var(--SearchControl-FocusedBorder-Background, fuchsia);
    }

    input.filter:hover {
        color: var(--SearchControl-MouseOverBackground-Foreground, deeppink);
        background-color: var(--SearchControl-MouseOverBackground-Background, lawngreen);
        border-color: var(--SearchControl-MouseOverBorder-Background, fuchsia);
    }

    input.filter:disabled {
        color: var(--SearchControl-Disabled-Foreground, mediumorchid);
        background-color: var(--SearchControl-Disabled-Background, lawngreen);
        border-color: var(--SearchControl-DisabledBorder-Background, fuchsia);
    }

    input.filter:active {
        color: var(--SearchControl-SearchActive-Foreground, red);
        background-color: var(--SearchControl-SearchActive-Background, lawngreen);
    }

    input.filter::selection {
        color: var(--SearchControl-Selection-Foreground, coral);
        background-color: var(--SearchControl-Selection-Background, forestgreen);
    }

/** No data overlay */
#message-overlay {
    grid-row: 2;
    grid-column: 1;
    position: relative;
    overflow: hidden;
    z-index: 10000;
    transition: opacity .25s, height 0s;
    background-color: var(--plugin-background-color, rgba(200, 200, 200, 0.50));
}

#backtrace-message-overlay {
    position: relative;
    overflow: hidden;
    z-index: 1000;
    transition: opacity .25s, height 0s;
    background-color: var(--plugin-background-color, rgba(200, 200, 200, 0.50));
    height: 100%;
    grid-row: 2;
    grid-column: 1;
}

    #message-overlay.hide, #backtrace-message-overlay.hide {
        height: 0px;
        opacity: 0;
        transition: opacity .25s, height 0 .25s;
    }

    #message-overlay > div, #backtrace-message-overlay > div {
        width: 100%;
        display: block;
        position: absolute;
        top: 30%;
        text-align: center;
    }

    #message-overlay span, #backtrace-message-overlay span {
        display: block;
        background-color: var(--plugin-background-color, rgba(200, 200, 200, 0.50));
    }

/* Empty row sytle */
.treeGridRow.emptyRow > td {
    font-style: italic;
    text-align: left;
    color: var(--plugin-inactive-color, chartreuse);
}

td > .typeIcon {
    display: inline-block;
    width: 0px;
    height: 0px;
}

td > .typeIcon.valueType {
    width: 1.4em;
    height: 1.4em;
    vertical-align: middle;
    background: var(--valueTypeImage, url("./images/valueType.png")) no-repeat 0px 0px;
    background-size: 100%;
}

td > .typeIcon.refType {
    width: 1.4em;
    height: 1.4em;
    vertical-align: middle;
    background: var(--refTypeImage, url("./images/refType.png")) no-repeat 0px 0px;
    background-size: 100%;
}

    td > .typeIcon.valueCollectionType {
        width: 1.4em;
        height: 1.4em;
        vertical-align: middle;
        background: var(--valueCollectionTypeImage, url("./images/valueCollectionType.png")) no-repeat 0px 0px;
        background-size: 100%;
    }

    td > .typeIcon.refCollectionType {
        width: 1.4em;
        height: 1.4em;
        vertical-align: middle;
        background: var(--refCollectionTypeImage, url("./images/refCollectionType.png")) no-repeat 0px 0px;
        background-size: 100%;
    }