:root {
    --primary-colour: #a8ddf2;
    --highlight-colour: #0769aa;
    --article-background-colour: black;
    --header-guesses-background-colour: #222222;
    --double-highlight-colour: red;
    --article-font-size: 1rem;
    --guess-table-background: var(--header-guesses-background-colour);
}

body {
    position: relative;
    padding: 0;
    margin: 0;
    font-family: monospace;
    font-kerning: none;
    letter-spacing: 0px;
    word-wrap: normal;
    height: 100%;

}
html {
    margin: 0;
    padding: 0;
    height: 100%;
}
#header {
    width: 100vw;
    height: 5%;
    background-color: var(--header-guesses-background-colour);
}
.article-word-highlighted {
    background-color: var(--highlight-colour);
    color: black;
}
.article-word-double-highlighted {
    background-color: var(--double-highlight-colour) !important;
    color: black;
}
th {
    position: sticky;
    top: 0;
    background: var(--guess-table-background);
    z-index: 1; /** ew but can't get another solution to work **/
    padding: 0.5rem;
    color: var(--primary-colour);
    border-bottom: 5px solid var(--primary-colour);
}

.row {
    border-bottom: 1px solid var(--primary-colour);
    height: fit-content;
    cursor: default;
    background-color: var(--guess-table-background);

}

.row:hover:not(.highlighted) { /** don't change hover colour if highlighted **/
    background-color: rgba(1, 1, 1, 0.2);
}

.highlighted {
    background-color: white;
}

.cell {
    position: relative;
    padding: 0.5rem;
    color: var(--primary-colour);
    text-align: center;
}

.highlighted .cell {
    color: black;
}

.cell::before {
    content: '&nbsp;';
    visibility: hidden;
}

.content-span {
    position: absolute;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    left: 0;
    right: 0;
}
#modal {
    background-color: var(--header-guesses-background-colour);
    color: white;
    max-width: 80%;
}
#modal-title {
    display: inline;
}
#modal-close {
    font-size: 1rem;
    cursor: pointer;
    position: absolute;
    top: -0.5rem;
    right: 20px;
    display: inline;
}
#modal-share {
    font-weight: bold;
    border-radius: none;
    border: none;
    background-color: var(--primary-colour);
    margin-left: 10px;
}

#modal-share:focus {
    border: none;
    outline: none;
}
#modal-share-text {
    display: inline;
}

@media (min-aspect-ratio: 5/4) {
    #article {
        background-color: var(--article-background-colour);
        overflow-y: scroll;
        max-height: 95vh;
        flex: 3;
        line-height: 1.5;
        color: var(--primary-colour);
        box-sizing: border-box;
        font-size: var(--article-font-size);
        
    }

    #guesses {
        flex: 1;
        height: 95vh;
        display: flex;
        flex-direction: column;
    }
    #content {
        display: flex;
    }
    #attempts {
        min-height: 0;
        flex: 5;
        background-color: var(--header-guesses-background-colour);

    }
    #input {
        align-items: center;
        justify-content: center;
        display: flex;
        flex: 1;
        background-color: var(--header-guesses-background-colour);
    }
    #input-box {
        height: 20px;
        border: 0px;
        padding: 0px;
    }
    #submit-box {
        height: 20px;
        width: 50px;
        border: 0px;
        background-color: white;
        border-radius: 0px;
        border-left: 1px solid black;
    }

    #table {
        position: relative;        
        width: 100%;
        height: 100%;
        border-collapse: collapse;
    }

    #table-container {
        overflow-y: scroll;
        height: fit-content;
        max-height: 100%;
        position: relative;        
        width: 100%;
    }
}
@media (max-aspect-ratio: 5/4) {


    #article {
        background-color: var(--article-background-colour);
        overflow-y: scroll;
        height: 55%;
        line-height: 1.5;
        color: var(--primary-colour);
        box-sizing: border-box;
        font-size: var(--article-font-size);

    }

    #table-container {
        overflow-y: scroll;
        height: fit-content;
        max-height: 100%;
        position: relative;        
        width: 100%;
    }
    #table {
        position: relative;        
        width: 100%;
        height: 100%;
        border-collapse: collapse;
    }
    #content {
        height: 95%;
    }
    #guesses {
        display: flex;
        flex-direction: column;
        height: 45%;
    }

    #attempts {
        min-height: 0;
        flex: 5;
        background-color: var(--header-guesses-background-colour);
    }
    #input {
        align-items: center;
        justify-content: center;
        display: flex;
        flex: 1;
        background-color: var(--header-guesses-background-colour);
    }
    #input-box {
        height: 20px;
        border: 0px;
        padding: 0px;
    }
    #submit-box {
        height: 20px;
        width: 50px;
        border: 0px;
        background-color: white;
        border-radius: 0px;
        border-left: 1px solid black;
    }
}