
/* *****************************************************************************
 *  Most common colors:
 *   #0d94e7 : The main blue-ish color used, e.g. logo's text.
 *   #0d94e7 : Lighter blue used for the button color.
 *   #f4f4f4 : White-ish color for most of the background.
 *   #222222 : Dark grey used in flot background.
 *   #cfcfcf : Lighter grey used in panels
 * ****************************************************************************/



/* *****************************************************************************
 *  Global rules
 * ****************************************************************************/

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none !important;
}

*:not(.selectable):not(input):not(textarea) {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.selectable * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    overflow-y: hidden;
    font-size: 14px;
}

body.standalone .standalone-hide {
    display: none!important;
}

body.external .external-hide {
    display: none!important;
}

#app {
    height: 100%;
}

/**
 * Directives added to support Bootstrap 4
 */
.hidden, .hide {
    display: none !important;
}


/* *****************************************************************************
 *  Misc
 * ****************************************************************************/

/* Removes the bullet points from dropdown menu li elements */
ul.dropdown-menu li {
    white-space: nowrap;
}

.tab-content {
    background-color: white;
    position: relative;
}
.tab-title {
    text-align: center;
    white-space: nowrap;
}
.text-justify {
    text-align: justify;
}

#plotting-area.light #drag-drop-help {
    color: #22222236;
}

#drag-drop-help {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 23px;
    padding: 30px;
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: #ffffff57;
}

/* *****************************************************************************
 *  .spinner (bootstrap based)
 * ****************************************************************************/

.spinner {
    display: inline-block;
    border: 0;
    position: relative;
    padding-right: 14px;
}
.spinner > .form-control {
    height: 100%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    text-align: right;
}
.spinner > .btn {
    position: absolute;
    right: 0;
    height: 50%;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    padding: 0px 3px;
    font-size: 8px;
}
.spinner > .btn:nth-child(2) {
    top: 0;
    border-top-right-radius: 4px !important;
}
.spinner > .btn:nth-last-child(1) {
    top: 50%;
    border-bottom-right-radius: 4px;
    padding-top: 2px !important;
}

/**
 * Toolbox at the right of the toolbar which is always visible
 */
#plotting-area .toolbox {
    height: 38px;
    padding: 4px 0px 4px 0px;
    color: #fff;
    border: 0px;
    display: inline-block;
}

/* *****************************************************************************
 *  Various custom classes
 * ****************************************************************************/

.icon-flipped {
       -moz-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
        -ms-transform: scaleX(-1);
            transform: scaleX(-1);
}

.icon-image {
    position: relative;
}
.icon-image > .img-22 {
    height: 22px;
}
.icon-image > .img-18 {
    height: 18px;
}

/* *****************************************************************************
 *  Base layout
 * ****************************************************************************/

html,
body {
    width: 100%;
    height: 100%;
    min-width: 800px;
    min-height: 600px;
    overflow: hidden; /* Removes the momentary appearance of window's horizontal scrollbar, when resizing the sidebar. */
}
@media (max-width: 800px) {
    html,
    body {
        overflow-x: hidden;
    }
}
@media (max-height: 600px) {
    html {
        overflow-y: auto;
    }
}

#wrapper {
    width: 100%;
    height: 100%;
}

/* *****************************************************************************
 * Signal Changer rules
 * ************************************************************************** */

#SignalChanger .modal-dialog {
    width: 462px;
}

#SignalChanger .modal-dialog.wide {
    width: 686px;
}

#SignalChanger .modal-body {
    width: 100%;
    padding: 8px 4px 4px 8px;
}

#SignalChanger .modal-body div {
    margin: 0 4px 4px 0;
    padding: 5px;
    width: 220px;
}

#SignalChanger .modal-body div p{
    overflow: hidden;
    text-overflow: ellipsis;
}
#SignalChanger .modal-body .original:not(.selected) {
    /*border: 1px solid #aaa;
    padding: 4px;*/
    background-color: #ccc;
}

#SignalChanger .modal-body div:not(.selected):hover {
    background-color: #eee;
}

#SignalChanger .modal-body div.original:not(.selected):hover {
    background-color: #ddd;
}

#SignalChanger .modal-body .selected {
    background-color: #9d9;
}

#SignalChanger .modal-body div > p {
    margin: 0;
}

/* *****************************************************************************
 * Coler Palette rules
 * ************************************************************************** */

.color-palette-container {
    position: absolute;
    width: fit-content;
    padding: 10px;
    padding-left: 6px;
    z-index: 3;
}
.color-palette-container::before {
    content: '';
    top: 23px;
    left: -20px;
    width: 25px;
    height: 38px;
    position: absolute;
    cursor: pointer;
}

