﻿@font-face {
    font-family: "gamepadFont";
    src: url("../assets/EsquireGenericGamepdFont_CS.ttf");
    font-weight: normal;
    font-style: normal;
}

html,
body {
    height: 100%;
    margin: 0;
}

.portrait-warning
{
    display: none;

    padding: 12px;
    background-color: yellow;
    font-weight: bold;
}

#app {
    background-color: cornflowerblue;
}

#canvasHolder {
    display: flex;
    /* align-items: flex-start; */
    align-items: center;
    justify-content: center;
}

#theCanvas {
    background-color: black;
    image-rendering: pixelated;
    /* object-fit: contain; */

    /* Disable text highlighting and magnifying glass on iPhone/webkit */
    -webkit-user-select: none;
    touch-action: none;
}

.controls-h {
    display: flex;
    font-family: monospace;
    font-size: 75%;
    overflow-x: auto;
}

.controls-v {
    display: none;
    flex-direction: row;
    font-family: monospace;
    font-size: 75%;
/*    background: pink;*/
}

.controls-v table {
    flex: 0;
    min-width: 394px;
}


.flex-pad {
    flex: 2;
}

th,
td {
    padding: 0 12px;
    vertical-align: middle;
    text-align: center;
    width: 9%;
}

tbody tr {
    height: 40px;
}

.controls-h td:nth-child(even) {
    background: #ededed;
}
.controls-h th:nth-child(even) {
    background: #ededed30;
}

/*.controls-v tr:nth-child(even) td {
    background: #ededed;
}*/

.controls-v tr:nth-child(even) td {
    background: #edededb0;
}

.controls-v tr:nth-child(even) th {
    background: #ededed;
}

.controls-v tr:nth-child(odd) th {
    background: #6666662f;
}

.controls-v tr:nth-child(even) th {
    background: #6666664f;
}

thead tr {
    background-color: #6666667f;
}

thead th {
    vertical-align: bottom;
    padding-bottom: 6px;
}

table {
    border: 1px solid black;
    margin: 6px 0;
}

.controls-h table {
    overflow-x: scroll;
    max-width: 100%;
    width: 1%;
}

.controls-h tbody th {
    text-align: right;
}

.controls-v tbody th {
    text-align: right;
}

.button-glyph {
    font-family: "gamepadFont";
    font-size: 333%;
    line-height: 60%;
    padding: 0.25ex 0;
    vertical-align: middle;
}

.font-attribution {
    text-align: center;
    font-size: 8pt;
}

/* Enforce a min-width */
@media (max-width: 394px) {
    #theCanvas {
        display: none;
    }

    .portrait-warning {
        display: block;
    }
}

/* Sacrifice the right-hand side of the game area if needed */
@media (max-width: 483px) {
    html {
        overflow-x: hidden;
    }

    #canvasHolder {
        display: unset;
    }
}

/* If the viewport is too narrow, switch to a vertical layout for the controls table. */
@media (max-width: 783px) {
    .controls-h {
        display: none;
    }

    .controls-v {
        display: flex;
    }
}