div.ui-iggrid table.ui-iggrid-table {
    margin-bottom: 0 !important;
}

#scheduling_wrapper div.ui-iggrid table.ui-iggrid-table tr.ui-ig-altrecord:not(.disabled) {
    background-color: #F0F0F0;
}

div.ui-iggrid table.ui-iggrid-headertable .ui-iggrid-filtercell .ui-corner-all {
    border-radius: 0 !important;
}

div.ui-iggrid table.ui-iggrid-headertable .ui-iggrid-filtercell .ui-state-hover {
    color: #000 !important;
}

#element_creation_content {
    z-index: 990;
    background: #fff;
    height: 100%;
    width: 100%;
}

#tab-create-content #trade-panel.ta-dashboard-viewer__side {
    width: 40%;
}

#tab-create-content .ta-full-screen #trade-panel.ta-dashboard-viewer__side {
    margin-left: -39%;
}

#scheduling_tabs {
    user-select: none;
}

    #scheduling_tabs a.disabled {
        color: #ccc !important;
        cursor: not-allowed;
        pointer-events: none;
    }

#tab-details-content .ta-form-grid__cell {
    height: 33px;
}

#container_search_trades .ta-section__title:not(.no-margin) {
    margin: 0.75rem 0;
}

#container_search_trades input.grid-filter {
    width: 200px;
    transition: width 0.4s ease-in-out;
}

    #container_search_trades input.grid-filter:focus {
        width: 400px;
    }

#sources_grid tbody tr.selected {
    font-weight: bold;
    background: #a8c6fa;
}

    #sources_grid tbody tr.selected td {
        border-bottom-color: #75a9f9;
    }

#sinks_grid tbody tr.selected {
    font-weight: bold;
    background: #ffb4b0;
}

    #sinks_grid tbody tr.selected td {
        border-bottom-color: #ff8a84;
    }

#tags_grid tbody tr.selected {
    font-weight: bold;
    background: #fefac0;
}

    #tags_grid tbody tr.selected td {
        border-bottom-color: #ffd783;
    }

.igGrid tbody tr.disabled {
    background: #a9a9a9;
}

    .igGrid tbody tr.disabled td {
        border-bottom-color: #808080;
    }

.igGrid div.has-tooltip {
    cursor: help;
    color: #2a93cc;
    font-weight: bold;
}

#sources_grid_container .ui-widget-header {
    background: #75a9f9 !important;
    color: #000 !important;
}

#sinks_grid_container .ui-widget-header {
    background: #ff8a84 !important;
    color: #000 !important;
}

#tags_grid_container .ui-widget-header {
    background: #ffd783 !important;
    color: #000 !important;
}

#preview-panel {
    width: 300px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    right: 0;
    top: 0;
    opacity: 0;
    z-index: -1;
    padding: 1rem;
    background: white;
    border: 1px solid #ccc;
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
    transition: right 0.4s, opacity 0.3s;
    -webkit-box-shadow: 2px 6px 5px 0px rgba(0,0,0,.6);
    -moz-box-shadow: 2px 6px 5px 0px rgba(0,0,0,.6);
    box-shadow: 2px 6px 5px 0px rgba(0,0,0,.6);
}

    #preview-panel.visible {
        right: -300px;
        opacity: 100;
        z-index: 5;
    }

    #preview-panel .fa-times {
        position: absolute;
        right: 4px;
        top: 2px;
        color: #ddd;
        cursor: pointer;
    }

    #preview-panel #preview-date {
        color: #999;
    }

    #preview-panel #preview-data.ta-form-grid {
        flex-grow: 2;
        overflow: auto;
    }

        #preview-panel #preview-data.ta-form-grid .ta-form-grid__row {
            border-bottom: 1px solid #ccc;
        }

            #preview-panel #preview-data.ta-form-grid .ta-form-grid__row:first-child {
                font-size: 11px;
                font-weight: bold;
            }

        #preview-panel #preview-data.ta-form-grid .ta-form-grid__cell {
            height: 25px;
            justify-content: center;
        }

            #preview-panel #preview-data.ta-form-grid .ta-form-grid__cell:last-child {
                flex-grow: 2;
                white-space: nowrap;
            }

select.required,
input[type=text].required {
    box-shadow: 0 0 0 1px #f00;
}

.ta-metadata-checkbox {
    margin: 0 auto !important;
}

