/*
    Sound card Oscilloscope | Signal Analyser Generator
    Copyright(C) 2025  Franck Gaspoz
    find licence and copyright informations in files /COPYRIGHT and /LICENCE
*/

body {
    background-color: black;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    font-size: 14px;
    position: absolute;
    left: 0px;
    top: 0px;
}

html,body,#frame {
    min-width: 800px;
    min-height: 600px;
    overflow: hidden;
}

.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

canvas {
    background-color: transparent;
    border: none;
    position: absolute;
    /* fix main view real left position on edge */
    /* @TODO: do it programmatially */
    left: 4px;
}

.canvas-uninitialized {
    width: 0px;
    height: 0px;
    display: none;
}

button {
    vertical-align: middle;
    cursor: pointer;
    opacity: 0.9;
    border: none;
    width: 2.5em;
    height: 2.5em;
}

.line-through {
    text-decoration: line-through;
}

.left-margin { 
    margin-left: 1em;
}

.dleft-margin { 
    margin-left: 0.5em;
}

.align-left {
    text-align:left !important;
}

.hidden {
    display: none !important;
}

.value {
    display: inline-block;
    width: 3em;
}

div#channels_infos_deck > div > span.value {
    text-align: right;
}

.medium-value {
    width: 3em !important;
}

.short-value {
    width: 1.5em !important;
}

.no-width { 
    width: unset !important;
}

.long-value {
    width: 5.5em !important;
}

.maxlong-value {
    width: 11em !important;
}

.label {
    display: inline-block;
    margin-left: 0.5em;
    color: darkgrey !important;
}

.unit {
    color: yellow;
    width: 2em;
}

div.channel-pane > span.unit {
    margin-left: 0.5em;
}

div.channel-pane > span.label {
    margin-right: 0.5em;
}

.channel-label {
    color: #444444 !important;;
    padding: 4px;
}

.channel-label:hover {
    opacity: 0.8;
    color: black !important;
    cursor: pointer;
}

.on-off-label {    
    width: 3em;
    rotate: unset !important;
    writing-mode: unset !important;
    text-align: center;
    line-height: 3em;
    margin-right: 0.5em;
}

.on {
    background-color: rgb(0, 141, 110);    
    color: #00FF00 !important;
}

.off {
    background-color: rgb(110, 75, 93);    
    color: #FF0000 !important;
}

.on:hover {
    background-color: #007f00 !important;
    color: #ffffffaa !important;
}

.off:hover {
    background-color: rgb(114, 55, 55);
    color: #ffffffaa !important;
}

#channels-deck {
    position: absolute;
    width: calc(100% - 120px);
}

.channel-pane {
    margin-left: 2.7em;
    display: grid;
    grid-auto-columns: min-content;
    align-items: baseline;
}

.channel-opts-pane {
    display: block;
}

.pane-gen-vsep {
    grid-row-start: 1;
    grid-row-end: 4;
    margin-right: 1em;
}

.vsep {
    margin-right: 1em;
}

.channel-menu-pane-horiz-separator {
    margin-top: Calc(0.5em + 1px);
    margin-bottom: 0.5em;
    height: 1px;
    border-top: #0077FFDD solid 1px;
}

.channel-menu-pane-vert-separator,.vsep {
    width: 1px;
    border-right: #0077FFDD solid 1px;
}

.channel-submenu-pane {
    /*diplay: grid;*/
}

div.channel-submenu-pane > span.menu-item {
    margin-right: 0.25em !important;
}

div.channel-opts-pane span.opt-label,
div.channel-opts-pane span.opt-value-edit {
    margin-left: 0px !important;
}

div.channel-opts-pane span.opt-value-with-unit {
    margin-right: 0px !important;
}

div.channel-opts-pane span.unit {
    margin-right: 1em !important;
}

.channel-menu-pane {
    display: flex;
    grid-column: span 16 !important;
}

.channel-menu-pane-grid {
    display: grid;
}

div.channel-menu-pane > span.menu-item,
div.channel-menu-pane > span.label
{
    margin-right: 0.5em;
    margin-left: 0em;
}

#channel_settings_label {
    writing-mode: vertical-rl;
    rotate: 180deg;
    margin-right:0.5em;
}

#channel_settings_pane {
    position: absolute;
    padding: 1em;
    z-index: 40;
    opacity: 0.9;
    color: white;
    background-color: darkblue;
    border: #FFFF0077 solid 1px;
}

