:root {
    --table-border-color: #ccc;

    --color-white: #ffffff; /* Pure white */
    --color-background-light: #f8f8f8; /* Background light */
    --color-border: #c3c3c3; /* Border color for SVG plane */
    --color-highlight-neutral: #e4e4e4; /* Neutral highlight */
    --color-highlight-primary: #7083c2; /* Primary highlight */
    --color-text-primary: #1e1e1e; /* Primary text color */
    --color-text-secondary: #787878; /* Subtle text color, e.g., for shortcuts */
    --color-divider-muted: #a1a1a1; /* Divider shade for menu options */
    --shadow-menu: 0 0 4px 0 rgba(0, 0, 0, 0.25); /* box shadow for menu */
    --color-progress-complete: #aaeeaa;
    --color-progress-pending: #eed0aa;
    --color-warning-background: #f0dbdb;
    --color-warning-foreground: #c01818;
    --radius-menu: 0.25rem;
}


body {
    font-family: Arial,Helvetica,sans-serif;
    /* Force print to show all color, this shows gray color in table at Print Equations */
    /* -webkit-print-color-adjust: exact; */
    color: var(--color-text-primary);
    margin: 0;
    padding: 0;
}
body>#overlay {
    position: absolute;
    display: flex;
    inset: 0;
    background-color: rgb(255, 255, 255, 0.7);
    color: var(--color-highlight-primary);
    opacity: 1;
    outline: 0.5rem dashed var(--color-highlight-primary);
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    z-index: 2000;
    outline-offset: -1rem;
    font-weight: bold;
}
body>#overlay.hidden {
    display: none;
    opacity: 0;
}


text.name_element {
    font-family: monospace;
}

.hideUnlessNwjs {
    display: none !important;
}
#svgplane {
    border-width: 0px;
}
#svgplane * {
    -webkit-user-select: none;  /* Chrome all / Safari all */
    -moz-user-select: none;     /* Firefox all */
    -ms-user-select: none;      /* IE 10+ */
    user-select: none;          /* Likely future */
}
#svgplane.panning {
    cursor: grabbing;
}

.tooltip {
    width: 400px;
}

@media print
{    
    #topPanel
    {
        display: none !important;
    }
}
#coverEverythingDiv {
    width: 100dvw;
    height: 100dvh;
    margin: 0;
    padding: 0;
    background-color: var(--color-background-light);
    display: flex; 
    flex-direction: column;

    overflow: hidden;
    /* Disable highlighting text */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* menu */
.fileToolBox {
    background-color: var(--color-highlight-neutral);
	border-bottom: 1px solid var(--table-border-color);
    display: flex;
    flex-direction: row;
    align-items: center;
}
#homepage-info {
    font-size: 0.75rem;
    margin-inline: auto 1rem;
    color: var(--color-text-secondary);
}

/* tool panel */
.tool-panel {
    margin-block: 0.25rem;
    margin-inline: 0.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 1rem;
    --button-size: 2rem;
}
.tool-panel > .tool-grouping {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    height: var(--button-size);
    gap: 0.125rem;
}
.tool-panel > .tool-grouping:not(:last-of-type)::after {
    content: "";
    position: absolute;
    right: -0.5rem;
    width: 1px;
    top: 0.4rem;
    bottom: 0.4rem;
    background-color: var(--table-border-color);
    background-color: var(--color-border);
}
/* buttons title */
[data-title] {
    position: relative;
}
[data-title]:hover::after {
    content: attr(data-title);
    font-weight: normal;
    position: absolute;
    top: calc(100% + 0.125rem);
    left: 0;
    white-space: pre;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--color-text-primary);
    color: var(--color-background-light);
    border-radius: 0.25rem;
    z-index: 4;
}

