:root {
    --blue-normal: #255ab4;
    --blue-light: #92acd9;
    --blue-gray: #8091ad;
    --yellow-normal: #f8d748;
    --yellow-light: #fbeba3;
    --yellow-gray: #d9cd9f;
    --dark-text: #1e1e1e;
    --light-text: #ececec;
    --medium-light-bg: #a7a7a7;
    --medium-light-text: #7f7f7f;
    --medium-gray: #5f5f5f;
    --medium-dark-gray: #3a3a3a;
    --orange-highlight: #da8100;
}

html {
    width: 100%;
    height: 100%;
}

body {
    min-height: 100%;
    background-color: var(--dark-text);
    color: var(--light-text);
}

body,
input,
textarea,
button {
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    font-size: 16px;
}

/* Smaller margins on smaller (phone) screens */
@media screen and (max-width: 560px) {
    body {
        margin: 10px 10px 0 10px;
    }
}

@media screen and (min-width: 561px) {
    body {
        margin: 20px 20px 0 20px;
    }
}

#canvas {
    margin-bottom: 10px;
}

div.eqspaced {
    display: flex;
    width: 100%;
    /* Ensure equal-width items */
    justify-content: space-between;
    /* Vertically centers all children */
    align-items: center;
    gap: 1ex;
}

/* Children of eqspaced should be ... eq-spaced */
div.eqspaced>div,
div.eqspaced>button {
    flex: 1;
    text-align: center;
    box-sizing: border-box;
}

div.eqspaced button.dropup-button {
    width: 100%;
}

div.hflow {
    display: flex;
    gap: 1ex;
}

#playerOneBadge,
#playerTwoBadge {
    display: inline-flex;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-bottom: 4px transparent;
    border-radius: 5px;
}

#playerOneBadge.turn {
    color: var(--light-text);
    background-color: var(--blue-normal);
    border-bottom: 4px solid var(--blue-light);
}

#playerOneBadge.no-turn {
    opacity: 0.6;
    color: var(--light-text);
    background-color: var(--blue-normal);
}

#playerTwoBadge.turn {
    color: var(--dark-text);
    background-color: var(--yellow-normal);
    border-bottom: 4px solid var(--orange-highlight);
}

#playerTwoBadge.no-turn {
    opacity: 0.5;
    color: var(--dark-text);
    background-color: var(--yellow-normal);
}

a:link,
a:visited,
a:hover,
a:active {
    color: var(--blue-light);
}

div.menurow {
    margin-bottom: 8px;
}

.center {
    text-align: center;
}

div.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

/* Login and Join */
div.login {
    text-align: center;
    margin-top: 20px;
}

.inputlike {
    background-color: white;
    color: var(--dark-text);
    border-radius: 5px;
    padding: 10px;
    border: none;
    cursor: pointer;
    font: inherit;
}

.input-with-button {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.account-form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}


.account-form form {
    width: 300px;
}

.account-form input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
}

div.account-form div.inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-form button {
    padding: 10px 20px;
    color: var(--dark-text);
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.account-form button[type='button'] {
    background-color: var(--medium-light-bg);
}

.account-form button[type='submit'] {
    background-color: var(--blue-light);
}

/* Flash messages */

.flashmessage {
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    border: 2px solid;
    text-align: center;
}

.flash-error {
    background-color: #fdecea;
    color: #b71c1c;
    border: 1px solid #b71c1c;
}

.flash-info {
    border-color: #1e8449;
    background-color: #e9f7ef;
    color: #1e8449;
}

/* 
.flash-info {
    border-color: #3498db; 
    background-color: #eaf6fc; 
    color: #2a73b9; 
} */
/* 
.flash-info {
    border-color: #f1c40f;
    background-color: #fcf6dc;
    color: #c49b0e;
} */


/* New Game */

div.spacer {
    margin-top: 1ex;
}

div.xlspacer {
    margin-top: 2ex;
}

.gameButton {
    min-width: 10em;
    background-color: var(--blue-light);
    color: var(--dark-text);
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

th,
td {
    text-align: left;
    padding-right: 1em;
}

div.games {
    /* Initially hidden */
    display: none;
    text-align: center;
}

div.games th {
    color: var(--medium-light-text);
}

#login-info {
    color: var(--medium-light-text);
}

.inline-form {
    display: inline;
}

.inline-form button {
    background: none;
    border: none;
    color: var(--medium-light-text);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

/* Dropup menu for CPU think time */
.dropup {
    position: relative;
    display: flex;
}

.dropup-button,
.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: var(--light-text);
    background-color: var(--medium-gray);
    /* background-color: var(--blue-light); */
}


div:focus,
button:focus,
input:focus {
    outline: none;
}

.dropup-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    /* Position it above the button */
    left: 0;
    border: 1px solid transparent;
    border-radius: 5px;
    z-index: 1;
    outline: 1px solid var(--light-text);
}

.dropup-menu button {
    width: 100%;
    padding: 10px;
    background-color: var(--medium-dark-gray);
    color: var(--light-text);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
}

.dropup-menu button.selected {
    color: var(--dark-text);
    background-color: var(--blue-light);
}

.dropup-menu.open {
    display: block;
}

button,
input[type='submit'] {
    -webkit-tap-highlight-color: transparent;
}

/* Vertically align icons and labels in buttons. */
button.labelled-icons {
    display: flex;
    align-items: center;
    gap: 1ex;
}