﻿/* CSS for the Leaderboard Page */
.body {
    overflow-x: scroll;
}
.top-image img {
    min-height: 300px;
    object-fit: cover;
    width: 100%;
    display: inline-block;
    margin-top: 70px;
}

.container h4 {
    font-family: Nasalization;
    font-size: 38px;
    padding-block: 10px;
}

.table-container {
    max-height: 80vh;
    overflow: auto;
    position: relative;
}

#teamLeaderboard thead th {
    position: sticky;
    top: 0;
    background: #222;
    z-index: 3;
}

#teamLeaderboard th:nth-child(1),
#teamLeaderboard td:nth-child(1) {
    position: sticky;
    z-index: 2;
}

#teamLeaderboard th:nth-child(2),
#teamLeaderboard td:nth-child(2) {
    position: sticky;
    z-index: 2;
}

#teamLeaderboard th:nth-child(3),
#teamLeaderboard td:nth-child(3) {
    position: sticky;
    z-index: 2;
}

.leaderboard {
    background-color: #d6dadb;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: auto;
    margin-block: 20px;
}

    .leaderboard h1 {
        width: 100%;
        background-color: #262730;
        font-family: Nasalization;
        font-size: max(2.5vw, 20px);
        color: silver;
        margin: 0;
        padding: 15px;
        text-align: center;
        border-bottom: 3px;
        border-bottom-color: #ff0000;
        border-bottom-style: outset;
    }

/* Table Design */
.table {
    width: 100%;
    border:none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #d6dadb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

    .table th, .table td {
        border: none;
        padding: 12px 15px;
        text-align: left;
    }

    .table th {
        background-color: #262730;
        color: #f9f9f9;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 14px;
    }

    .table tr {
        transition: background-color 0.3s ease;
        border:none;
    }

        .table tr:nth-child(even) {
            background-color: #d6dadb;
        }

        .table tr:nth-child(odd) {
            background-color: #c5cbcc;
        }

        .table tr:hover {
            background-color: #eaeaea;
        }

    .table td {
        border-bottom: 1px solid #e0e0e0;
        font-size: 14px;
        color: #333333;
    }

        .table td:nth-child(1) {
            background-color: #B5C4C4;
            color: #ffffff;
            font-weight: bold;
            text-align: center;
        }

        .table td:nth-child(6),
        .table td:nth-child(7),
        .table td:nth-child(8),
        .table td:nth-child(9),
        .table td:nth-child(10),
        .table td:nth-child(11) {
            text-align: center;
        }
        .table th:nth-child(6),
        .table th:nth-child(7),
        .table th:nth-child(8),
        .table th:nth-child(9),
        .table th:nth-child(10),
        .table th:nth-child(11),
        .table th:nth-child(1) {
            text-align: center;
        }

/* Modern Leaderboard Colors */
.gold td:nth-child(1) {
    background-color: #ffd700; /* Gold color */
}

.silver td:nth-child(1) {
    background-color: #c0c0c0; /* Silver color */
}

.bronze td:nth-child(1) {
    background-color: #cd7f32; /* Bronze color */
}

/* Pagination section */
.pagination {
    margin-top: 5px;
    text-align: center;
    margin-bottom: 5px;
}

    .pagination a, .pagination span {
        display: inline-block;
        padding: 8px 16px;
        margin: 0 4px;
        color: #007bff;
        border: 1px solid #007bff;
        border-radius: 4px;
        text-decoration: none;
    }

        .pagination a:hover {
            background-color: #007bff;
            color: white;
        }

    .pagination span {
        background-color: #007bff;
        color: white;
    }
    .pagination #pagination-left-arrow,
    .pagination #pagination-right-arrow {
        display: none;
    }

@media (max-width: 768px) {
    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }
    .pagination #pagination-counter,
    .pagination #pagination-previous,
    .pagination #pagination-next {
        display: none;
    }
    .pagination #pagination-left-arrow, 
    .pagination #pagination-right-arrow {
        display: block;
    }
    #sortForm {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align:center;
    }

    /* Hide non-sorted columns */
    .table th, .table td {
        display: none;
    }

        .table th.sorted-by,
        .table td.sorted-by {
            display: table-cell;
        }

        .table td:nth-child(1), .table td:nth-child(2) {
            display: table-cell;
        }
}

.table td.sorted-by {
    font-weight: 700;
}

/* Sort form section */
#sortForm {
    margin-top: 10px;
}

    #sortForm select {
        padding: 8px;
        font-size: 14px;
        border: 1px solid #ccc;
        border-radius: 4px;
        width: 100%;
        max-width: 200px;
        min-width: 170px;
        min-height: 40px;
    }

    #sortForm input[type="submit"] {
        display: none; /* Hide the submit button */
    }

.toggle-container {
    margin-bottom: 20px;
}

.toggle-button {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
}

    .toggle-button:hover {
        background-color: #0056b3;
    }

.active {
    display: table !important;
}
.hidden {
    display: none;
}

.pagination a.selected {
    color: white;
    background-color: #007bff
}

@media (max-width: 1200px) {
    .container {
        min-width: 100%;
    }
}

