/* CSS for the games table */

@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap");

/*-------------------------------------------------------------------------------------------------*/
/* Games table container */
/*-------------------------------------------------------------------------------------------------*/
.games-table-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color:
        var(--article-accent-border-strong, rgb(184, 1, 200))
        var(--article-accent-bg, rgba(204, 0, 255, 0.10));
}

.games-table-container::-webkit-scrollbar {
    height: 8px;
}

.games-table-container::-webkit-scrollbar-track {
    border-radius: 999px;

    background:
        var(--article-accent-bg, rgba(204, 0, 255, 0.10));
}

.games-table-container::-webkit-scrollbar-thumb {
    border-radius: 999px;

    background:
        var(--article-accent-border-strong, rgb(184, 1, 200));
}

.games-table-container::-webkit-scrollbar-thumb:hover {
    background:
        var(--card-hover-border-color, rgb(220, 0, 230));
}

/*-------------------------------------------------------------------------------------------------*/
/* Games table */
/*-------------------------------------------------------------------------------------------------*/
.games-table {
    width: 100%;
    min-width: 1050px;
    margin: 0 auto;
    padding: 0;
    border: 1px solid rgb(51, 0, 56);
}

/*-------------------------------------------------------------------------------------------------*/
/* Table header */
/*-------------------------------------------------------------------------------------------------*/
.games-table thead tr {
    height: 50px;
    border-top: 5px solid red;
    border-bottom: 5px solid red;
    text-align: center;
}

.games-table th {
    height: inherit;
    padding: 0;
    font-weight: bold;
}

.games-table th:not(:first-of-type) {
    border-left: 1px solid rgb(184, 1, 200);
}

.games-table th button {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    min-width: max-content;
    margin: 0;
    padding: 0.5rem;
    border: none;
    color: white;
    background: rgb(70, 1, 77);
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.games-table th button::after {
    position: absolute;
    right: 0.5rem;
}

.games-table th button[data-dir="asc"]::after {
    content:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpolygon points='4,0 8,8 0,8' fill='%23818688'/%3E%3C/svg%3E");
}

.games-table th button[data-dir="desc"]::after {
    content:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpolygon points='0,0 8,0 4,8' fill='%23818688'/%3E%3C/svg%3E");
}

/*-------------------------------------------------------------------------------------------------*/
/* Table body */
/*-------------------------------------------------------------------------------------------------*/
.games-table tbody tr {
    border-bottom: 1px solid rgb(51, 0, 56);
}

.games-table td {
    padding: 0.5rem;
    border: 1px solid rgb(51, 0, 56);
    color: rgb(245, 0, 143);
    text-align: center;
}

/*-------------------------------------------------------------------------------------------------*/
/* Small screens */
/*-------------------------------------------------------------------------------------------------*/

@media screen and (max-width: 600px) {

    .games-table-container {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color:
            var(--article-accent-border-strong, rgb(184, 1, 200))
            var(--article-accent-bg, rgba(204, 0, 255, 0.10));
    }

    .games-table-container::-webkit-scrollbar {
        display: block;
        height: 6px;
    }

    .games-table {
        width: 100%;
        min-width: 1050px;
        table-layout: auto;
    }

    .games-table th button {
        min-width: max-content;
        padding: 0.4rem 0.35rem;
        font-size: 0.72rem;
        line-height: 1.2;
        white-space: normal;
    }

    .games-table td {
        padding: 0.4rem 0.35rem;
        font-size: 0.72rem;
        line-height: 1.3;
    }
}