.input-widget { 
    position: absolute;
    z-index: 60;
    background-color: #0000CC;
    border: #FFFF0077 solid 1px;
    padding: 1em;
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: auto;
    align-items: stretch;
}

div.input-widget-value-vpane > input {
    font-size: 24px;
    background-color: #000055AA;
    color: yellow;
    border: none;
    padding: 4px;
    margin: 0px !important;
    font-size: 18px !important;
    text-align: left;
    width: 5em;
    padding: 0.5em;
}

.input-widget-buttons-vpane {
    font-size: 18px !important;
    display: grid;
    grid-template-rows: auto;
    align-items: center;
}

.input-widget-value-vpane {
    display: grid;
    grid-template-rows: auto;
    align-items: center;
}

.input-widget-buttons-vpane > button {
    border: darkblue solid 1px;
}

div#iw_delta_pane > button {
    width: 1.4em;
}

#iw_delta {
    color: aquamarine;
    text-align: right;
}

.unit-big {
    font-size: 24px;
    margin-left: 0.5em;
}

.flex {
    display: flex !important;
}

.inline-block {
    display: inline-block !important;
}

.inline {
    display: inline !important;
}

#channels_shortcuts_deck {
    display: flex;
    flex-wrap: wrap;
    grid-auto-columns: min-content;
    padding-left: 3em;
    padding-top: 0.5em;
}

#channels_shortcuts_deck > span.channel-label {
    margin-bottom: 0.5em;
}

#channels_infos_deck {
    display: grid;
    grid-template-rows: min-content;
    grid-auto-columns: min-content;
}

#main_menu {
    display: block;
    position: absolute;
    top: 0px;
    left: calc(100% - 118px);
    text-align: center;
    padding: 8px;
    z-index:26;
}

#buttons_bar, #buttons_bar2 {
    display: block;
    position: absolute;
    /*top: 0px;
    left: calc(calc(calc(100% - 118px) - 118px) + 0.5em);*/
    text-align: right;
    padding: 0px;
    z-index:26;
}

.popup {}

.popup-pane {    
    position: absolute;
    background-color: darkblue;
    padding: 1em;
    z-index: 50;
    opacity: 0.9;
    color: white;
    border: #FFFF0077 solid 1px;
}

.popup-grid {
    display: grid;
}

div.opts-grid > div.popup-grid {
    margin-left: 1em;
}

.popup-title {
    position: relative;
    top: -1.35em;
    margin-bottom: -1em;
    opacity: 0.9;
    left: 1.5em;
    width: 70%;
}

.popup-close {
    width: 1.5em;
    height: 1.5em;
    position: relative;
    left: calc(100% - 1em);
    top: -0.5em;
    margin-bottom: -1.5em;
    line-height: 1.5em;
    text-align: center;
    cursor: pointer;
}

div.opts-pane > span.unit {

}

.popup-close:hover > div.btn-red {
    cursor: pointer;
}

.popup-icon {
    position: relative;
    top: -0.5em;
    font-size: 2em;
    left: -0.25em;
    margin-bottom: -0.75em;
    opacity: 0.9;
    width: 20%;
}

.opts-grid {
    display: grid;
    grid-template-columns: min-content;
    padding-top:0.5em;
}

.opts-pane {
    display: grid;
    grid-template-columns: max-content;
    padding: 1em;
    padding-right: 0em;
    padding-bottom: 0em;
    grid-auto-rows: 2.5em;
}

.opts-list {
    background-color: #002277;
    opacity: 0.9;
    min-width: Calc(96px + 0em);
    padding: 0em;
    display: grid;
    position: relative;
    left: -1em;
    margin-right: -1em;
    margin-bottom: -1em;
}

.opt-value-edit {
    height: fit-content;
    background-color: #000055AA;
    border: black solid 2px;
    color: yellow;
    text-align: right;
    margin: 1em;
    margin-top: 0px;
    padding: 4px;
}

.opt-label-selected {
    border-bottom: #2666a7 solid 2px;
}

.opt-value-edit:focus-visible {
    background-color: #0000FFAA;
    outline: #44AAff solid 2px;
}

.opt-label {
    margin: 1em;
    margin-top: 0px;
    opacity: 0.9;
}

