:root {
    --blue: #007bff;
    --indigo: #6610f2;
    --purple: #6f42c1;
    --pink: #e83e8c;
    --red: #dc3545;
    --orange: #fd7e14;
    --yellow: #ffc107;
    --green: #28a745;
    --teal: #20c997;
    --cyan: #17a2b8;
    --white: #fff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --primary: #007bff;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --turquoise: #3790b0;
}

html {
    line-height: 1.15;
}

body {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: white;
    font-family: Verdana, sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#main {
    padding: 0;
    height: 100%;
}

.column {
    position: relative;
    display: flex;
    flex-flow: column nowrap;
    width: 100%;
}

.centered.column {
    align-items: center;
}

.row {
    position: relative;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
}

.left.row {
    justify-content: flex-start;
    text-align: left;
}

#title {
    position: relative;
    max-height: 120px;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-left: -15px;
    background-color: #3790b0;
    color: white;
}

#title > .row {
    padding: 0 0.5rem;
}

#title > .row:first-child {
    padding: 0.5rem;
}

#logo {
    align-self: center;
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

#logo img {
    max-width: 200px;
    max-height: 100px;
    min-width: 173px;
    min-height: 70px;
    display: block;
    vertical-align: middle;
    border-style: none;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0 15px;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    color: #3790b0;
    font-size: 2rem;
}

a {
    color: #3790b0;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.text-right {
    text-align: right;
}

.buttons {
    flex: 0 0 25%;
    max-width: 25%;
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    text-align: right;
    white-space: nowrap;
}

button, .button {
    margin-left: 5px;
    font-size: inherit;
}

button:not(:disabled), .button:not(:disabled) {
    cursor: pointer;
}

button:disabled, .button:disabled {
    color: darkgray !important;
}

.round.button {
    display: inline-block;
    box-sizing: border-box;
    width: 60px;
    height: 60px;
    font-size: 24px;
    line-height: 1.33;
    border-radius: 35px;
    border-color: #fff;
    border-width: 2px;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border-style: solid;
    padding: 0.75rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.round.button:hover {
    color: black;
    background-color: white;
}

.small {
    font-size: xx-small;
    color: #fff;
}

.version {
    flex: 0 0 15%;
    max-width: 15%;
    padding-left: 2em;
}

#content {
    flex: 1;
    position: relative;
    overflow-y: scroll;
    align-items: flex-start;
}

.blue {
    color: var(--turquoise);
    border-color: var(--turquoise);;
}

.red {
    color: var(--red);
    border-color: var(--red);
}

.green {
    color: var(--green);
    border-color: var(--green);
}

span.blue {
    font-weight: bolder;
}

button {
    background-color: inherit;
    border: none;
    outline: none;
    box-shadow: none;
}

button.blue:hover {
    color: #d7203b;
    border-color: #d7203b;
}

button.red:hover {
    color: var(--gray);
    border-color: var(--gray);
}

#sidebar {
    position: sticky;
    top: 0;
    min-height: 100%;
    transition: margin .25s ease-out;
    border-right: 1px solid #dee2e6;
    background-color: #dae0e5;
}

#toggle-sidebar {
    border: none;
    background-color: transparent;
    position: absolute;
    z-index: 10;
    top: 0.6em;
    right: 0.6em;
    width: 2.1em;
    height: 2.1em;
    font-size: .75em;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    vertical-align: middle;
    padding: 0;
    margin: auto;
    transition: transform .25s ease-out;
}

#sidebar.toggled #toggle-sidebar {
    transform: rotate(180deg);
}

.menu {
    position: relative;
    width: 15rem;
    color: #3790b0;
    padding-left: 0;
    margin-bottom: 0;
}

.menu .item {
    font-weight: 700;
    position: relative;
    display: block;
    padding: 0.75rem 1.25rem;
    border-bottom: solid 1px rgba(0,0,0,0.125);
    width: 100%;
    text-decoration: none;
    color: #3790b0;;
}

.menu .item:last-child {
    border-bottom-width: 0;
}

#page {
    padding: 0 15px;
}

.page-content {
    padding-top: 2em;
}

.actions {
    display: flex;
    flex-flow: row wrap;
    gap: 0.5em;
    background-color: #dae0e5;
    margin: 0 -15px 0.5em;
    padding: 0.4em;
}