.color-palette {
    background-color: #f4f4f4;
    border-radius: 3px;
    padding: 1px;
    box-shadow: rgba(0, 0, 0, 0.6) 1px 1px 3px;
}

.color-palette .palette td {
    border: solid 2px transparent;
}

.color-palette .signal-color {
    width: 18px;
    height: 18px;
    border-radius: 2px;
}

body.chart-dark .color-palette .signal-color {
    box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 1px, rgba(0, 0, 0, 0.24) 0px 0px 1px;
}

/* *****************************************************************************
 *  "signal sets" & "charts" rules
 * ************************************************************************** */

#plotting-area {
    min-width: 400px;
    min-height: 400px;
    margin-top: 4px;
}

.signal-menu .btn {
    font-weight: bold;
}

#plotting-area .toolbox .btn {
    width: 42px;
}

#plotting-area .acquire-all {
    width: 30px;
}

/* Bold lines */
#plotting-area .btn.toggle-bold-lines.active.extra {
    padding-right: 18px;
}
#plotting-area .btn.toggle-bold-lines.active.extra::after {
    content: '+';
    display: inline;
    font-size: 14px;
    font-weight: bold;
    position: absolute;
    right: 7px;
    top: 3px;
}

/* E+n */
#plotting-area .btn.toggle-exp-scaling {
    width: 42px;
}

/* ToolTip */
#plotting-area .btn.tooltip-type.active {
    padding-right: 14px;
}
#plotting-area .btn.tooltip-type.active::after {
    display: inline;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    right: 5px;
    top: 5px;
}
#plotting-area .btn.tooltip-type.active.soft::after {
    content: '1';
}
#plotting-area .btn.tooltip-type.active.semi::after {
    content: '2';
}
#plotting-area .btn.tooltip-type.active.full::after {
    content: '3';
}
#plotting-area .btn.tooltip-type.active.extra::after {
    content: '4';
}

/* Ruler */
#plotting-area .btn-group .btn.zoom-ruler {
    padding-bottom: 0px;
}

/** .SignalSet rules **/
.SignalSet-content .btn.chart-radio {
    font-weight: bold;
}

.SignalSet-content.active {
    color: #222;
    display: flex;
}
.SignalSet-content > div {
    display: inline-block;
    height: 100%
}
.SignalSet-content .page-title-text ,
.SignalSet-content .page-title-notes {
    display: inline-block;
    margin-bottom: 3px;
    margin-left: 7px;
    font-weight: bold;
    vertical-align: middle;
}

@media (max-width: 1291px) {
    .SignalSet-content .page-title-text {
        margin-top: 6px;
        margin-left: 1px;
    }
}

.FlotChart {
    position: relative;
    left: 0px;
    top: 0px;
    width: 100%;
}

#plotting-area.extra .flot-x-axis > div {
    padding-top: 20px;
}

/** Chart Resizer Settings */

#charts .chart-resizer-wrapper {
    display: inline-block;
    z-index: 1;
}
#charts .chart-resizer-wrapper .chart-resizer-track {
    position: absolute;
    background-color: transparent;
    padding-left: 2px;
    z-index: inherit;
}
#charts .chart-resizer-wrapper .chart-resizer-thumb {
    height: fit-content;
}
#charts .chart-resizer-wrapper .chart-resizer-thumb.main:hover {
    cursor: grab;
}
#charts .chart-resizer-wrapper .chart-resizer-thumb.part {
    border-radius: 0px;
    opacity: .3;
    border-right: 0px solid transparent;
    border-left: 15px solid var(--ccs-action-blue);
}
#charts .chart-resizer-wrapper .chart-resizer-thumb.top {
    border-top: 10px solid transparent;
}
#charts .chart-resizer-wrapper .chart-resizer-thumb.bottom {
    border-bottom: 10px solid transparent;
}
#charts .chart-resizer-wrapper .chart-resizer-thumb.main:not(:hover) .top,
#charts .chart-resizer-wrapper .chart-resizer-thumb.analog:not(:hover) .bottom {
    opacity:.8;
}
#charts .chart-resizer-wrapper .chart-resizer-thumb:hover,
#charts .chart-resizer-wrapper .chart-resizer-thumb:hover * {
    opacity: 1;
}


/* Settings for hiding charts in dual chart mode */

/* For Chrome, Opera and Safari */
.FlotChart.invisible-chart:not(*:root) {
    display: none;
}

