/*////////////////////////////////////////////////////////////////////
// Copyright 2026 (c) Yanko Lemoine
//
// This program and the accompanying materials are made
// available under the terms of the Eclipse Public License 2.0
// which is available at https://www.eclipse.org/legal/epl-2.0/
//
// SPDX-License-Identifier: EPL-2.0
////////////////////////////////////////////////////////////////////*/


/* IMAGES */
#competition_images .images {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    
    justify-content: space-between;
}

#competition_images {
    img {
        border-radius: 10%;
        width: 49%;
        margin-bottom: 15px;
    }
    img:last-child:nth-child(2n+1) {
        width: 100%;
    }
}

/* TABLE */
#teams_table {
    table {
        height: 30vh;
        width: 100%;
    }

    th, td {
        padding: 15px 10px;
    }
}


#teams_table table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    background: none;
}

#teams_table thead {
    display: none;
}

#teams_table tbody {
    background-color: transparent;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
}

#teams_table tr {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    background: rgba(255, 255, 255, 0.4);
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 15px;

    padding: 15px;
}

#teams_table tr td {
    border: none;
    padding: 0;
    margin: 0;
}

#teams_table tr td.name,
#teams_table tr td.competition,
#teams_table tr td.division,
#teams_table tr td.group {
    width: 100%;
    text-align: left;
}

#teams_table td.name {
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 5px;
}

#teams_table td.competition,
#teams_table td.division,
#teams_table td.group {
    font-size: 12px;
    margin-bottom: 0px;
    opacity: 0.9;
}

#teams_table td.competition::before,
#teams_table td.division::before,
#teams_table td.group::before {
    content: attr(data-label) " : ";
    font-weight: 800;
    color: black;
}

#teams_table td.rank[data="1"] {
    color: #FFD700;
}

#teams_table td.rank[data="2"] {
    color: #8a9a9f;
}

#teams_table td.rank[data="3"] {
    color: #925327;
}

#teams_table td.rank {
    font-size: 35px;
    font-weight: 900;

    background: var(--navbar-color);
    color: white;

    width: 60px;
    height: 60px;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    flex-shrink: 0;
    margin-right: 15px;
}

#teams_table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto auto;
    row-gap: 2px;
    user-select: none;
}

#teams_table tr:hover {
    transform: translateY(-5%);
    border-color: #FFD700;
}

#teams_table td.name {
    grid-column: 1 / 2;
    grid-row: 1;
}

#teams_table td.competition {
    grid-column: 1 / 2;
    grid-row: 2;
}

#teams_table td.division {
    grid-column: 1 / 2;
    grid-row: 3;
}

#teams_table td.group {
    grid-column: 1 / 2;
    grid-row: 4;
}

#teams_table td.rank {
    grid-column: 2 / 3;
    grid-row: 1 / 5;
    align-self: center;
}

@media screen and (max-width: 680px) {
    #competition_images img {
        width: 100%;
    }   
}

@media screen and (min-width: 1350px) {
    #teams_table tbody {
        grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    }

    #teams_table td.name {
        font-size: 30px;
        margin-bottom: 5px;
    }

    #teams_table td.competition,
    #teams_table td.division,
    #teams_table td.group {
        font-size: 14px;
        margin-bottom: 0px;
    }

    #teams_table td.rank {
        font-size: 45px;

        width: 80px;
        height: 80px;
        border-radius: 50%;

        flex-shrink: 0;
        margin-right: 15px;
    }

    #teams_table tr {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto auto;
        row-gap: 2px;
    }
}