.actions button {
    background-color: transparent;
    border: none;
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

form label {
    margin-bottom: 0;
    color: #3790b0;
    display: inline-block;
}

.form.row {

}

.form-group .form-control {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    /*height: calc(1.5em + 0.75rem + 2px);*/
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.reset {
    position: relative;
    float: right;
    text-align: right;
    font-size: .7rem;
    z-index: 5;
}

.form-check {
    position: relative;
    display: block;
    padding-left: 1.25rem;
}

input[type="checkbox"], input[type="radio"] {
    box-sizing: border-box;
    padding: 0;
}

.form-check > input[type="checkbox"],  .form-check > input[type="radio"] {
    position: absolute;
    left: 1rem;
    top: 0.25rem;
    margin-top: 0.3rem;
    margin-left: -1.25rem;
}

.form-check > label {
    margin-bottom: 0;
}

#logout-form {
    display: none;
}

.message {
    position: relative;
    min-height: 1em;
    margin: 1em 0;
    background: #f8f8f9;
    padding: 1em 1.5em;
    line-height: 1.4285em;
    color: rgba(0,0,0,.87);
    transition: opacity .1s ease,color .1s ease,background .1s ease,box-shadow .1s ease;
    border-radius: 0.28571429rem;
    box-shadow: 0 0 0 1px rgb(34 36 38 / 22%) inset, 0 0 0 0 transparent;
}

.message .header {
    font-size: 1.14285714em;
    display: block;
    font-family: Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;
    font-weight: 700;
    margin: -0.14285714em 0 0 0;

}

.message .close.icon {
    cursor: pointer;
    position: absolute;
    margin: 0;
    top: 0.5em;
    right: 0.5em;
    opacity: .7;
    transition: opacity .1s ease;
}

.message .header+p {
    margin-top: 0.25em;
}

.message :last-child {
    margin-bottom: 0;
}

.success.message {
    box-shadow: 0 0 0 1px #a3c293 inset, 0 0 0 0 transparent;
    background-color: #fcfff5;
    color: #2c662d;
}

.success.message .header {
    color: #1a531b;
}

.error.message {
    box-shadow: 0 0 0 1px #e0b4b4 inset, 0 0 0 0 transparent;
    background-color: #fff6f6;
    color: #9f3a38;
}

.error.message .header {
    color: #912d2b;
}

select.empty {
    color: gray;
    font-style: italic;
}

select option:not(:first-child) {
    color: black;
    font-style: normal;
}

@media (min-width: 576px) {
    .compact.row {
        width: 40em;
    }
}

@media (min-width: 768px) {
    #sidebar {
        margin-left: 0;
    }
    #sidebar.toggled {
        margin-left: -12rem;
    }
}

table.wide {
    border-collapse: collapse;
    font-size: 0.8em;
    position: relative;
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

table.wide thead
{
    position: sticky;
    top: 0;
    background: white;
}

table.wide tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.2);
}

table.wide tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.2);
}

table.wide tbody td, table.wide tbody th {
    padding: 0 0.2em;
}

table.wide tbody td.wide {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table.wide tbody td.wide:hover {
    position: absolute;
    z-index: 10;
    overflow: visible;
    background-color: white;
    white-space: initial;
    table-layout:fixed;
    max-width:inherit;
    padding-right: 1em;
}

/* modals */

.modal {
    position: fixed;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.modal-bg {
    position: absolute;
    background: rgba(0, 128, 128, 0.8);
    width: 100%;
    height: 100%;
}

.modal-container {
    border-radius: 10px;
    background: #fff;
    position: relative;
    padding: 30px;
    max-width: 80vw;
    max-height: 80vh;
    overflow: scroll;
}

.modal-container .details {
    white-space: nowrap;
}

.modal-close {
     position: absolute;
     right: 15px;
     top: 15px;
     outline: none;
     appearance: none;
     color: red;
     background: none;
     border: 0px;
     font-weight: bold;
     cursor: pointer;
}

/* tooltips */

.tooltip{
    position: relative;

}
.tooltip:not(:disabled):hover:after{
    content:attr(data-tooltip);
    background:#000;
    padding:5px;
    border-radius:3px;
    display: inline-block;
    position: absolute;
    transform: translate(-50%,-100%);
    margin:0 auto;
    color:#FFF;
    min-width:80px;
    top:-5px;
    left: 50%;
    text-align:center;
}
.tooltip:not(:disabled):hover:before {
    top:-5px;
    left: 50%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
    border-color: rgba(0, 0, 0, 0);
    border-top-color: #000;
    border-width: 5px;
    margin-left: -5px;
    transform: translate(0,0px);
}

/* hospital */

table#hospital tr:nth-child(1) td:nth-child(1), table#hospital th:nth-child(1) {
    width: 12em;
}

table#hospital tr:nth-child(1) td:nth-child(2), table#hospital th:nth-child(2) {
    width: 8em;
}