.mdc-dialog {
    z-index: 8;
}

.ui-iggrid-resizing-handle {
    z-index: 5;
}

.ttip {
    position: relative;
}

    .ttip .ttip-text {
        width: 60px;
        background-color: #555;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        padding: 5px 0px;
        position: absolute;
        top: 125%;
        left: 50%;
        margin-left: -30px;
        z-index: 2;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.5s;
    }

        .ttip .ttip-text::after {
            content: "";
            position: absolute;
            bottom: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: transparent transparent #555 transparent;
        }

.ttip-hover {
    /*position: relative;*/
}

    .ttip-hover:after {
        width: 100%;
        height: 28px;
        display: none;
        content: attr(data-err-txt);
        position: absolute;
        bottom: 0;
        left: 0;
        padding: 4px;
        text-align: center;
        white-space: normal;
        background-color: #008CBA;
        border: 1px solid #0078a0;
        color: #fff;
        z-index: 2;
    }

    .ttip-hover.error:after {
        color: #fff;
        background-color: #d32f2f;
        border: 1px solid #9a0007;
    }

    .ttip-hover.warn:after {
        color: #fff;
        background-color: #fbc02d;
        border: 1px solid #f57f17;
        content: attr(data-warn-txt);
    }

    .ttip-hover:hover:after {
        display: block;
    }

/* Deal Builder Grid Styles */
#DB_Grid_Row {
    min-height: 35vh;
    position: relative;
    padding-bottom: 0;
}

    #DB_Grid_Row.fit-height {
        flex-grow: 1;
        flex-shrink: 1;
    }

