/* 
@font-face {
    font-family: ClanOT;
    font-weight: 400;
    src: url("fonts/FontFont - ClanOT-CondNews.otf") format("opentype");
}

@font-face {
    font-family: ClanOT;
    font-weight: 500;
    src: url("fonts/FontFont - ClanOT-CondMedium.otf") format("opentype");
}

@font-face {
    font-family: ClanOT;
    font-weight: 700;
    src: url("fonts/FontFont - ClanOT-CondBold.otf") format("opentype");
} */

body {
    position: relative;
}

html {
    overflow-y: scroll;
    font-family: ClanOT;
    scroll-behavior: smooth;
}

a.top {
    color: #009FE3;
    text-decoration: none;
    font-weight: 500;
    font-style: italic;    
}

div.wrapper {
    margin: 20px auto !important;
    display: grid;
    grid-template-columns: 100px 3fr;
    padding: 0 64px;
    max-width: 100%;
    width: 1600px;
    margin: auto;
    box-sizing: border-box;

}

td.points,
th.points {
    text-align: center;
}


div.results-wrapper {
    margin-bottom: 100px;
}

select {
    padding: 10px;
}

div.checkpoints-picker {
    display: grid;
    grid-template-columns: 100px 3fr;
    
}

div.wrapper div.sub-wrapper {
    display: grid;
    grid-template-columns: 1fr;

    span {
        margin-bottom: 6px;
        cursor: pointer;

    }

}

div.results-container {
    font-size: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: auto;
    height: max-content;
}

.results-container h4.nexto {
    grid-column: 1/2;
    align-self: end;
    margin: 10px 0 10px 0;
}
span.nexto {
    grid-column: 2/2;
    text-align: end;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 20px;
    margin-left: auto;
}




div.status-logger {
    display: grid;
    grid-template-columns: 1fr;
}

td svg {
    width: 12px;
    height: 12px;
    margin-right: 8px;
    cursor: pointer;
    fill: grey;
}


[data-starred="true"] td svg {
    fill: black;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    text-transform: uppercase;
    border-spacing: 0 1px; /* 1px gap between rows, 0px between columns */
    
    grid-column: 1 / -1;
    font-size: 18px;

    max-width: 100%;
    table-layout: fixed;
}

table  a {
    color: #0c9ddb;
    text-decoration: none;
    font-weight: 500;
}


th, td {
    padding: 8px 4px;    
    text-align: left;
    font-size: 18px;
    line-height: 1;
    white-space: nowrap; /* Prevents text from wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Shows '...' when text overflows */
    height: 50px;
}


th {
    background: #0B203A;
    color: white;
}

tr:hover {
    background: #f1f1f1;
}


.load-container .hide {
    display: none;
}

.load-container .active {
    display: grid;
    gap: 40px 80px;
}

.load-container {
    padding: 64px;
    padding-top: 16px;
    max-width: 100%;
    width: 1600px;
    margin: auto;
    box-sizing: border-box;
    margin-bottom: 100px;
}

.race-btn-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.checkpoint-item {
    padding: 15px;
    color: white;
    background-color: black;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    font-size: 20px;
    cursor: pointer;
}

button.fav-btn:hover,
.checkpoint-item:hover {
    background-color: #0B203A;
    color: white;
}


div.Sprint{
    background-color: #38D430;
    color: white;
}

div.Climb{
    background-color: #d70048;
    color: white;
}