div.popup-grid > span.menu-item {
    margin: 0.5em;
}

.gc1 {
    grid-column: 1;
}
.gc2 {
    grid-column: 2;
}
.gc3 {
    grid-column: 3;
}
.gc4 {
    grid-column: 4;
}
.gc5 {
    grid-column: 5;
}
.gc6 {
    grid-column: 6;
}
.gc7 {
    grid-column: 7;
}
.gc8 {
    grid-column: 8;
}
.gc9 {
    grid-column: 9;
}
.gc10 {
    grid-column: 10;
}
.gc11 {
    grid-column: 11;
}
.gc12 {
    grid-column: 12;
}
.gc13 {
    grid-column: 13;
}
.gc14 {
    grid-column: 14;
}
.gc15 {
    grid-column: 15;
}
.gc16 {
    grid-column: 16;
}
.gr1 {
    grid-row: 1;
}
.gr2 {
    grid-row: 2;
}
.gr3 {
    grid-row: 3;
}
.gr4 {
    grid-row: 4;
}
.gr5 {
    grid-row: 5;
}
.gr6 {
    grid-row: 6;
}
.gr7 {
    grid-row: 7;
}
.gr8 {
    grid-row: 8;
}
.gr9 {
    grid-row: 9;
}
.gr10 {
    grid-row: 10;
}
.gr11 {
    grid-row: 11;
}
.gr12 {
    grid-row: 12;
}
.gr13 {
    grid-row: 13;
}
.gr14 {
    grid-row: 14;
}
.gr15 {
    grid-row: 15;
}
.gr16 {
    grid-row: 16;
}

.menu-item {
    display: inline-block;
    line-height: 3em;
    padding: 4px;
    cursor: pointer;
    width: 96px;
    text-align: center;
    opacity: 0.9;
}

.menu-item-small {
    width: 3em !important;
}

.menu-item-half-height {
    line-height: 1.5em !important;
}

.menu-item-blue, .btn-blue {
    color: yellow;
    background-color: blue;
}

.btn-darkblue {
    color: yellow;
    background-color: rgb(1, 1, 173);
}

.btn-darkblue:hover {
    background-color: rgb(2, 151, 243);
    color: rgb(255, 255, 255);
}

.menu-item-blue:hover,
.menu-item-darkblue:hover,
.menu-item-bluegreen:hover,
.menu-item-red:hover {
    border-color: black;
}

.menu-item-blue,
.menu-item-darkblue,
.menu-item-bluegreen,
.menu-item-red {
    border: none !important;
}

.menu-item-blue:hover,.btn-blue:hover {
    background-color: #44AAff;
    color: white;
}

.selected {
    background-color: darkblue !important;
    cursor: default;
}

.read-only {
    background-color: #00008BAA !important;
}

.no-pointer {
    cursor: default;
}

.margin-top {
    margin-top: 0.5em;
}

.margin-left {
    margin-left: 1em !important;
}

.margin-bottom {
    margin-bottom: 0.5em;
}

.no-border {
    border: none !important;
}

.no-margin {
    margin: 0px !important;
}

.no-margin-left {
    margin-left: 0px !important;
}

.no-margin-bottom {
    margin-bottom: 0px !important;
}

.no-padding-left {
    padding-left: 0px !important;
}

.no-padding-top {
    padding-top: 0px !important;
}

.top-dmargin {
    margin-top: 0.5em !important;
}

.bottom-dpadding {
    padding-bottom: 0.5em !important;
}

.btn-sub {
    cursor: pointer;
}

.btn-sub-blue:hover {
    background-color: #77CCFF;
}

.menu-item-darkblue {
    color: white;
    background-color: rgba(0, 0, 255, 0.747);
    border: skyblue solid 1px;    
}

.menu-item-darkblue:hover {
    background-color: rgb(2, 151, 243);
    color: rgb(255, 255, 255);
}

.menu-item-bluegreen,.btn-bluegreen {
    color: lightblue;
    background-color: rgb(0, 90, 97);
}

.menu-item-bluegreen:hover,.btn-bluegreen:hover {
    background-color: rgb(0, 141, 110);
    color: white;
}

.btn-bluegreen-on {
    background-color: rgb(0, 172, 134);
    color:white;
}

.btn-bluegreen-off {
    background-color: rgb(0, 90, 97,0.7);
    color: lightslategray;
}