#DB_Grid_Wrap {
    position: static;
    height: 100%;
    padding: 0;
    overflow: auto;
    border-bottom: 1px solid #111;
}

    #DB_Grid_Wrap #DB_Grid {
        border-collapse: separate;
        border: none;
        margin-bottom: 0;
    }

        #DB_Grid_Wrap #DB_Grid a {
            color: #222;
        }

            #DB_Grid_Wrap #DB_Grid a:hover {
                color: #0078a0;
            }

        /* Hide Bookout Column by default */
        #DB_Grid_Wrap #DB_Grid th:last-child,
        #DB_Grid_Wrap #DB_Grid td:last-child {
            display: none;
        }

        #DB_Grid_Wrap #DB_Grid tbody tr td {
            border-bottom: 1px solid #ddd;
        }

            #DB_Grid_Wrap #DB_Grid tbody tr td:not(:first-child) {
                border-right: 1px solid #ddd;
            }

        #DB_Grid_Wrap #DB_Grid thead tr.elementName {
            height: 50px;
        }

        #DB_Grid_Wrap #DB_Grid thead tr th:not(:last-child) {
            border-right: 1px solid #111;
        }

        #DB_Grid_Wrap #DB_Grid thead tr:first-child th {
            /*border-top: 1px solid #ddd;*/
        }

            #DB_Grid_Wrap #DB_Grid thead tr:first-child th[class]:not(:first-child) {
                text-transform: uppercase;
                font-size: 1.15rem;
            }

        #DB_Grid_Wrap #DB_Grid thead tr:last-child th {
            border-bottom: 1px solid #111;
        }

        #DB_Grid_Wrap #DB_Grid thead tr:nth-child(2) th:not(.total) {
            border-top: 1px solid #111;
        }

            #DB_Grid_Wrap #DB_Grid thead tr:nth-child(2) th:not(.total):not(:first-child) {
                /*-webkit-box-shadow: 0 6px 5px -2px rgba(0,0,0,.6) inset;
                -moz-box-shadow: 0 6px 5px -2px rgba(0,0,0,.6) inset;
                box-shadow: 0 6px 5px -2px rgba(0,0,0,.6) inset;*/
                position: relative;
            }

        #DB_Grid_Wrap #DB_Grid thead tr:last-child th {
            -webkit-box-shadow: 1px 5px 4px 0 rgba(0,0,0,.5);
            -moz-box-shadow: 1px 5px 4px 0 rgba(0,0,0,.5);
            box-shadow: 1px 5px 4px 0 rgba(0,0,0,.5);
        }

            #DB_Grid_Wrap #DB_Grid thead tr:last-child th:first-child {
                -webkit-box-shadow: -1px 5px 4px 0 rgba(0,0,0,.5);
                -moz-box-shadow: -1px 5px 4px 0 rgba(0,0,0,.5);
                box-shadow: -1px 5px 4px 0 rgba(0,0,0,.5);
            }

            #DB_Grid_Wrap #DB_Grid thead tr:last-child th:nth-child(2),
            #DB_Grid_Wrap #DB_Grid thead tr:last-child th:last-child {
                -webkit-box-shadow: 0 5px 4px 0 rgba(0,0,0,.5);
                -moz-box-shadow: 0 5px 4px 0 rgba(0,0,0,.5);
                box-shadow: 0 5px 4px 0 rgba(0,0,0,.5);
            }

        #DB_Grid_Wrap #DB_Grid thead tr:not(:first-child) th:not(:first-child):not(.total):not(.net) {
            font-weight: normal;
        }

        #DB_Grid_Wrap #DB_Grid thead tr:not(:first-child):not(:last-child) th:not(.total):not(:last-child) {
            border-bottom: 1px solid #111;
        }

        #DB_Grid_Wrap #DB_Grid tfoot tr th:not(:last-child) {
            border-right: 1px solid #111;
        }

        #DB_Grid_Wrap #DB_Grid tfoot tr:first-child th {
            border-top: 1px solid #111;
            background: #ddd;
        }

    #DB_Grid_Wrap th,
    #DB_Grid_Wrap td {
        white-space: nowrap;
        text-align: center;
        padding: 0.25rem;
    }

        #DB_Grid_Wrap th:first-child,
        #DB_Grid_Wrap td:first-child {
            /*border-left: 1px solid #ddd;*/
        }

        #DB_Grid_Wrap th:last-child,
        #DB_Grid_Wrap td:last-child {
            /*border-right: 1px solid #ddd;*/
        }

        #DB_Grid_Wrap td:first-child {
            font-weight: bold;
            border-right: 1px solid #111;
        }

        #DB_Grid_Wrap th .trade-name {
            padding: 0 0.75rem;
        }

        #DB_Grid_Wrap td.db-input {
            padding: 0;
        }

        #DB_Grid_Wrap td.calculating {
            color: #bbb;
            background: #e4e4e4;
            border-right-color: #000 !important;
            border-bottom: none !important;
        }

        #DB_Grid_Wrap td.out-of-range {
            color: #222;
            background: #888;
            border-right-color: #555 !important;
            border-bottom-color: #555 !important;
        }

        #DB_Grid_Wrap td.invalid {
            color: #222;
            background: #c0c0c0;
            border-right-color: #777 !important;
            border-bottom-color: #777 !important;
        }

        #DB_Grid_Wrap td.db-input.modified {
            color: #003300;
            background: #81c784;
            border-right-color: #003300 !important;
            border-bottom-color: #003300 !important;
        }

        #DB_Grid_Wrap td.error {
            color: #7f0000;
            background: #ef5350;
            border-right-color: #7f0000 !important;
            border-bottom-color: #7f0000 !important;
        }

        #DB_Grid_Wrap td.warn {
            color: #f57f17;
            background: #fff176;
            border-right-color: #f57f17 !important;
            border-bottom-color: #f57f17 !important;
        }

        #DB_Grid_Wrap td.db-input.daily-bgn,
        #DB_Grid_Wrap td.db-input.daily-mid,
        #DB_Grid_Wrap td.db-input.daily-end {
            border-right: 3px solid #000 !important;
            border-left: 2px solid #000;
        }

        #DB_Grid_Wrap td.db-input.daily-bgn {
            border-top: 2px solid #000;
        }

        #DB_Grid_Wrap td.db-input.daily-mid {
            border-bottom: 0 !important;
        }

        #DB_Grid_Wrap td.db-input.daily-end {
            border-bottom: 2px solid #000 !important;
        }

        #DB_Grid_Wrap td.db-input.selected {
            color: #222;
            border: 1px solid rgb(77, 144, 254) !important;
            background: rgba(77, 144, 254, 0.3);
        }

            #DB_Grid_Wrap td.db-input.selected.daily-bgn,
            #DB_Grid_Wrap td.db-input.selected.daily-mid,
            #DB_Grid_Wrap td.db-input.selected.daily-end {
                border-right-width: 3px !important;
                border-left-width: 2px !important;
            }

            #DB_Grid_Wrap td.db-input.selected.daily-bgn {
                border-top-width: 2px !important;
            }

            #DB_Grid_Wrap td.db-input.selected.daily-end {
                border-bottom-width: 2px !important;
            }

            #DB_Grid_Wrap td.db-input.selected input {
                width: 96%;
                height: 30px;
                margin: 0 2%;
                padding: 0 5px;
                border-radius: 0;
            }

        #DB_Grid_Wrap th .select {
            height: 2em;
        }

            #DB_Grid_Wrap th .select select {
                height: 2em;
                width: auto;
                padding: 0.25rem;
            }

    #DB_Grid_Wrap tbody tr:last-child td:not(.daily-end):not(.selected) {
        border-bottom: none !important;
    }

    #DB_Grid_Wrap tr:first-child th:first-child {
        background: #fff;
    }

    #DB_Grid_Wrap tr:last-child th:first-child {
        background: #91e4fb;
    }

    #DB_Grid_Wrap tr.green th:not(.total):not(:last-child) {
        background: #aedd94;
    }

    #DB_Grid_Wrap tr.lightgreen th:not(.total):not(:last-child) {
        background: #cbe8ba;
    }

    #DB_Grid_Wrap tr.lightergreen th:not(.total):not(:last-child) {
        background: #dfedd6;
    }

    #DB_Grid_Wrap tr.gray th:not(.total):not(:first-child),
    #DB_Grid_Wrap tr:nth-child(n+2) th:last-child {
        background: #c0c0c0;
    }

    #DB_Grid_Wrap tr th.source {
        background: #75a9f9;
    }

    #DB_Grid_Wrap tr.elementName th.source:not(.total),
    #DB_Grid_Wrap tr:nth-of-type(odd) td.source.calc {
        background: #a8c6fa;
    }

    #DB_Grid_Wrap tr:nth-of-type(even) td.source.calc {
        background: #d4e3fc;
    }

    #DB_Grid_Wrap tr th.sink {
        background: #ff8a84;
    }

    #DB_Grid_Wrap tr.elementName th.sink:not(.total),
    #DB_Grid_Wrap tr:nth-of-type(odd) td.sink.calc {
        background: #ffb4b0;
    }

    #DB_Grid_Wrap tr:nth-of-type(even) td.sink.calc {
        background: #ffdad8;
    }

    #DB_Grid_Wrap tr th.path {
        background: #ffd783;
    }

    #DB_Grid_Wrap tr.elementName th.path {
        background: #fefac0;
    }

    #DB_Grid_Wrap tr th.book {
        background: #6334e3;
        color: #fff;
    }

    #DB_Grid_Wrap tr th.deal {
        background: #c9f1fd !important;
    }

    #DB_Grid_Wrap span.col-remove {
        position: absolute;
        right: 2px;
        top: 1px;
        cursor: pointer;
        font-size: 0.75rem;
    }

        #DB_Grid_Wrap span.col-remove:hover {
            color: red;
        }

    #DB_Grid_Wrap input[type=checkbox] {
        position: absolute;
        bottom: 2px;
        cursor: pointer;
        font-size: 0.75rem;
    }

    #DB_Grid_Wrap div.edit-menu {
        position: absolute;
        width: 24px;
        left: 0;
        bottom: 0;
        padding: 1px 5px;
        font-size: 0.75rem;
    }

        #DB_Grid_Wrap div.edit-menu .edit-menu-content {
            position: absolute;
            opacity: 0;
            left: -48px;
            top: 20px;
            transition: unset;
            background: rgba(0, 0, 0, 0.55);
        }

            #DB_Grid_Wrap div.edit-menu .edit-menu-content span.fas {
                padding: 4px 6px;
                cursor: pointer;
            }

        #DB_Grid_Wrap div.edit-menu:hover {
            background: rgba(0, 0, 0, 0.75);
            color: #fff;
        }

            #DB_Grid_Wrap div.edit-menu:hover .edit-menu-content,
            #DB_Grid_Wrap div.edit-menu:hover .edit-menu-content:hover {
                display: block;
                opacity: 100;
                left: 24px;
                top: 0;
                transition: left 0.25s, opacity 0.5s ease-in;
            }

    #DB_Grid_Wrap i.col-info {
        position: absolute;
        right: 4px;
        bottom: 2px;
        cursor: pointer;
        font-size: 0.75rem;
    }

        #DB_Grid_Wrap i.col-info:hover {
            color: #666;
        }

