@keyframes blink {
    50% {
        opacity: 0;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
input {
    font-family: Arial, Helvetica, FreeSans, sans-serif;
    font-weight: normal;
    font-size: 100%;
    line-height: 1.4;
}

body {
    background-color: rgb(240, 240, 240);
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

iframe {
    width: 100%;
    height: 100%;
}

p {
    margin: 0;
}

input {
    background-color: rgb(210, 210, 255);
    padding-left: 6px;
    padding-right: 6px;
}

input[type="number"] {
    max-width: 14ch;
    -moz-appearance: textfield;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="radio"],
input[type="radio"] + label {
    cursor: pointer;
}

input[disabled] {
    border: none;
    background-color: transparent;
    color: black;
}

button {
    min-width: calc(16px + 10ch);
    margin: 3px;
    padding: 4px 6px;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    background-color: rgb(200, 200, 200);
    border-color: #eeeeee;
    cursor: pointer;
}

button.calculator {
    min-width: unset;
    margin: 0;
    padding-bottom: 0;
}

textarea {
    resize: none;
}

table {
    display: grid;
    grid-template-rows: max-content 1fr;
    grid-template-columns: 1fr;
    width: 100%;
    height: 100%;
    border: 1px solid black;
    border-collapse: collapse;
    text-align: center;
    overflow-y: auto;
    background-color: rgb(200, 200, 200);
}

div[class|="box"].framed table {
    border-top: none;
    border-right: none;
    border-left: none;
}

thead {
    border-bottom: 1px solid black;
    font-weight: bold;
    position: sticky;
    top: 0;
    background-color: rgb(240, 240, 240);
}

tbody {
    height: 100%;
}

tr {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    background-color: rgb(240, 240, 240);
}

th {
    display: flex;
    align-items: end;
    justify-content: center;
}

th + th,
td + td {
    border-left: 1px solid black;
    overflow-x: hidden;
    text-overflow: ellipsis;
}

tr.own {
    color: #0000c8;
}

tr[data-selected] {
    background-color: #5a5aff;
}

div.auto-scroll {
    width: 100%;
}

canvas {
    width: 100%;
    height: 100%;
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.screen {
    border: 5px solid transparent;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.screen.framed {
    border-color: rgb(255, 255, 0);
}

[class|="box"].input button[type="submit"] {
    background-color: rgb(255, 90, 90);
}

[class|="box"] {
    position: absolute;
    padding: 3px;
    background-color: transparent;
}

[class|="box"].framed {
    margin: 2px;
    border: 1px solid black;
    padding: 0;
    background-color: rgb(240, 240, 240);
}

.box-container,
/*[class|="box"]:not(.box-plot):not(.box-questions):not(.box-address):not(.box-web):not(.framed),*/
[class|="box"],
.pane {
    pointer-events: none;
}

.box-web:not(.framed),
.box-plot:not(.framed),
.box-questions:not(.framed),
.box-address:not(.framed)
 {
    pointer-events: auto;
}

.box-plot,
[class|="box"]:not(.box-container).framed,
.pane > * {
  pointer-events: auto;
}

[class|="box"][hidden] {
    display: none;
}

.box-container.framed {
    background-color: transparent;
    margin: 0;
    border: none;
    padding: 3px;
}

.box-container.framed::before {
    content: "";
    display: block;
    border: 1px solid black;
    position: absolute;
    top: 2px;
    right: 2px;
    bottom: 2px;
    left: 2px;
}

.box-plot:not(.framed) {
    background-color: rgb(240, 240, 240);
}

.box-header {
    display: grid;
    grid-template-columns: 0.618fr 0.382fr;
    gap: 4px;
    align-items: center;
}

.box-header .pane:only-child {
    grid-column: 1/-1;
}

label.rtf,
.rtf span {
  display: inline-block;
  text-decoration-line: inherit;
}

label.rtf > span {
  width: 100%;
}

p.timer-expired {
    position: absolute;
    right: 6px;
    bottom: 3px;
    padding-left: 3px;
    padding-right: 3px;
    line-height: 1;
    background-color: rgb(240, 240, 240);
    color: red;
    animation: 2s infinite blink;
    display: none;
}

input.remaining-seconds[data-expired] + p.timer-expired {
    display: initial;
}

.box-header,
.box-help {
    padding: 8px 2px 2px 2px;
    background-color: rgb(240, 240, 240);
}

.box-header.framed,
.box-help.framed {
    border: none;
    padding: 8px 2px 2px 2px;
}

.box-multimedia > video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: none;
}

.box-multimedia > img {
    width: 100%;
    height: 100%;
    object-position: center;
    object-fit: none;
}

.box-chat,
.box-chat.framed {
    margin: 0;
    border: none;
    padding: 2px;
}

.box-chat > .pane > .pane:first-child {
    border: 1px solid black;
}

.box-chat > .pane > .pane:nth-child(2) {
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    border-left: 1px solid black;
}

.box-chat:not(.framed) > .pane > .pane:nth-child(2) {
    border-color: transparent;
}

.box-chat section {
    align-self: stretch;
}

.box-chat input,
.box-chat textarea {
    align-self: stretch;
}

.box-chat p {
    padding: 3px 3px 0 3px;
}

.inlet {
    padding: 6px;
}

.auto-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.pane {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    overflow: hidden;
}

.pane.grouping {
    border: 1px solid darkgray;
    overflow: visible;
}

.pane.grouping p.legend {
    position: absolute;
    left: 6px;
    top: -8px;
    padding-left: 3px;
    padding-right: 3px;
    background-color: rgb(240, 240, 240);
    line-height: 1;
}

.pane.grouping.inlet {
    padding: 11px 6px 6px 6px;
}

.pane.grouping.inlet p.legend ~ .align {
    padding-left: 3px;
}

.pane.scroll {
    overflow: scroll;
}

.pane.justify-start {
    justify-content: flex-start;
}

.pane.justify-end {
    justify-content: flex-end;
}

.pane.align-start {
    align-items: flex-start;
}

.pane.align-end {
    align-items: flex-end;
}

.pane.wrap {
    flex-wrap: wrap;
    align-content: center;
}

.pane.column.wrap {
    max-height: 100%;
    /* work around https://getridbug.com/html/when-flexbox-items-wrap-in-column-mode-container-does-not-grow-its-width/ */
    overflow: visible;
    /*z-index: 2;*/
}

.pane.wrap.align-start {
    align-content: flex-start;
}

.pane.wrap.align-end {
    align-content: flex-end;
}

.pane.column {
    flex-direction: column;
}

.pane.overlay {
    position: absolute;
    align-self: center;
}

.pane.column.overlay {
    width: 0;
}

.pane > .stretch {
    flex: 1 0 auto;
}

.pane > .shrink {
    flex: 0 1 auto;
}

.pane > .flexible {
    flex: 1 1 auto;
}

[class|="box"] > .pane {
    width: 100%;
    height: 100%;
}

.grid {
    display: grid;
    justify-items: start;
    align-items: center;
    width: 100%;
    height: 100%;
}

.grid.column {
    grid-auto-flow: column;
}

.grid > p,
.grid > input[type="text"][disabled] {
    justify-self: center;
    text-align: center;
}

.grid > * {
    padding: 6px;
}

.grid-line {
    height: 100%;
    width: 100%;
    padding: 0;
    background-color: black;
}

.item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.item-grid > label {
    justify-self: flex-end;
}

.item-grid > label.align-self-baseline {
    align-self: baseline;
}

.item-grid > p,
.item-grid > div.rtf {
    grid-column-start: span 2;
    justify-self: center;
    text-align: center;
    width: 100%;
}

.contracts-grid {
    display: grid;
    gap: 6px;
    align-items: center;
    justify-items: center;
}

.contracts-grid > label,
.contracts-grid > input {
    text-align: center;
    width: 100%;
}

.contracts-grid > label {
    padding-right: 1em;
    padding-left: 1em;
}

.contracts-grid > p.span-all-cols {
    grid-column: 1/-1;
    text-align: center;
}

.radio-sequence,
.radioline {
    display: flex;
    flex-wrap: wrap;
}

.radio-sequence label {
    margin-right: 1.5ch;
}

.radioline input {
    margin-right: 0.125ch;
    margin-bottom: calc(0.19lh - 2px);
    margin-left: 0.125ch;
}

.radioline label:first-of-type {
    margin-right: 0.5ch;
}

.radioline label:last-of-type {
    margin-left: 0.5ch;
}

.slider,
.scrollbar {
    display: flex;
    align-items: center;
}

.slider label:first-of-type,
.scrollbar label:first-of-type {
    margin-right: 0.5ch;
}

.slider label:last-of-type,
.scrollbar label:last-of-type {
    margin-left: 0.5ch;
}

.scrollbar-ctrl {
    position: relative;
    overflow-x: scroll;
    border: 0.5px solid black;
    background-color: #cdcdcd;
}
.scrollbar-ctrl[data-disabled]{
    pointer-events: none;
}
.scrollbar-ctrl > * {
    height: 1px;
    border: none;
    margin: 0;
    padding: 0;
}

.scrollbar-ctrl input {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border: none;
    background-color: transparent;
}

.error {
    color: red;
}

.warning {
    background-color: yellow;
    position: fixed;
    top: calc(50% - 18px);
    padding: 12px;
    text-align: center;
    font-size: 24px;
    line-height: 24px;
}

#lock_overlay {
    width: 100%;
    height: 100%;
    position: fixed;
    background-color: black;
    opacity: 25%;
    z-index: 1000;
    cursor: wait;
}

input[type="radio"] + input[type="radio"] {
    margin-left: 0;
}

input.remaining-seconds {
    color: red;
    text-align: right;
}

.box-address,
.box-questions {
    overflow-y: auto;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgb(240, 240, 240);
}

.box-address .title,
.box-questions .title {
    margin-bottom: 1.5rem;
    line-height: 1;
    font-size: 120%;
    font-weight: bold;
}

.questions-grid {
    display: grid;
    justify-items: start;
    align-items: start;
    align-content: start;
    row-gap: 1em;
    width: 100%;
}

.questions-grid > * {
    width: 100%;
    margin: 0;
}

.questions-grid button {
    width: 100%;
}

.questions-grid > .wide {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

.box-address > button,
.box-questions > button,
.ruler > button {
    margin-top: 1.5rem;
    align-self: flex-end;
}

.box-address,
.ruler {
    display: flex;
    flex-direction: column;
    align-content: stretch;
}

.box-address {
    margin-right: 15vw;
    margin-left: 15vw;
}

.radioline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 80%;
    line-height: 1;
}

.questions-grid .radioline-header,
.radioline-subgrid .radioline-header {
    margin-bottom: -1em;
}

.box-address .radioline,
.box-questions .radioline {
    justify-content: space-between;
    align-self: stretch;
}

.box-address .radioline input,
.box-questions .radioline input {
    margin-right: 0;
    margin-left: 0;
}

.questions-subgrid {
    display: grid;
    justify-items: stretch;
    align-items: start;
    align-content: start;
    grid-template-columns: auto 1fr auto;
    row-gap: 1em;
    grid-column: span 2;
}

.questions-subgrid-row {
    grid-column: span 3;
}

.text-align-left {
    text-align: left !important;
}

.text-align-center {
    text-align: center !important;
}

.text-align-right {
    text-align: right !important;
}

.text-nowrap {
    white-space: nowrap;
}
