@font-face {
    font-family: "nyt-karnakcondensed";
    src: url(/karnakcondensed-normal-700.woff2) format("woff");
}

header {
    height: 50px;
    color: white;
    border-bottom: 1px solid #3a3a3c;
}

body {
    height: 100%;
    background-color: #121213;
    margin: 0;
    padding: 0;
    overflow-y: hidden;
}

main {
    width: 500px;
    margin: 0 auto;
    height: calc(100vh - 51px);
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 540px) {
    main {
        width: 360px;
    }
}

div#board {
    width: 350px;
    height: 420px;
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    grid-gap: 5px;
    padding: 10px;
    box-sizing: border-box;
}

div.game-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 5px;
}

div.game-tile {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    line-height: 2rem;
    font-weight: bold;
    vertical-align: middle;
    box-sizing: border-box;
    color: white;
    text-transform: uppercase;
    user-select: none;
    font-family: Arial;
    height: 62px;
}

div.game-tile.empty {
    border: 2px solid #3a3a3c;
}

.absent {
    background-color: #3a3a3c!important;
}

.partial {
    background-color: #b59f3b!important;
}

.correct {
    background-color: #538d4e!important;
}

.tbd {
    border: 2px solid #565758!important;
}

#board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    overflow: hidden;
}

#game-keyboard {
    height: 199px;
    padding: 0 8px;
}

#game-keyboard > div.row {
    display: flex;
    width: 100%;
    margin: 0 auto 8px;
}

#game-keyboard button {
    font-weight: bold;
    border: 0;
    padding: 0;
    margin: 0 6px 0 0;
    height: 58px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    background-color: #818384;
    color: white;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
}

#game-keyboard button:last-of-type {
    margin: 0;
}

#game-keyboard .halfspace {
    flex: 0.5;
}

header .title {
    font-family: 'nyt-karnakcondensed';
    font-weight: 700;
    font-size: 37px;
    line-height: 100%;
    letter-spacing: 0.01em;
    text-align: center;
    pointer-events: none;
    padding-top: 6.5px;
}

header #settings {
    position: absolute;
    right: 20px;
    top: 11.5px;
    cursor: pointer;
}

#game-keyboard .flex-one-half {
    flex: 1.5;
    font-size: 12px;
}

#backspace > svg {
    transform: translateY(-1px);
}

#settings-box {
    font-family: Arial;
    position: absolute;
    right: 8px;
    top: 59px;
    color: white;
}

#settings-box a {
    color: white;
}

.hidden {
    display: none;
}

#failure {
    z-index: 2;
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    width: fit-content;
}

#failure > div {
    position: relative;
    margin: 16px;
    background-color: white;
    color: #121213;
    padding: 16px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: Arial;
}