/* For MS Edge only */
@supports (-ms-ime-align: auto) {
    .FlotChart.invisible-chart {
        visibility: collapse;
    }
}

/* For firefox only */
@-moz-document url-prefix() {
    .FlotChart.invisible-chart {
        visibility: collapse;
    }
}


/**  **/

#charts {
    background-color: #222;
    position: relative;
}

/** .TableTab rules **/
.TableTab {
    color: #222;
    padding: 0;
    min-height: 100%;
    overflow-y: auto;
    font-family: monospace;
}

.TableTab table {
    border-collapse: collapse;
    white-space: nowrap;
}

.TableTab th,
.TableTab td {
    border: 2px solid white;
    padding: 0 10px;
}

div.TableTab th:first-child,
div.TableTab td:first-child {
    border-left: none !important;
}

.TableTab th {
    border-top: 0;
}
.TableTab .floatThead-table {
    background-color: #ced4da;
}
/*.TableTab td:last-child,
.TableTab th:last-child {
    width: 100%;
}*/
.TableTab td.darkcell{
    background-color: #e2e2e2;
}
.TableTab .green {
    color: green;
}
.TableTab .orange {
    color: #f59300;
}
.TableTab .red {
    color: red;
}
.TableTab .cyan {
    color: #009a9a;
}
.TableTab .magenta {
    color: magenta;
}
.TableTab .bold {
    font-weight: bold;
}
.TableTab .center {
    text-align: center;
}
.TableTab .right {
    text-align: right;
}


/** Light mode changes **/
#plotting-area.light > #charts{
    background-color: #fff;
}
#plotting-area.light .flot-tick-label {
    color: #222;
}

/** FlotChart cursor **/
.cursor-grab{
    cursor: -webkit-grab;
    cursor: -moz-grab;
    cursor: grab;
}
.cursor-crosshair{
    cursor: crosshair;
}

/** Flot x-axis label rules **/

.flot-tick-label {
    font-family: monospace;
    font-size: 95%;
    color: #ddd;
}
.flot-tick-label.top {
    top: 3px !important;
}

/** Flot tooltip rules **/

#ruler-tooltip,
.flot-tooltip {
    border-width: 2px !important;
    pointer-events: none;
}
.flot-tooltip .signal-name {
    font-size: 120%;
    font-weight: bold;
}
.flot-tooltip .copy-message{
    color:#888;
    font-size: 10px;
}
#ruler-tooltip table,
.flot-tooltip table {
    margin-top: 5px;
}
.flot-tooltip .numbers {
    font-size: 110%;
    font-family: monospace;
}
#ruler-tooltip td,
.flot-tooltip td {
    padding-bottom: 5px;
}
#ruler-tooltip td:first-child,
.flot-tooltip td:first-child {
    font-weight: bold;
    color: #45484d;
}
#ruler-tooltip td:nth-child(2),
.flot-tooltip td:nth-child(2) {
    text-align: right;
    font-weight: bold;
    color: #45484d;
    padding-left: 8px;
}
#ruler-tooltip td:last-child,
.flot-tooltip td:last-child {
    text-align: left;
    font-family: monospace;
    font-weight: normal;
    padding-left: 8px;
    /*min-width: 20ch;*/
}
tr.tooltip-divider{
    border-top: 1px solid #ccc;
}
tr.tooltip-divider >td{
    padding-top: 6px;
}

#ruler-tooltip{
    border-color: #0077b3;
    border-style: solid;
    font-weight: bold;
    border-radius: 0.5em;
    font-size: 1em;
    white-space: nowrap;
    position: absolute;
    background-color: white;
    padding: 5px;
    /*font-weight: bold;*/
    z-index: 1;
}
#ruler-tooltip {
    text-align: center;
}
#ruler-tooltip table{
    font-size: 0.8em;
    text-align: left;
}


/**
 * Animations
 */
@keyframes rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(359deg);
    }
}

/**
 * Custom icons
 */
img.goto-live-fgc,
img.goto-history {
    filter: brightness(1.4);
}
img.goto-live-fgc.dark,
img.goto-history.dark {
    filter: none;    
}
img.goto-history.dark:hover,
img.goto-live-fgc.dark:hover {
    filter: brightness(1.25);
}

img.goto-history:hover,
img.goto-live-fgc:hover {
    filter: grayscale(0.6) brightness(2);
}

/* Makes fa share icon look more like mdl */
:root .svg-inline--fa.fa-share-nodes {
    --fa-secondary-opacity: 1 !important;
}
