.gridjs-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 auto; /* keeps it centered */
}

.gridjs-th {
    padding: 10px 5px !important;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.gridjs-td {
    padding: 9px 2px !important;
    border: none !important;
}

.gridjs-tr {
    border-bottom: 1px solid #e5e7eb !important;
}

.gridjs-wrapper {
    border-radius: 0px !important;
    overflow: unset !important;
    box-shadow: none !important;
    border-top: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    border-left: 1px solid #e5e7eb !important;
}

.gridjs-container {
    padding: 15px !important; /* This should be 15px when possible, but 0px here just for table scrolling stuff */
    display: block !important;
    max-width: 100% !important;
}

.gridjs-first-place {
    position: relative;
}

.gridjs-first-place::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 4px;
    height: 70%;
    background-color: #8ecc80;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    transform: translateY(-50%);
}

.gridjs-panel-heading {
    padding: 10px 15px 20px 15px !important
}

.gridjs-playoffs {
    position: relative;
}

.gridjs-playoffs::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 4px;
    height: 70%;
    background-color: #16e4ff;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    transform: translateY(-50%);
}

.gridjs-table td img {
    max-width: 50px;
}

.gridjs-container table {
    border-collapse: collapse;
    table-layout: fixed;
}

#cpl_standings_wrapper {
    box-sizing: border-box;
}

.button-styles {
    display: contents;
}

.tnf-games {
    font-size: 18px;
    border: 1px solid #e5e7eb;
}

.tnf-games-title {
    padding: 10px !important;
    background-color: #eaeaea;
    border: 1px solid #e5e7eb;
}

.tnf-games-team {
    max-width: 50px;
    min-width: 34px !important;
}

.tnf-games-info {

}

.tnf-games-score-penalty {
    font-size: 13px;
    position: relative;
}

@media (min-width: 769px) {
    .panel-button:hover {
        background: #e5e7eb;
    }

    .button-styles {
        display: flex;
        float: right;
        flex-direction: row-reverse;
    }

    .tnf-games-info {
        width: 22%;
    }
}

@media (max-width: 768px) {

    .tnf-games-score-penalty {
        font-size: 10px;
        bottom: 1px;
        position: relative;
    }
    .tnf-games-logo {
        width: 23px;
    }

    .panel-button {
        flex: 1;
        margin-left: 0px !important;
        float: none !important;
    }

    .button-styles {
        display: flex;
        width: 100%;
        margin-top: 10px;
        gap: 8px;
        justify-content: center;
        flex-direction: row-reverse;
    }

    th.gridjs-th-sort .gridjs-th-content {
        width: 100% !important;
    }

    .gridjs-th {
        padding: 10px 4px !important;
    }

    /* Hide sort arrows */
    .gridjs-sort {
        display: none !important;
    }
    .gridjs-table td, .gridjs-table th {
        font-size: 12px;
        padding: 4px;
    }
    .gridjs-table td img {
        max-width: 30px;
    }

    .gridjs-table img {
        width: 30px; /* Reduce logo size */
        height: auto;
    }

    .gridjs-table td {
        font-size: 12px; /* Reduce font size */
    }

    .gridjs-wrapper {
        overflow-x: scroll !important;
    }
}

@media (max-width: 480px) {
    .tnf-games-padding {
        padding: 10px 5px !important;
    }

    .tnf-games {
        font-size: 13px;
    }
    .tnf-games-info {
        width: 19%;
    }

    .tnf-games-logo {
        width: 30px;
    }

    .panel-button {
        flex: 1;
        margin-left: 0px !important;
        float: none !important;
    }

    .button-styles {
        display: flex;
        width: 100%;
        margin-top: 10px;
        gap: 8px;
        justify-content: center;
        flex-direction: row-reverse;
    }

    th.gridjs-th-sort .gridjs-th-content {
        width: 100% !important;
    }

    .gridjs-th {
        padding: 10px 4px !important;
    }

    /* Hide sort arrows */
    .gridjs-sort {
        display: none !important;
    }
    
    .gridjs-table td, .gridjs-table th {
        font-size: 10px;
        padding: 2px;
    }
    .gridjs-table td img {
        max-width: 20px;
    }

    .gridjs-wrapper {
        overflow-x: scroll !important;
    }
}