/* Modal */
#DB_Modal .mdc-dialog__surface {
    max-width: 950px;
}

#DB_Modal > div:first-child,
#DB_Modal_Tags > div:first-child {
    position: relative;
    height: auto;
}

#DB_Modal > div:first-child::before,
#DB_Modal_Tags > div:first-child::before {
    content: ' ';
    position: absolute;
    left: 0;
    top: 0;
    height: 0;
    width: 0;
    z-index: 1;
    border: 35px solid #fff;
    border-top-left-radius: 4px;
}

#DB_Modal[data-type=source] > div:first-child::before {
    border-left-color: #75a9f9 !important;
    border-top-color: #75a9f9 !important;
}

#DB_Modal[data-type=sink] > div:first-child::before {
    border-left-color: #ff8a84 !important;
    border-top-color: #ff8a84 !important;
}

#DB_Modal .ta-form-grid .ta-form-grid__cell,
#DB_Modal_Adjust .ta-form-grid .ta-form-grid__cell {
    color: #222;
    border-right-width: 10px;
    justify-content: center;
}

    #DB_Modal .ta-form-grid .ta-form-grid__cell:first-child {
        flex-grow: 0.25;
        min-width: 5%;
    }

        #DB_Modal .ta-form-grid .ta-form-grid__cell:first-child label {
            width: 100%;
            height: 100%;
        }

            #DB_Modal .ta-form-grid .ta-form-grid__cell:first-child label input {
                vertical-align: bottom;
            }

    #DB_Modal .ta-form-grid .ta-form-grid__cell:nth-child(2) {
        flex-grow: 1.5;
        min-width: 20%;
    }

    #DB_Modal .ta-form-grid .ta-form-grid__cell:nth-child(n+2) {
        min-width: 15%;
    }

