html {
    box-sizing: border-box;
    height: 100%;
}
*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: sans;
    font-size: 12pt;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

canvas {
    display: block;
    margin-top: 0px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 2mm;
    max-width: 100%;
}

.busy > canvas {
    /* filter: invert(1) brightness(0.5) invert(1); */
}

p {
    margin: 0;
    padding: 0;
}

ul.controls {
    margin: 0;
    margin-top: 5px;
    padding: 0;
    display: flex;
    list-style-type: none;
}

.controls li {
    margin-right: 10px;
    margin-bottom: 10px;
    white-space: nowrap;
    z-index: 1;
}

a:link, a:visited {
    color: black;
}

.controls li a:active {
    background-color: red;
}

.disabled {
    pointer-events: none;
}

.controls li a {
    padding: 0 10px;

    text-align: center;

    display: inline-block;
    height: 4ex;
    line-height: 4ex;

    background-color: #ccc;
    border: 1px solid #888;
    border-radius: 2mm;
    text-decoration: none;
    outline: 0;
    user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    cursor: pointer;
}

.controls .clone, .controls .clone * {
    pointer-events: none;
    z-index: 2;
}

.controls .clone {
    animation: buttonpress-zoom 1s cubic-bezier(0.1, 0.5, 0.86, 0.94) forwards;
    transform-origin: 50% 60%;
}

.controls .clone a {
    animation: buttonpress-color 1s cubic-bezier(0.1, 0.5, 0.86, 0.94) forwards;
}

@keyframes buttonpress-zoom {
    0% {
        opacity: 1;
        transform: scale(1.0);
    }
    100% {
        opacity: 0;
        transform: scale(2.5);
    }
}

@keyframes buttonpress-color {
    0% {
        background-color: red;
    }
    30% {
        background-color: #ccc;
    }
}

.grid-container {
    box-sizing: border-box;
    display: grid;
    height: 100%;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr min-content;
    grid-template-areas: "form    renders"
                         "control control";
}

.grid-container > * {
    padding-left: 10px;
    padding-top: 10px;
}

/* form */
.grid-form {
    grid-area: form;
    position: relative;
}

textarea {
    box-sizing: border-box;
    resize: none;
    width: 100%;
    height: 100%;
}

.status-overlay {
    position: absolute;
    top: 25px;
    right: 10px;
    bottom: 15px;
    left: 20px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    overflow: hidden;

    pointer-events: none;
    z-index: 2;
}

#status > span {
    opacity: 0.5;
    background: white;
    display: block;
    text-align: right;
    font-style: italic;
    animation: delayed-fadeout 15s linear forwards;
    padding: 0 10px;
}

@keyframes delayed-fadeout {
    0%, 90% { opacity: 0.5; }
    100% { opacity: 0; }
}


/* renders */
.grid-renders {
    grid-area: renders;
    overflow-y: auto;
}

.renders {
    height: 100%;
}

/* control */
.grid-control {
    grid-area: control;
}

span.shortcuts {
    font-size: 60%;
}

span#gitversion {
    font-size: 70%;
}

span#target {
    font-weight: bold;
}