/* buttons */
.tool-panel button.tool-button {
    border: unset;
    border-width: 1px;
    border-style: solid;
    border-color: var(--color-border);
    background-color: var(--color-highlight-neutral);
    padding: 2px;
    margin: 0;
    box-sizing: border-box;
    width: var(--button-size);
    height: 100%;
    border-radius: 0.25rem;
}
button.tool-button img {
    width: 100%; 
    pointer-events: none;
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}
.tool-panel button.tool-button.pressed {
    background-color: var(--color-highlight-neutral);
    outline: 3px solid var(--color-highlight-primary);
    outline-offset: -3px;
}
.tool-panel button {
    cursor: pointer;
    font-size: 14px;
    border-width: 1.5px;
}
.tool-panel button.tool-button:hover:enabled {
    border-color: black;
}
.tool-panel button.tool-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* progress bar */
#progress-bar {
    position: relative;
    background-color: var(--color-highlight-neutral);
    width: max-content;
    display: inline-block; 
    min-width: 120px;
    height:  100%;
    padding: 0;
    margin: 0;
    vertical-align: top;
}
#progress-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--progress);
    background-color: var(--color-progress-pending);
}
#progress-bar[data-done]::before {
    background-color: var(--color-progress-complete);
}
#progress-bar-text {
    position: absolute;
    inset: 0;
    text-align: center;
    min-width: 100%;
    min-height: 100%;
    width: max-content;
    font-size: 13px;
    color: var(--color-text-primary);
    align-content: center;
}
/* time unit button */
#btn_timeunit {
    height: 100%; 
    vertical-align: top; 
    font-family: Arial, Helvetica, sans-serif;
    display: inline-block; 
    border: unset;
    border: 1px solid var(--color-border);
    background-color: var(--color-highlight-neutral);
    padding-inline: 0.5rem;
    box-sizing: border-box;
    border-radius: 0.25rem;
}
#btn_timeunit:hover {
    border-color: black;
}
#btn_timeunit > #timeunit-label {
    font-size: 10px;
    color: var(--color-text-secondary);
}
button svg {
    border-width: 0px;
}
table {
    border-collapse: collapse;
}
/* for empty plot */
.empty-plot-header {
    font-size: 25px; 
    font-weight: bold;
    width: 100%; 
    text-align: center;
}

/* Sticky table start here (used in TableVisual) */
table.sticky-table {
    width: 100%;
}
table.sticky-table th {
    padding: 8px 8px;
}
table.sticky-table th {
    /* Make header stay at top */
    position: sticky;
    top: 0;
    background-color: white;
}
table.sticky-table th::after {
    /* Make border-bottom since border does follow element with sticky */
    content: "";
    position: absolute;
    background: black;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
}
table.sticky-table th, table.sticky-table td {
    border: 1px solid var(--table-border-color);
} 
.time-header-cell::before, .prim-header-cell:not(:last-child)::before {
    /* made up right border */
    content: "";
    position: absolute;
    bottom: 0;
    top: 0;
    right: -1px;
    width: 1px;
}
.time-header-cell::before {
    background: black;
}
.prim-header-cell::before {
    background: #aaa;
}
.time-header-cell, .time-value-cell {
    /* make black line between time column and primitive column */
	border-right-width: 1px !important;
    border-right-color: black !important;
}
table.sticky-table th.time-header-cell:has(div.time-unit:not(:empty)) {
    padding: 0px 8px;
    font-size: 0.9rem;
}
table.sticky-table th.time-header-cell>div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
table.sticky-table th.time-header-cell>div.time-unit {
    font-weight: normal;
}
table.sticky-table th.time-header-cell>div.time-unit:empty {
    display: none;
}
.time-value-cell {
	text-align: center;
}
.prim-value-cell {
    text-align: right;
    padding: 2px 8px !important;
}
/* Vertical space start here */
div.vertical-space {
    height: 12px;
}
div.center-vertically-container {
    display: flex; 
    flex-direction: row;
    align-items: center;
}

.center-horizontally {
    margin-left: auto;
    margin-right: auto;
}

/* Modern Table start here */
.zebra tr:nth-child(even),
.zebra-even tr:nth-child(even),
.zebra-odd tr:nth-child(odd) {
    background-color: #f4f4f4;
}
.modern-table td, .modern-table th {
    border: 1px solid var(--table-border-color);
    padding: 1px 8px;
    vertical-align: middle;
}
/* primitive-selector table */
table.primitive-selector th,
table.primitive-selector td {
    padding-block: 0;
    border: 1px solid var(--table-border-color);
    padding-inline: 0.5rem;
    vertical-align: middle;
}
table.primitive-selector button {
    height: 100%;
}



