@import url("icons.css");

@font-face {
    font-family: "Source Code Pro", monospace;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    src: url(/public/fonts/SourceCodePro-Light.ttf) format('truetype');
}

@font-face {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
    "slnt" 0;
    src: url(/public/fonts/Inter-Regular.ttf) format('truetype');
}


body {
    padding: 96px 20% 48px 20%;
    line-height: 200%;
    font-size: 18px;
    text-align: justify;
    font-family: 'Source Code Pro', monospace;
}

header {
    margin-bottom: 48px;
}

header h1 {
    color: #1a1a1a;
    margin-top: 0px;
    font-size: 16px;
    font-weight: 500;
}

.stats {
    display: flex;
    flex-direction: row;
}

.stats .results {
    color: #757575;
    font-size: 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 48px;
    width: 100%;
    /* flex-direction: row; */
    justify-content: space-between;
}

.results li {
    text-align: right;
    list-style: none;
}

.results li:first-child {
    text-align: left;
}

.results li p {
    margin: 0px;
}

button {
    width: 100%;
    height: 40px;
    border: 1px solid #999999;
    border-radius: 4px;
    background-color: #fff;
    outline: none;
    margin-top: 48px;
    transition: transform 0.3s ease;
}

button:hover {
    border: 2px solid #1a1a1a;
    cursor: pointer;
}

button:focus {
    outline: 4px solid #1a1a1a;
    outline-offset: 2px;
}

.correct:not(:first-child) {
    border-radius: 0px;
}

.correct:first-child {
    border-radius: 4px 0px 0px 4px;
}

.correct:last-child {
    border-radius: 0px 4px 4px 0px;
}

.correct {
    background-color: #ebfcf7;
    color: #1a9371;
}

.incorrect {
    background-color: #f7f4f4;
    color: #c93644;
}

letter {
    position: relative;
}

.active {
    color: #003049;
    font-weight: 700;
    border-bottom: 1px solid #003049;
}

.input-field {
    z-index: -999;
    position: absolute;
    opacity: 0;
}

aside {
    color: #757575;
    margin-top: 48px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 200%;
}

aside a {
    color: #757575;
}

aside a:hover {
    color: #425566;
}

@media (max-width: 360px) {
    body {
        padding: 96px 10% 48px 10%;
    }

    .results-grid #data-grid > thead > tr > th:nth-child(2), th:nth-child(4), th:nth-child(5) {
        display: none;
    }

    .results-grid #data-grid > tbody > tr > td:nth-child(2), td:nth-child(4), td:nth-child(5) {
        display: none;
    }

    .results-grid #data-grid > tbody > tr > td:nth-child(1) {
        white-space: nowrap;
    }

    .stats {
        display: flex;
        flex-direction: column;
    }

    .stats .results {
        display: grid;
        justify-content: space-between;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

    .stats .results > *:nth-child(1),
    .stats .results > *:nth-child(3) {
    justify-self: start;
    text-align: left;
    }

    .stats .results > *:nth-child(2),
    .stats .results > *:nth-child(4) {
    justify-self: end;
    text-align: right;
    }
}

@media (min-width: 361px) and (max-width: 539px) {
    body {
        padding: 96px 10% 48px 10%;
        font-size: 16px;
    }

    .stats {
        display: flex;
        flex-direction: column;
    }

    .stats .results {
        display: grid;
        justify-content: space-between;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }

    .stats .results > *:nth-child(1),
    .stats .results > *:nth-child(3) {
    justify-self: start;
    text-align: left;
    }

    .stats .results > *:nth-child(2),
    .stats .results > *:nth-child(4) {
    justify-self: end;
    text-align: right;
    }

    .stats .results li {
        text-align: left;
    }

    .results-grid #data-grid > thead > tr > th:nth-child(2), th:nth-child(4) {
        display: none;
    }

    .results-grid #data-grid > tbody > tr > td:nth-child(2), td:nth-child(4) {
        display: none;
    }
}

@media (min-width: 540px) and (max-width: 768px) {
    body {
        padding: 96px 10% 48px 10%;
        font-size: 16px;
    }

    .results-grid #data-grid > thead > tr > th:nth-child(2) {
        display: none;
    }

    .results-grid #data-grid > tbody > tr > td:nth-child(2) {
        display: none;
    }

}

@media only screen and (min-width: 769px) and (max-width: 1040px) {
    body {
        padding: 96px 12% 48px 12%;
    }

    .results-grid #data-grid > thead > tr > th:nth-child(2) {
        display: none;
    }

    .results-grid #data-grid > tbody > tr > td:nth-child(2) {
        display: none;
    }
}

@media only screen and (min-width: 1041px) and (max-width: 1365px) {
    body {
        padding: 96px 20% 48px 20%;
    }
}

@media only screen and (min-width: 1366px) and (max-width: 1659px) {
    body {
        padding: 48px 25% 48px 25%;
    }
}

@media only screen and (min-width: 1660px) {
    body {
        padding: 96px 30% 48px 30%;
    }
}

.results-grid {
    margin-top: 48px;
    color: #757575;
}

h2 {
    font-family: 'Source Code Pro', monospace;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
}

.results-grid #data-grid {
    width: 100%;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
}

.results-grid #data-grid > thead > tr > th:not(:first-child) {
    text-align: right;
}

.results-grid #data-grid > thead > tr > th:first-child {
    width: 50%;
}

.results-grid #data-grid > tbody > tr > td:not(:first-child) {
    text-align: right;
}

.col-timestamp-header, .col-mistakes-header, .col-wpm-header, .col-accuracy-header, .col-direction-header {
    font-size: 14px;
}

.codeBlock {
    color: #5c5c5c;
    font-family: 'Source Code Pro', monospace;
    font-weight: 500;
    border-radius: 4px;
    margin: 4px 0px;
    padding: 4px 4px;
    background-color: #f6f6f6;
}
