/* tWIZY - the page around the game canvas. */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: Arial, Helvetica, sans-serif;
    color: #f2f2f2;
    /* The image lives next to this stylesheet in static/images. */
    background-color: #101018;
    background-image: url('images/colored_space.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 100%;
}

button {
    width: 220px;
    height: 42px;
    background-color: #e84610;
    border: 3px solid #b5b5b5;
    border-radius: 8px;
    color: #ffffff;
    font-size: 15px;
    font-family: inherit;
    text-transform: uppercase;
    cursor: pointer;
}

button:hover:enabled {
    background-color: #f25c26;
}

button:disabled {
    opacity: 0.6;
    cursor: progress;
}

/* The place for the button and for the status line is reserved from the
   start.  The stage is centred in the page, so a button that appears out
   of nowhere would push the terminal up: the space has to be there
   before the game ends.  `visibility: hidden` keeps the box and takes
   the button out of the tab order and out of the mouse. */
button[hidden],
.status[hidden] {
    display: block;
    visibility: hidden;
}

.terminal {
    background-color: #000000;
    border: 5px solid #b5b5b5;
    padding: 6px;
    max-width: 100%;
    overflow: auto;
}

canvas {
    display: block;
    outline: none;
    /* The canvas keeps the exact size of the grid, the layout never resizes it. */
    flex: none;
    max-width: none;
}

.status {
    font-size: 14px;
    color: #ffd9c7;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.55);
    padding: 5px 14px;
    border-radius: 8px;
    /* The slot is as tall with a message as without it. */
    min-height: 26px;
}