.invisible-table table,tr,th, .invisible-table td {
    border: 0px;
    vertical-align: top;
    padding: 0px 10px;
}
input[type="number"] {
    width: 70px;
    text-align: right;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] {
    -moz-appearance:textfield;
}
input[type=text] {
    width: 100%;
    text-align: left;
}
/* Overlays */
.ui-widget-overlay {
    background: #000000;
    opacity: 0.3 !important;
}
button.primitive-add-button {
    color: #00aa00 !important; 
    font-size: 1.3em !important; 
    font-weight: bold !important; 
    font-family: monospace !important;
}
button.primitive-add-button[disabled]{
    color: grey !important;
}
button.primitive-remove-button {
    color: #aa0000 !important; 
    font-size: 1.3em !important; 
    font-weight: bold !important; 
    font-family: monospace !important;
}

.name-field, .value-field {
    font-family: monospace !important;
}

.primitive-settings .name-field, 
.primitive-settings .value-field {
    width: 200px;
}
.primitive-settings > * {
    box-sizing: border-box;
}

.table{
  display: table;
  width:100%;
}
  .table-row{
    display: table-row;
  }
.table-cell {
  display: table-cell;
  padding: 6px;
  /*border: black 1px solid;*/ /*Turn on for debuggning */
}
h3.equation-list-header {
    margin: 5px 0px 0px 0px;
}

.accordion-cluster ul {
    padding: 0px;
    margin: 0px;
}

.ui-accordion-content {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}
/* Equation editor start here */
.function-help:hover {
    background-color: hsl(0, 0%, 90%);
}
.click-function { 
    cursor: pointer; 
}
.linked-reference {
    font-family: monospace;
}
.linked-reference:hover {
    background-color: hsl(0, 0%, 90%);
}
/* for warning or note texts when changing settings and properties */
.warning {
    /* Used when there is a warning and changes wont be applied */
    color: var(--color-warning-foreground);
}
.note {
    /* Used when there is something to note but still allowed */
    color: #ea580c;
}
kbd {
    background-color: #eee;
    border-radius: 3px;
    border: 1px solid #b4b4b4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset;
    color: #333;
    display: inline-block;
    font-size: .85em;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    white-space: nowrap;
}
.example-code {
    font-family: monospace;
    border: 1px solid #ccc;
    border-radius: 2px;
    background-color: #f0f0f0;
}

.help-button {
    background: none;
    border-radius: 50%;
    border: 2px solid #999;
    color: #999;
    height: 1.3em;
    width: 1.3em;
    font-weight: bold;
    font-size: 1.1em !important;
    padding: 0;
}
.help-button:hover {
    border-color: black;
    color: black;
}
.help-button:focus {
    outline: none;
}

.macro-text {
    width: 600px;
    height: 400px;
}
/*  Info bar start here */
.info-bar {
    padding-left: 0.5rem;
    border-top: 1px solid var(--table-border-color);
    display: flex;
    column-gap: 1.5rem;
    margin: 0;
    font-size: 14px; 
    min-height: 3rem;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 1.75rem;
}
.info-box__element {
    white-space: nowrap; 
    display: flex; 
    align-items: center;
}
.info-bar__definition {
    font-family: monospace;
    overflow:hidden; 
    text-overflow:ellipsis; 
    max-width: 50vw;
}
.info-bar__definition-error:empty {
    display: none;
}
.info-bar__definition-error {
    font-weight: bold;
    padding-inline: 1rem;
    background-color: var(--color-warning-background);
    color: var(--color-warning-foreground);
}

/* Add style to jqplot elements */
.jqplot-highlighter-tooltip {
    /* Overwrite CSS highlighter tool tip*/
    z-index: 2;
    background: white!IMPORTANT;
}
td.jqplot-table-legend {
    /* Avoid line break in plot legend */
    white-space: nowrap;
}
.editor-footer div {
    display: inline;
}
b[data-arg]::before {
    content: attr(data-arg);
    position: absolute;
    top: 1.3em;
    font-weight: normal;
    white-space: pre;
}
.ui-tooltip {
    min-width: 22em;
}
.selected {
    outline: 2px solid #08f;
    outline-offset: -1px;
}


.preferences > .preference {
    padding: 0.75em 1.5em;
}
.preferences > .preference:hover {
    background-color: #f4f4f4;
}
.preferences > .preference:not(:hover) .btn_reset {
    visibility: hidden;
}
.preferences > .preference .title {
    font-weight: bold;
}

.invisible-file-input {
    position: absolute;
    width: 0;
}