﻿html, body {
    height: 100%;
    width: 100%;
    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));
    display: grid;
    grid-template-rows: auto auto 1fr;
    grid-template-columns: 1fr;
}

.icon {
    width: 1.34em;
    height: 1.34em;
}

    .icon svg {
        width: auto;
        height: 100%;
        vertical-align: baseline;
    }

#openSymbolSettingsButton {
    /* This will align the button and succeeding toolbar items to the right side */
    margin-left: auto;
}

.mainArea {
    grid-row: 3;
    grid-column: 1;
    position: relative;
    flex-direction: row;
    display: flex;
    overflow: hidden;
    height: 100%;
}

#EventsList {
    flex: 1 1 auto;
    overflow: hidden;
}

.dataGridContainer {
    width: 100%;
    height: 100%;
}

#sideBar {
    border-left: 1px solid var(--Environment-CommandBarOptionsBackground-Background, chartreuse);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

    #sideBar .title {
        width: 100%;
        line-height: 26px; /* TODO(amali) Match this to the data grid next to it */
        text-align: center;
        background-color: var(--Environment-CommandBarGradientBegin-Background, chartreuse);
        white-space: nowrap;
    }

    #sideBar #additionalProperties {
        overflow: auto;
    }

    #sideBar #additionalPropertiesPlaceholder {
        margin: 20px;
        top: 30%;
        text-align: center;
        position: absolute;
        display: block;
    }

    #sideBar .sectionTitle {
        background-color: var(--CommonControls-InnerTabActiveBackground-Background, cyan);
        white-space: nowrap;
        padding-left: 3px;
        border-bottom: 1px solid var(--Environment-GridLine-Background, purple);
    }

    /* Property tables */
    #sideBar table {
        table-layout: fixed;
        overflow: hidden;
        /*
        * This is a workaround as IE does not always correctly render the bottom border of a
        * table when border-collapse is specified. Our solution is to manually specify the correct
        * borders and set the spacing of cells to be 0.
        */
        border-collapse: separate;
        border-spacing: 0px;
    }

    #sideBar td:first-child {
        border-left: 1px solid var(--Environment-GridLine-Background, purple);
    }

    #sideBar td {
        border-right: 1px solid var(--Environment-GridLine-Background, purple);
        border-bottom: 1px solid var(--Environment-GridLine-Background, purple);
        padding: 1px 6px;
    }

    #sideBar tr {
        /* We need a fixed row height since we calculate the virtualization with the row height */
        height: 1.8em;
    }

    /* Grid Rows */
    #sideBar tbody td {
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #sideBar tbody tr:hover {
        color: var(--plugin-treeview-content-inactive-selected-color, chartreuse);
        background-color: var(--plugin-treeview-content-inactive-selected-background-color, chartreuse);
    }

    #sideBar tbody tr.selected {
        color: var(--plugin-treeview-content-selected-color, chartreuse);
        background-color: var(--plugin-treeview-content-selected-background-color, chartreuse);
    }

    #sideBar tbody tr:focus {
        color: var(--plugin-treeview-content-selected-color, chartreuse);
        background-color: var(--plugin-treeview-content-selected-background-color, chartreuse);
    }

    /* Focus:
        * IE does not always correctly show focus rings with collapsed borders. To fix this
        * we explicitly remove the outline focus ring and edit the borders on the rows to mimic 
        * the same look when the body or table header row has focus.
        */
    #sideBar tbody:focus {
        outline: none;
    }

        #sideBar tbody:focus > tr > td {
            border-bottom: 1px dotted var(--CommonControls-FocusVisual-Foreground, black);
            border-right: 1px dotted var(--CommonControls-FocusVisual-Foreground, black);
        }

            #sideBar tbody:focus > tr > td:first-child {
                border-left: 1px dotted var(--CommonControls-FocusVisual-Foreground, black);
            }

#additionalPropertiesLoading {
    position: relative;
    text-align: center;
    top: 30%;
    overflow: hidden;
}

    #additionalPropertiesLoading span {
        display: block
    }

/** No data overlay */
#message-overlay {
    grid-row: 3;
    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));
}

    #message-overlay.hide {
        height: 0px;
        opacity: 0;
        transition: opacity .25s, height 0 .25s;
    }

    #message-overlay > div {
        width: 100%;
        display: block;
        position: absolute;
        top: 30%;
        text-align: center;
    }

    #message-overlay span {
        display: block;
        background-color: var(--plugin-background-color, rgba(200, 200, 200, 0.50));
    }

    #message-overlay progress {
        display: block;
        margin: 5px auto;
        color: var(--ProgressBar-IndicatorFill-Background, fuchsia);
        background-color: var(--ProgressBar-Background-Background, red);
    }


/* 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;
        }

.dropdown-button {
    display: inline-block;
}

    .dropdown-button:after {
        font-family: Marlett !important;
        content: " 6"; /* 6 in Marlett font is down arrow */
        vertical-align: bottom;
    }

.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);
    }

.main-information-container {
    grid-row: 2;
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    background-color: lightyellow; /*[{diagnostics-information-background}]*/
    background-color: var(--diagnostics-information-background, lightyellow);
    border-top: 1px var(--diagnostics-information-border, black) solid;
    border-bottom: 1px var(--diagnostics-information-border, black) solid;
    padding: 5px;
}

.main-information-container-hidden {
    display: none;
}

.main-information-container .information-icon {
    grid-row: 1;
    grid-column: 1;
    background-repeat: no-repeat;
    background-size: 1.333em 1.333em;
    width: 1.333em;
    height: 1.333em;
    background-position-x: left;
    background-color: transparent;
}

.main-information-container .information-message {
    grid-row: 1;
    grid-column: 2;
    color: var(--diagnostics-information-foreground, black);
    padding-left: 5px;
    padding-right: 5px;
    background-color: transparent;
}

.main-information-container .information-link {
    grid-row: 1;
    grid-column: 3;
    padding-left: 5px;
    padding-right: 5px;
    background-color: transparent;
    color: var(--diagnostics-information-foreground, black);
}

.main-information-container .information-close-div {
    grid-row: 1;
    grid-column: 4;
    background-color: transparent;
    vertical-align: middle;
    padding-top: 2px;
    overflow: visible;
}

    .main-information-container .information-close-div .information-close {
        background-color: transparent;
        font-family: Marlett !important;
        color: var(--diagnostics-information-foreground, black);
        float: right;
    }

.treeGridContainer {
    width: 100%;
}

    .treeGridContainer .name > span {
        text-overflow: ellipsis;
    }

    .treeGridContainer .moduleName, .treeGridContainer .name {
        text-align: left;
    }

.treeGridRow:hover > .name {
    padding-right: calc(1em + 4px);
}