html, body{
    height: 100%;
}
body {
    font-family: 'Roboto', sans-serif;
    padding: 0.5em;
    margin: 0;
    padding: 0;
    font-size: 1.5vh;
    background: black;
    color: white;
}
* {
  -ms-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box; 
  box-sizing: border-box;
}
button, input, textarea, select {
    color: white;
    background: #666;
    border: none;
    border-radius: 0.5em;
    min-height: 2em;
}
input[type="text"], input[type="number"], select, .form-element-width {
    width: 6em;
    display: inline-block;
    height: 1em;
}
input[type=radio], input[type=checkbox] {
    width: 1.5vh;
    height: 1.5vh;
    min-height: auto;
}
::placeholder {
    color: #bbb;
    font-style: italic;
}
textarea { vertical-align: top; }
label { vertical-align: middle; user-select: none; }

h1 {
    margin-top: 0;
}
a {
  text-decoration: none;
  color: #71cb71;
}
a:hover {
  color: black;
}
a.button-link {
    background: #333;
    padding: 0.5em;
    border-radius: 0.4em;
    width: 2em;
    font-size: 1.5em;
    text-align: center !important;
    display: inline-block;
}
a.button-link:hover {
    background: #444;
    color: white;
}
a.button-link.disabled {
    pointer-events: none;
    filter: blur(0.1em);
}


dialog {
    border: none;
    border-radius: 1em;
    box-shadow: 0 0.4em 1em #00000061;
    background: #000;
    color: white;
}
::backdrop {
    background: #ffffff6b;
}


/*.container {
    width: 100dvw;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2em;
    padding: 0.5em;
}*/
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: min-content min-content min-content;
    grid-auto-rows: 1fr;
    gap: 1em 1em;
    grid-auto-flow: row;
    grid-template-areas:
        "document-area vectorize-area"
        "tests-area tests-area";


    padding: 5em 0.5em;
}

#document-area { grid-area: document-area; }
#vectorize-area { grid-area: vectorize-area; }
#tests-area { grid-area: tests-area; }




.control-panel {
    display: flex;
    flex-direction: row;
    align-items: center;

    padding: 0;
    gap: 0.5em;
    font-size: 1.5vh;
}
.grow {
    flex-grow: 1;
}



.info-panel {
    background: black;
    color: white;
}
.info-panel a:hover {
    color: white;
}



#settings-area {
    justify-content: left;
    position: fixed;
    top: 0;
    width: 100%;
    background: black;
    padding: 0.5em;
}

#run-area {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: black;
    padding: 0.5em;
}


#document-area {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    min-height: 20em;
}



#vectorize-area, #vectorization-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

#vectorize-area .vectorization {
    display: flex;
    gap: 0.5em;
    align-items: center;
    flex-wrap: wrap;
}
#vectorize-area .vectorization .keyword         { flex: 0 0 10em; }
#vectorize-area .vectorization .question        { flex: 3 0 0; }
#vectorize-area .vectorization .type            { flex: 0 0 10em; }
#vectorize-area .vectorization .options         { flex: 2 0 0; }
#vectorize-area .vectorization .required-label  { flex: 0 0 auto; }

#vectorize-area .vectorization[data-type=""] { opacity: 50%; }

#vectorize-area .vectorization[data-type=""] .question,
#vectorize-area .vectorization[data-type=""] .options,
#vectorize-area .vectorization[data-type=""] .required-label,
#vectorize-area .vectorization[data-type="numeric"] .options
{
    visibility: hidden;
}

#vectorize-area .vectorization .keyword {
    flex: 0 0 10em;
    background: #3f3f3f;
    /* color: black; */
    border-radius: 0.5em;
    /* padding: 0.5em; */
    text-align: center;
    font-weight: bold;
    padding: 0.3em;
    cursor: move;
}




#tests-area table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}
#tests-area .test-instance {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-right: 0.3em;
}
#tests-area .test-result {
    background: #333;
    border: 0.2em solid black;
}
#tests-area .test-result.loading {
    background-image: url(ripple.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}
#tests-area .test-result.alt1 { background-color: hsl(120 46% 18% / 1); }
#tests-area .test-result.alt2 { background-color: #444; }
#tests-area .test-result.alt1.alt2 { background-color: hsl(120 46% 23% / 1); }

.test-values-dialog table {
    border-collapse: collapse;
    width: 100%;
}
.test-values-dialog tr:first-child th, .test-values-dialog tr:first-child td {
    border-bottom: 1em solid black;
}
.test-values-dialog th {
    text-align: left;
}
.test-values-dialog .controls {
    display: flex;
    gap: 0.5em;
    justify-content: flex-end;
    margin-top: 1em;
}
.test-values-dialog select, .test-values-dialog input {
    width: 100%;
}
.test-values-dialog select[multiple] {
    height: 6vmin;
}

.test-values-dialog output {
    text-align: center;
    font-size: 80%;
}

#run-area { justify-content: space-between; }