table#hospital tr:nth-child(1) td:nth-child(3), table#hospital th:nth-child(3) {
    width: 8em;
}

table#hospital tr:nth-child(1) td:nth-child(4), table#hospital th:nth-child(4) {
    width: 12em;
}

table#hospital tr:nth-child(1) td:nth-child(5), table#hospital th:nth-child(5) {
    /* min-width: 10em; not working */
}

table#hospital tr:nth-child(1) td:nth-child(6), table#hospital th:nth-child(6) {
    width: 15em;
}

/* traces */

.fatalbg {
    background: darkred;
}

.errorbg {
    background: red;
}

.warnbg, .warningbg {
    background: orange;
}

.infobg {
    background: lightgreen;
}

.debugbg {
    background: lightgray;
}

table#traces tr:nth-child(1) td:nth-child(1), table#traces th:nth-child(1) {
    width: 12em;
}

table#traces tr:nth-child(1) td:nth-child(2), table#traces th:nth-child(2) {
    width: 12em;
}

table#traces tr:nth-child(1) td:nth-child(3), table#traces th:nth-child(3) {
    width: 12em;
}

table#traces tr:nth-child(1) td:nth-child(4), table#traces th:nth-child(4) {
    width: 16em;
}

table#traces tr:nth-child(1) td:nth-child(5), table#traces th:nth-child(5) {
    width: 6em;
    padding-left: 1em;
}

table#traces tr:nth-child(1) td:nth-child(6), table#traces th:nth-child(6) {
    white-space: nowrap;
    width: 10em;
}

table#traces tr:nth-child(1) td:nth-child(7), table#traces th:nth-child(7) {
    /* width: 12em; */
}

table#traces tr:nth-child(1) td:nth-child(8), table#traces th:nth-child(8) {
    white-space: nowrap;
    width: 8em;
}

/* alarmes */

tr.active-alarm {
    background-color: lightcoral;
}

table#alarms tr:nth-child(1) td:nth-child(1), table#alarms th:nth-child(1) {
    width: 12em;
}

table#alarms tr:nth-child(1) td:nth-child(2), table#alarms th:nth-child(2) {
    /* width: 25em; */
}

table#alarms tr:nth-child(1) td:nth-child(3), table#alarms th:nth-child(3) {
    /* width: 20em; */
}

table#alarms tr:nth-child(1) td:nth-child(4), table#alarms th:nth-child(4) {
    width: 4em;
}

table#alarms tr:nth-child(1) td:nth-child(5), table#alarms th:nth-child(5) {
    width: 6em;
}

/* parameters */

#encoding {
    font-size: 1.2em;
}

.dict {
    margin-left: 1em;
    padding-left: 1em;
    border-left: solid lightgray 1px;
}

.editable, [contenteditable] {
    min-width: 10em;
}

.dict-actions {
    margin-top: 1em;
    display: inline-block;
}

.hidden.dict-actions, .hidden.output-list {
    display: none;
}

.header {
    margin-top: 1em;
    font-size: 0.8em;
    font-weight: bold;
    line-height: 0.8em;
}

.field {
    display: inline-block;
}

.encoding-parameters {
    font-size: 0.8em;
}

.editable {
    cursor: pointer;
    padding: 0 0.2em;
}

.editable:hover, .editable:empty {
    background-color: rgba(96, 243, 226, 0.4);
}

#new-dict-form input {
    font-size: 1em;
    width: 20em;
    margin-top: 0.2em;
}

td.flat {
    position: relative;
}

div.output-list {
    position: absolute;
    top: 100%;
    left: 0;
    display: inline-block;
    background: white;
    border: solid 1px gray;
    z-index: 100;
    padding: 1em;
}

div.output-list a {
    display: block;
}

div.output-list a.disabled {
    text-decoration: none;
    color: darkgray;
    font-style: italic;
}