.menu-item-red,.btn-red {
    color: orange;
    background-color: rgb(110, 75, 93);
}

.menu-item-red:hover,.btn-red:hover {
    background-color: rgb(167, 123, 140);
    color: white;
}

.menu-item-disabled,.menu-item-disabled:hover  {
    color: lightblue;
    background-color: #444444;
    border: skyblue solid 1px;    
    cursor: default;
}

#pop_settings {
    min-width: 512px;
}

#main_menu-body {
    width: 96px;
    padding: 0px;
}

.top-pane,#bottom-pane,#error_pane {
    line-height: 1.5em;
}

#error_pane {
    color: red !important;
    position: absolute;
    z-index:20;
    white-space: nowrap;
    cursor: pointer;
}

#fft_axe_bottom_pane {
    color: rgb(216, 199, 199) !important;
    position: absolute;
    z-index:20;
    white-space: nowrap;
    cursor: pointer;
}

.row {
    line-height: 1em;
}

.row-pane {
    padding: 4px;
}

.row-opt {
    align-content: center;
    line-height: 3em;
    display: inline-block;
}

div.row-opt span.opt-label {
    margin-left:0px;
}

div.row-opt span.unit {
    margin-left: 0px;
    margin-right: 1em;
}

div.row-opt input {
    margin-left: 0px;
    margin-right: 0em;
}

input[type="checkbox"] {
    width: 2em;
    height: 2em;
    vertical-align: middle;
}

.grid {
    display: grid !important;
}

.g2c {
    grid-template-columns: 50% 50%;
}

.g3c {
    grid-template-columns: 33% 33% 33%;
}

.max-columns {
    grid-template-columns: max-content;
}

.auto-columns {
    grid-template-columns: auto;
}

div.channel-opts-pane > div.row-pane > span.label {
    margin-left: 0px;
}

div.channel-opts-pane > div.row-pane {
    padding-left: 0px;
    display: table;
    align-items: stretch;
    padding-right: 0px;
}

div.channel-opts-pane span.menu-item
{
    margin-right: 0.5em;
    margin-left: 0em;
}

.row-pane:hover {
    /*background-color: #00008bcc;*/
}

div.channel-submenu-pane span.on-off-label {
    margin-left: 0px;
}

#bottom-pane {
    /*top: calc(100% - 3em);
    left: 1em;*/
    position: absolute;
    color: darkgray;
    z-index:20;
}

#bottom-pane:hover,
#right_bottom_pane:hover {
    background-color: unset !important;
}

#bottom-pane > span.label,
#right_bottom_pane > span.label {
    color: #444444 !important;
}

#right_bottom_pane {
    position: absolute;
    /*top: calc(100% - 3em);
    left: calc(100% - 8em);*/
    width: 10em;    
    color: darkgray;
    z-index:20;
}

#right_bottom_pane > span.read-only {
    background-color: unset !important;
}

.btn-ch {
    border: none;
    font-size: 1em;
    padding: 0px;
    line-height: 1em;
}

.btn-round {
    border-radius: 0.5em;
    line-height: 1em;
    height: 1.7em !important;
    padding-left: 0.3em;
    padding-right: 0.3em;
}

.btn-valid {
    border: none !important;
    font-size: 14px !important;
}

#vdiv,#tdiv {
    margin-left: 1em;
}

.trigger-plot {
    position: absolute;
    left: 1em;
    top: 1em;
    z-index:30;
}

.trigger-plot-back-symbol {
    font-size: 24px;
    padding: 0px;
    /*border: red solid 1px;*/
    height: auto;
    width: auto;
    display: block;
    margin: 0px;
    line-height: 22px;
    cursor: grab
}

.trigger-plot-back-symbol:hover {
    text-decoration: line-through;
}

.math-expr {
    width: Calc(100% - 8em);
    margin-right: 0px;
    text-align: left;
    text-transform: uppercase;
    font-size: 1.5em;
    padding: 0px;
    vertical-align: middle;
}

.kbd {
    width: 2.5em;
    height: 2.5em;
    line-height: 2.5em;
    border: darkblue solid 1px !important;
    margin-right: 0em !important;
}

#opt_os_sys_agent {
    width: 19.2em;
    margin-right: 0em;
}

#opts_os_sys {
    grid-auto-rows: unset !important;
}