td.SP{background-color: #38D430; color: white;}
td.CL{background-color: #d70048; color: white;}
div.Timing{background-color: #0c9ddb;}


td.CH {background-color: #FFE800;}

th.Climb {background-color: #d70048; color: white;}
th.Sprint {background-color: #38D430; color: white;}
th.Champion {background-color: #FFE800; color: black;}


td.Y {background-color: #FF40B4;}

.checkpoint-item h4 {
    font-size: 20px;
    line-height: 1;
    margin: 0;
    font-weight: normal;
}


.checkpoint-item h4 svg {
    margin-left: 10px;
    font-size: 20px;
}


.checkpoint-item h4 i {
    margin-left: 10px;
    font-size: 20px;
}

.fa-fade {
    animation-name: fa-fade;
    animation-delay: var(--fa-animation-delay, 0s);
    animation-direction: var(--fa-animation-direction, normal);
    animation-duration: var(--fa-animation-duration, 1s);
    animation-iteration-count: var(--fa-animation-iteration-count, infinite);
    animation-timing-function: var(--fa-animation-timing, cubic-bezier(.4,0,.6,1));
}

.unselectable {
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none; /* For Safari */
    -moz-user-select: none; /* For Firefox */
    -ms-user-select: none; /* For IE/Edge */
}

.race-container {
    display: grid;
    grid-template-columns: 1fr 4fr;
}

.race-container h2 {
    grid-column: 1/-1;
}

.race-container h3 {
    margin: 0;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-size: 30px;
}



/* Basic button styling */
.btn {
    padding: 10px 20px;                /* Add space inside the button */
    font-size: 16px;                   /* Font size for the button text */
    font-weight: bold;                 /* Make text bold */
    text-align: center;                /* Center text */
    text-decoration: none;             /* Remove underline */
    border: none;                     /* Remove border */
    border-radius: 5px;               /* Rounded corners */
    background-color: #3498db;        /* Button background color */
    color: #fff;                      /* Text color */
    cursor: pointer;                 /* Pointer cursor on hover */
    /* transition: all 0.3s ease;        Smooth transition for hover effects */
    font-family: ClanOT;
    font-size: 20px;
    font-weight: 400;
}



table.startlist thead tr th:nth-child(1),
table.startlist tbody tr td:nth-child(1),
table.result tbody tr td:nth-child(1),
table.result tbody tr td:nth-child(2),
table.result thead tr th:nth-child(1),
table.result thead tr th:nth-child(2) {
    text-align: center;
}

.checkpoints-container {
    display: flex;
    gap: 1px;
    flex-flow: column;
}

table tr:nth-child(even) {
    background-color: #e6f5fb61;
}

table tr:nth-child(odd) {
    background-color: #e6f5fb;
}

div[data-checkpoint-id="99"],
div[data-checkpoint-id="1"]{
    background-color: #e6f5fb;
    color: black;   
}

table.ptt-table thead tr th:nth-child(2),
table.ptt-table tbody tr td:nth-child(2){
    text-align: left;
}

.links-container,
.details-container {
    text-transform: uppercase;
    color: black;
}

.details-container h1 {
    font-size: 48px;
    margin-top: 0;
    margin-bottom: 30px;
}

.details-container span {
    margin-right: 20px;
    font-size: 24px;
    text-transform: uppercase;
}

span.details-label {
    font-weight: 700;
}

span.details-label span {
    font-weight: 400;
}

span.gender-label {
    font-size: 48px;
    color: #0c9ddb;
}

.links-container {
    display: flex;
    flex-flow: column;
    gap: 1px;

}

.links-container a {
    padding: 15px;
    background: #0c9ddb;
    color: white;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    font-size: 20px;
}

.links-container a.scplay {
    background-color: #d70048;
    border-radius: 0;
    margin: unset;
    width: unset;
    display: block;
}

.links-container a:hover {
    background-color: #0B203A;
}

.race-btn-wrapper button {
    background-color: #0B203A;
    color: white;
    border-radius: 0;
    text-transform: uppercase;
}

.race-btn-wrapper button:hover {
    background-color: #0c9ddb;
}

button.fav-btn {
    background-color: #e6f5fb;
    color: black;
    border-radius: 0;
    padding: 15px;
    text-align: center;
    text-transform: uppercase;
    font-size: 20px;
    font-weight: 400;
}


table.result th:nth-child(1),
table.result th:nth-child(2),
table.result th:nth-child(4){
    width: 60px;
}

table.result th:nth-child(3),
table.result th:nth-child(5){
    width: 30%;
}

table.special th:nth-child(3),
table.special th:nth-child(5){
    width: 30%;
}


table.startlist th:nth-child(1),
table.startlist th:nth-child(3),
table.startlist th:nth-child(5){
    width: 60px;
}
table.startlist th:nth-child(2),
table.startlist th:nth-child(4){
    width: 40%;
}



table.starred {
    margin-bottom: 30px;
}

.results-container h4 {
    text-transform: uppercase;
    grid-column: 1 / -1;
    margin: 10px 0 10px 0;
}

.results-container p,
.results-container h3 {
    grid-column: 1 / -1;
}

#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dimmed background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it is above all content */
}

.overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1); /* Light border */
    border-top: 4px solid #3498db; /* Darker color for the spinning part */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#countdownWrapper {
    background-color: #f1f1f1;
    background-color: white;
    color: #0B203A;
    padding: 12px 24px;
    font-size: 20px;
    border: 1px solid #ccc;
    width: auto;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}    

#countdownWrapper p {
    margin: 0;
}


span#searchAthlete {
    display: none;
}


.input-container {
    width: 100%;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
    width: fit-content; /* Adjust width as needed */

    input {
        border: none;
        outline: none;
        font-size: 16px;
    }

    .icon {
        margin-left: 5px; /* Space between text and icon */
    }

}


input#searchValue {
    padding: 10px;
    font-size: 16px;
    width: 100%;
    grid-column: 1/-1;
    margin-top: 10px;
}


@media (max-width: 1340px) {
    
    .load-container div.active .checkpoints-container {
        display: none;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr; 
        gap: 6px;
    }
    

    .load-container div.active .checkpoints-container .checkpoint-item { 
        padding: 16px;
        font-size: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .load-container div.active .checkpoints-container .checkpoint-item h4 {
        font-size: 20px;
    }



    table.result th:nth-child(1),
    table.result th:nth-child(2),
    table.result th:nth-child(4){
        width: 60px;
    }
    
    table.result th:nth-child(3),
    table.result th:nth-child(5){
        width: 30%;
    }
    
    table.special th:nth-child(3),
    table.special th:nth-child(5){
        width: 30%;
    }
    
    
    table.startlist th:nth-child(1),
    table.startlist th:nth-child(3),
    table.startlist th:nth-child(5){
        width: 60px;
    }
    table.startlist th:nth-child(2),
    table.startlist th:nth-child(4){
        width: 35%;
    }


    .load-container .active {
        gap: 64px 64px;
    }

    .links-container, .details-container {
        display: flex;
        flex-flow: column;
    }


    .details-container h1 {
        grid-column: 1/-1;
    }

    .details-container span {
        font-size: 30px;
        margin: 0;
        margin-bottom: 5px;
    }

    .load-container {
        padding: 32px;
        margin-bottom: 32px;
    }

    .race-btn-wrapper {
        margin-bottom: 16px;
    }

    #countdownWrapper {
        width: 100%;
    }

    span.gender-label,
    .details-container h1 {
        font-size: 48px;
    }

    .race-container {
        grid-template-columns: 1fr;
    }


    div.results-container {
        width: 100%;         /* Set the container to a specific width */
        overflow-x: auto;    /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch;  /* Smooth scrolling on touch devices */        
    }

    table {
        overflow-x: auto;
        scroll-behavior: smooth;
        /* touch-action: pan-x; */
        -webkit-overflow-scrolling: touch;  /* Smooth scrolling on touch devices */
    }

}


@media (max-width: 1140px) {


    .load-container div.active .checkpoints-container {
        display: none;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr; 
        gap: 6px;
    }
    
    .checkpoint-item h4 svg {
        font-size: 15px;
    }

    .load-container div.active .checkpoints-container .checkpoint-item { 
        padding: 12px;
        font-size: 16px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .load-container div.active .checkpoints-container .checkpoint-item h4 {
        font-size: 20px;
    }


    th, td {
        padding: 8px 4px;
        font-size: 16px;
    }

    td svg {
        margin-right: 12px;
        margin-left: 4px;
    }

    td.time,
    th.time,
    td.points,
    th.points {
        width: 90px;
        min-width: max-content; /* Ensures it’s at least as wide as the content */
        white-space: nowrap; /* Prevents text from wrapping */
    }


    table.result th:nth-child(1),
    table.result th:nth-child(2),
    table.result th:nth-child(4){
        width: 60px;
    }
    
    table.result th:nth-child(3),
    table.result th:nth-child(5){
        width: 25%;
    }
    
    table.special th:nth-child(3),
    table.special th:nth-child(5){
        width: 25%;
    }
    
    
    table.startlist th:nth-child(1),
    table.startlist th:nth-child(3){
        width: 60px;
    }
    table.startlist th:nth-child(2),
    table.startlist th:nth-child(4){
        width: 30%;
    }
    

    .load-container .active {
        gap: 64px 64px;
    }

    .links-container, .details-container {
        display: flex;
        flex-flow: column;
    }


    .details-container h1 {
        grid-column: 1/-1;
    }

    .details-container span {
        font-size: 30px;
        margin: 0;
        margin-bottom: 5px;
    }

    .load-container {
        padding: 32px;
        margin-bottom: 32px;
    }

    .race-btn-wrapper {
        margin-bottom: 16px;
    }

    #countdownWrapper {
        width: 100%;
    }

    span.gender-label,
    .details-container h1 {
        font-size: 48px;
    }

    .race-container {
        grid-template-columns: 1fr;
    }


    div.results-container {
        width: 100%;         /* Set the container to a specific width */
        overflow-x: auto;    /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch;  /* Smooth scrolling on touch devices */        
    }

    table {
        overflow-x: auto;
        scroll-behavior: smooth;
        /* touch-action: pan-x; */
        -webkit-overflow-scrolling: touch;  /* Smooth scrolling on touch devices */
        table-layout: fixed;
        width: 100%;
    }

}



@media (max-width: 768px) {

    th, td {
        /* padding: 15px; */
        height: 40px;
    }

    .load-container div.active .checkpoints-container {
        display: none;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    
    .checkpoint-item h4 svg {
        font-size: 15px;
    }

    .load-container div.active .checkpoints-container .checkpoint-item { 
        padding: 8px;
        font-size: 16px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .load-container div.active .checkpoints-container .checkpoint-item h4 {
        font-size: 16px;
    }


    th, td {
        padding: 8px 4px;
        font-size: 16px;
    }

    td svg {
        margin-right: 12px;
        margin-left: 4px;
    }

    td.time,
    th.time,
    td.points,
    th.points {
        width: 90px;
        min-width: max-content; /* Ensures it’s at least as wide as the content */
        white-space: nowrap; /* Prevents text from wrapping */
    }


    table.result th:nth-child(1),
    table.result th:nth-child(2),
    table.result th:nth-child(4){
        width: 60px;
    }
    
    table.result th:nth-child(3),
    table.result th:nth-child(5){
        width: 200px;
    }
    
    table.special th:nth-child(3),
    table.special th:nth-child(5){
        width: 200px;
    }
    
    
    table.startlist th:nth-child(1),
    table.startlist th:nth-child(3){
        width: 60px;
    }
    table.startlist th:nth-child(2),
    table.startlist th:nth-child(4){
        width: 200px;
    }
    
    table.ptt-table th:nth-child(2){
        width: 200px;
    }

    table.ptt-table th:nth-child(3){
        width: 60px;
    }

    .load-container .active {
        gap: 32px 64px;
    }

    .links-container, .details-container {
        display: flex;
        flex-flow: column;
    }

    .details-container span {
        font-size: 18px;
        margin: 0;
        margin-bottom: 4px;
    }

    .load-container {
        padding: 16px;
        margin-bottom: 32px;
    }

    .race-btn-wrapper {
        margin-bottom: 16px;
    }

    #countdownWrapper {
        width: 100%;
        font-size: 16px;
    }

    span.gender-label,
    .details-container h1 {
        font-size: 32px;
    }

    .race-container {
        grid-template-columns: 1fr;
    }


    div.results-container {
        width: 100%;         /* Set the container to a specific width */
        overflow-x: auto;    /* Enable horizontal scrolling */
        -webkit-overflow-scrolling: touch;  /* Smooth scrolling on touch devices */        
    }


    table {
        overflow-x: auto;
        scroll-behavior: smooth;
        /* touch-action: pan-x; */
        -webkit-overflow-scrolling: touch;  /* Smooth scrolling on touch devices */
        table-layout: fixed;
        width: 100%;
    }
}


.load-container div.active .checkpoints-container h3 {
    grid-column: 1/-1;
}

.table-view-link-wrapper {
    margin-bottom: 60px;
    display: grid;
    gap: 0.75rem;
}

.table-view-link-wrapper a {
    color:#0B203A;
    text-underline-offset: 5px;
}



table.live-center-table {
    width: auto;
    table-layout: auto;
    border-collapse: collapse; /* optional, for cleaner borders */
    margin-bottom: 60px;
    text-transform: unset;
}

table.live-center-table th, 
table.live-center-table td {
    white-space: nowrap; /* prevents wrapping so width matches content */
    padding: 4px 8px;    /* optional, just for spacing */
    text-align: center;
}

table.live-center-table tr th {
    text-transform: uppercase;
}

table#sprintFullTable th:nth-child(3),
table#sprintFullTable th:nth-child(5),
table#sprintFullTable td:nth-child(3),
table#sprintFullTable td:nth-child(5),

table.itt-type-table th:nth-child(3),
table.itt-type-table th:nth-child(5), 
table.itt-type-table td:nth-child(3),
table.itt-type-table td:nth-child(5),
table.mass-type-table th:nth-child(3),
table.mass-type-table th:nth-child(5), 
table.mass-type-table td:nth-child(3),
table.mass-type-table td:nth-child(5), 

table.ptt-type-table th:nth-child(2), 
table.ptt-type-table td:nth-child(2), 



table#teamTable th:nth-child(2), 
table#teamTable td:nth-child(2), 
table.live-center-table th:nth-child(3),
table.live-center-table th:nth-child(5), 
table.live-center-table td:nth-child(3),
table.live-center-table td:nth-child(5),
table.startlist-table th:nth-child(2),
table.startlist-table th:nth-child(4),
table.startlist-table td:nth-child(2),
table.startlist-table td:nth-child(4),



table.sprint-type-table th:nth-child(3),
table.sprint-type-table th:nth-child(5), 
table.sprint-type-table td:nth-child(3),
table.sprint-type-table td:nth-child(5) {
    text-align: left;
}

span.qualify-symbol {
    font-size: 20px;
    color: coral;
    padding-left: 10px;
    position: absolute;
}

td.time-td {
    position: relative;
}

.champion-th
/* td.champion_points */
{
    background-color: #FFE800;   
    color: black;
}

.sprint-th
/* td.sprint_points  */
{
    background-color: #38D430;
    color: white;
}

/* td.team_points {
    background-color: black;
    color: white;
} */

td.totaltime {
    font-weight: bold;
}

.climb-th
/* td.climb_points  */
{
    background-color: #d70048;
    color: white;
}

div#liveUpdates {
    background: #0B203A;
    color: white;
    padding: 20px;
    width: 100%;
    max-width: 250px;    
    position: fixed;
    bottom: 0;
    left: 0;
    text-align: center;
}

#toggleLive {
    cursor: pointer;
    background-color: white;
    border: 0;
    padding: 10px;
    line-height: 1;
    margin-right: 10px;
}


@media (max-width: 520px) {

    table.live-center-table {

        
        
        
        /* border-collapse: collapse;
        margin-bottom: 60px;
        text-transform: unset; */
        overflow-x: auto;     /* allow horizontal scrolling if needed */
        display: block;       /* enable scrolling */
        max-width: 100%;      /* prevent overflow */
    }

}