#DB_Modal_Tags > div:first-child::before {
    border-left-color: #ffd783 !important;
    border-top-color: #ffd783 !important;
}

#DB_Modal_Tags .ta-form-grid__cell {
    color: #222;
    justify-content: center;
}

    #DB_Modal_Tags .ta-form-grid__cell label {
        width: 100%;
        height: 100%;
        cursor: pointer;
        user-select: none;
    }

        #DB_Modal_Tags .ta-form-grid__cell label input {
            vertical-align: bottom;
        }

#DB_Modal_Tags .current .ta-form-grid__cell {
    font-weight: bold;
}

#DB_Modal_Tags .selected .ta-form-grid__cell {
    background-color: #fefac0 !important;
}

#DB_Modal_Tags .selected.por .ta-form-grid__cell:first-child,
#DB_Modal_Tags .selected.pod .ta-form-grid__cell:last-child {
    background-color: #ffd783 !important;
}

/* Trade Info Pop-out */
.trade_info {
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 14px;
    white-space: nowrap;
    background: white;
    border: 1px solid #ccc;
    z-index: 999;
    -webkit-box-shadow: 2px 6px 5px 0px rgba(0,0,0,.6);
    -moz-box-shadow: 2px 6px 5px 0px rgba(0,0,0,.6);
    box-shadow: 2px 6px 5px 0px rgba(0,0,0,.6);
}

    .trade_info div {
        display: flex;
        align-content: space-between;
    }

        .trade_info div div:first-child {
            flex: 1 1 0;
            padding-right: 1.5rem;
        }

    .trade_info i {
        position: absolute;
        top: 0.25rem;
        right: 0.25rem;
        color: #aaa;
        cursor: pointer;
    }

    .trade_info::before,
    .trade_info::after {
        width: 0;
        height: 0;
        content: '';
        font-size: 0;
        position: absolute;
        border: 10px solid transparent;
    }

    .trade_info.tether-element-attached-left::before {
        z-index: 2;
        left: -19px;
        border-right-color: #fff;
    }

    .trade_info.tether-element-attached-left::after {
        z-index: 1;
        left: -20px;
        border-right-color: #ccc;
    }

    .trade_info.tether-element-attached-top::before {
        z-index: 2;
        top: -19px;
        left: 50%;
        margin-left: -10px;
        border-bottom-color: #fff;
    }

    .trade_info.tether-element-attached-top::after {
        z-index: 1;
        top: -20px;
        left: 50%;
        margin-left: -10px;
        border-bottom-color: #ccc;
    }
