@font-face {
    font-family: Pacifico;
    src: url("fonts/Pacifico-Regular.ttf");
}
@font-face {
    font-family: Righteous;
    src: url("fonts/Righteous-Regular.ttf");
}
body {
    margin: 0;
    padding: 0;
    background: url("background-pattern/fancy-pants.jpg");
    background-position-x: 50vw;
}
h1 {
    font-family: 'Pacifico', cursive;
    font-size: 30px;
    margin: 0px 0px;
    color: #ffffff;
    text-shadow: 1px 1px 3px #04ff00;
}
#main-container {
    display: flex;
    padding: 20px;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
#left-section {
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    width: 25%;
}
#drawing {
    position: relative;
    flex: 1 1 auto;
    border: 1px solid black;
    border-radius: 5px;
    box-shadow: 0px 0px 12px 3px rgba(23, 23, 23, 0.25);
}
#canvas-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 25%;
    padding-right: 25%;
    background: rgba(0, 0, 0, 0.6);
}
#canvas-overlay .ui-box {
    display: flex;
    flex-direction: column;
}
#canvas-overlay #avatar-drawing {
    display: flex;
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
    margin-bottom: 15px;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #7d7d7d;
}
#canvas-overlay #avatar-drawing-canvas {
    /* Setting width and height relative to the viewport like this is a bit
       of a hack, but seems to work pretty well in my testing, so (shrug).
       See https://stackoverflow.com/a/23673392/380725 */
    width: 20vw;
    height: 20vw;
    image-rendering: crisp-edges;
    box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75) inset;
}
#avatar-drawing-tools-left,
#avatar-drawing-tools-right {
    display: flex;
    flex-direction: column;
    width: 16px;
}
#canvas-overlay .avatar-tool {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: 10%;
}
#canvas-overlay .avatar-tool:hover {
    transform: scaleX(2.0) scaleY(1.1);
    box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.75);
    border-radius: 2px;
}
#canvas-overlay .primary-tool {
    background-color: #eeeeee;
    display: flex;
    justify-content: center;
    flex-direction: column;
    flex-basis: 20%;
    text-align: center;
}
#canvas-overlay #name-value {
    flex-grow: 1;
    flex-shrink: 1;
    min-width: 0;
    padding: 5px 10px;
    border-radius: 5px;
    background: #ffd331;
    border: 1px solid #a27000;
    color: #755200;
    font-family: 'Righteous', Arial;
    font-size: 18px;
}
#canvas-overlay #start {
    display: block;
    width: 100%;
    height: 40px;
    font-size: 18px;
}
#canvas {
    width: 100%; height: 100%;
    background: white;
    border-radius: 5px;
}
.ui-box {
    padding: 15px;
    border: 1px solid #7d7d7d;
    background: #cecece;
    border-radius: 5px;
    box-shadow: 0px 0px 12px 3px rgba(23, 23, 23, 0.25);
}
.input-yellow {
    border: 1px solid #a27000;
    background: #ffd331;
    border-radius: 5px;
    font-family: 'Pacifico', cursive;
    color: #755200;
}
.input-green {
    border: 1px solid #006600;
    background: #33ee33;
    border-radius: 5px;
    font-family: 'Pacifico', cursive;
    color: #02542b;
}

[data-visible="true"] {
    display: inherit;
}
[data-visible="false"] {
    display: none;
}

#word,
#player,
#players {
    margin-bottom: 15px;
}
#word {
    font-family: 'Righteous', Arial;
    font-size: 18px;
}
#players {
    font-family: 'Righteous', Arial;
}
#players .drawer {
    text-shadow: 1px 1px 2px #fff;
    font-weight: bold;
}
#players .is-drawing-icon,
#players .is-host-icon {
    float: right;
}
#players .avatar {
    float: left;
}
#players .player-role-ids {
    display: flex;
}
#players .player-role-ids > span {
    flex-grow: 1;
}
#chat {
    box-sizing: border-box;
    position: relative;
    font-family: Arial;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* HACK: https://medium.com/@stephenbunch/how-to-make-a-scrollable-container-with-dynamic-height-using-flexbox-5914a26ae336 */
    min-height: 0;
    padding: 0;
    /* Necessary to get border-radius to clip the scrollbar, applying
       border-radius to our children (which feels better) doesn't seem
       to work, at least on firefox */
    overflow: hidden;
}
#chat-messages {
    border: 1px solid grey;
    border-radius: 5px;
    box-sizing: border-box;
    overflow-y: scroll;
    word-wrap: break-word;
    flex-grow: 1;
    min-height: 4em;
    border: none;
    padding-top: 8px; /* 8px + 7px = 15px */
}
.chat-message {
    padding: 7px 15px;
}
.chat-message:nth-child(2n) {
    background: #ababab;
}
.chat-message .avatar {
    float: left;
}
#chat-input {
    width: 100%;
}
#chat-input textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 0px;
    padding: 15px;
    border: none;
    resize: none;
    font-family: Arial;
}
.radial-menu path {
    fill: white;
    stroke: black;
}
.radial-menu text {
    font-size: 40px;
}
.radial-menu g g g:hover {
    transform: scale(1.05,1.05);
}
.radial-menu g g g.open {
    transform: scale(1.1, 1.1);
}
