﻿:root {
    --accent-color: gray;
    --font: 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

textarea {
    font-family: var(--font);
    resize: none;
    padding: .5rem;
    line-height: 1.5;
    height: 10em;
}

h1 {
    font-size: 150%;
    padding: .25rem .5rem;
    margin: 0;
}

h3 {
    font-family: var(--font);
    font-size: 125%;
    padding: 0 .25rem;
    margin-bottom: 0.2em;
}

img {
    background-color: #cccccc;
    border: thin solid #888888;
    aspect-ratio: 1 / 1;
    min-width: 100%;
}

button {
    padding: .5rem;
}

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-height: calc(100vh - 6rem);
    padding: .5rem;
    box-sizing: border-box;
    width: 100vw;
}

@media (min-width: 30rem) {
    main {
        grid-template-columns: 1fr 1fr 1fr;
    }
}


main > div {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auto-value {
    color: #aaaaaa
}

.parameterbox {
    min-width: 3em;
}


.outputbox .valueline:first-of-type .auto-value  {
    justify-content: flex-end;
    text-align: right;
    min-width: auto;
}

.outputbox > div,
.parameterbox > .valuebox,
.turtlebox textarea {
    flex: 1;
}

.turtlebox textarea {
    min-height: min(100vw, 16rem);
}

input {
    padding: .25rem;
}

/* Navbar container */
.navbar {
    overflow: hidden;
    background-color: var(--accent-color);
    height: 2em;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    font-size: 150%;
}

@media (min-width: 30rem) {
    .navbar {
        font-size: 100%;
    }
}

/* Links inside the navbar */
.navbar a, .navbar .dropbtn {
    display: block;
    font-size: 1em;
    line-height: 2em;
    height: 2em;
    color: white;
    text-align: center;
    text-decoration: none;
    padding: 0 1em;
}

/* Add a red background color to navbar links on hover */
.navbar a:hover, .dropdown:hover .dropbtn {
    background-color: red;
}

/* Dropdown button */
.dropdown .dropbtn {
    font-size: 0.8em;
    border: none;
    outline: none;
    color: white;
    background-color: inherit;
    font: inherit; /* Important for vertical align on mobile phones */
    margin: 0; /* Important for vertical align on mobile phones */
}

.dropdown h3 {
    font-family: var(--font);
    padding: 0;
    margin: 0 0 .5rem 0;
}

.dropdown h3:not(:first-of-type) {
    margin-top: 1rem;
}

.dropdown .subsection {
    margin-top: .5rem;
    font-weight: 600;
    font-style: italic;
    color: red;
}

.dropdown div {
    padding: .5rem;
}

.dropdown .column > div:not(.subsection) {
    cursor: pointer;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    vertical-align: top;
    background-color: #cccccc;
    width: 100%;
    box-sizing: border-box;
    left: 0;
    box-shadow: 0em 0.5em 1em 0px rgba(0,0,0,0.2);
    z-index: 1;
    padding: 1rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 30rem) {
    .columns {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .dropdown div {
        padding: .25rem .5rem;
    }
}

.valueline,
.valueline:not(.horizontal) > label {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    justify-content: space-between;
    padding: .25rem 0;
    flex-wrap: wrap;
}

.valueline input:not([type="checkbox"], [type="radio"], [type="color"]),
.valueline textarea {
    box-sizing: border-box;
    min-width: 70%;
}

.valueline.horizontal {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
}

.valueline.horizontal > label {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: flex-start;
}

.valueline > div {
    display: flex;
    flex-direction: row;
    min-width: 70%;
    justify-content: space-between;
}

.valueline > div label {
    display: block;
    white-space: nowrap;
}

.valuebox {
    border: thin solid black;
    padding: .5rem;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 30em;
    background-color: black;
    color: #fff;
    text-align: left;
    border-radius: 0.3em;
    padding: 0.3em 0.3em;
    position: absolute;
    z-index: 1;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}

.tooltip-inner {
    white-space: pre;
    max-width: none;
}