@font-face {
    font-family: "DejaVu Sans Mono";
    src: url("/fonts/DejaVuSansMono.ttf") format("truetype");
    font-weight: normal;
}

@font-face {
    font-family: "DejaVu Sans Mono";
    src: url("/fonts/DejaVuSansMono-Bold.ttf") format("truetype");
    font-weight: bold;
}

* {
    box-sizing: border-box;
    font-family: "DejaVu Sans Mono", monospace;
}

a {
    color: gold;
    text-decoration: none;
}

body {
    background-color: #333;
    color: #eee;
    margin: 0;            /* no default 8px margin: the window-width canvas must not overflow (right-edge cutoff) */
    overflow: hidden;     /* the canvas fills the viewport; nothing scrolls behind it */
}

#shell {
    height: 100vh;        /* full height: the canvas sits at the top, no vestigial header above it */
    overflow: hidden;
}

#shell, #chat {
    display: flex;
    flex-direction: column;
    justify-content:flex-start;
    align-content: center;
    align-items: stretch;
}

#chat {
    height: 50vh;
    width: 50%;
}

#shell > div, #chat #controls {
    flex: 0 1 auto;
}

#shell #mainpanel, #chat #messages {
    flex: 1 0 auto;
}

#messages {
    padding: 20px;
    background-color: #444;
    overflow-y: scroll;
    font-size: 0.7em;
    max-height: 80%;
}

.message {
    padding: 3px;
    margin-top: 2px;
    margin-bottom: 2px;
    border-bottom: 1px solid #333;
}

.message input {
    display: inline-block;
    position: relative;
    top: -5px;
}

.message-sender {
    display: inline-block;
    color: #999;
    margin-left: 5px;
    margin-right: 5px;
    user-select: none;
}

div.controls {
    position: relative;
}

.controls, #mainpanel {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center; /*flex-start;*/
    align-content: center;
    align-items: center;
}

#mainpanel {
    justify-content: flex-start;
    margin: 10px;
}

#canvas, #mainpanel {
    border-bottom: 1px solid #777;
}

.controls > span {
    flex: 0 1 auto;
    align-self: auto;
    padding: 5px;
}
.controls label , .controls button{
    position: relative;
    top: 3px;
}

.controls > span > .message {
    flex: 1 0 auto;
}


#room-name {
    font-family: "DejaVu Sans Mono", monospace;
}

#hue-example {
    display: inline-block;
    width: 1em;
    height: 1em;
}

input, select, button {
    background-color: #555;
    color: white;
}

hr {
    border-color: #777;
}

.participant {
    display: inline-block;
    text-align: center;
    padding: 5px;
    margin: 10px;
    font-family: "DejaVu Sans Mono", monospace;
    position: relative;
}

.participant .connectionStatus {
    font-size: 0.5em;
}

.participant label {
    display: block;
    text-shadow: 0px 0px 3px #222;
}

image {
    image-rendering: pixelated;
}

#begin {
    min-height: 100vh;
    padding: 80px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

#identityBox {
    width: min(360px, calc(100vw - 40px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#identityStatus {
    min-height: 1.5em;
    color: #eee;
}

#identityStatus[data-tone="ok"] {
    color: #9ddcba;
}

#identityStatus[data-tone="warn"] {
    color: #f1c27d;
}

#identityBox input {
    width: 100%;
    font-size: 1rem;
    padding: 0.7em 0.8em;
    border: 1px solid #777;
}

.identity-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.identity-actions button {
    min-height: 40px;
}

.identity-actions button[hidden],
#identityBox input[hidden] {
    display: none;
}

#beginBtn {
    font-size: 3em;
    padding: 1em;
}

/*noselect*/
.overlay {
    z-index: 9999;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.7);
}

.screenshare {

}

.ownscreenshare {
    position: fixed;
    z-index: 9998;
    top: 0;
    right: 0;
    width: 20vw;
    border-bottom: 2px solid red;
    border-left: 2px solid red;
}

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

canvas {
    image-rendering: pixelated;
    image-rendering: optimizeSpeed;
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    -ms-interpolation-mode: nearest-neighbor;

}
