﻿@import "./shared.scss";

Menu {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    height: 100%;
    width: 100%;
    pointer-events: all;
    padding: 50px;
    z-index: 200;
    // text-shadow: 2px 2px 0 black, 4px 4px 0 black;

    font-family: Segoe UI;

    &.hidden {
        display: none;
        pointer-events: none;
    }

    &:not(.main-menu) {
        background-color: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(1px);
    }
}

.menu-buttons {
    flex-direction: column;
    // gap: 20px;
    align-items: flex-start;
    justify-content: flex-end;
    width: 100%;
    // max-width: 1200px;
    // height: 90%;
    // flex-grow: 0;
    // flex-shrink: 0;
    height: auto;
    flex-wrap: wrap;
}

.menu-button {
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    font-family: "Lilian";
    font-size: 34px;
    // font-weight: bold;

    text-shadow: 2px 2px 0 black, 4px 4px 0 black;
    margin: 4px 2px;
    cursor: pointer;
    width: 800px;
    border-left: 15px solid transparent;
    // flex-direction: column;

    font-smooth: never;
    gap: 15px;
    flex-shrink: 0;

    .label {
        mask-image: url("/ui/text-greyscale2.png");
    }

    .value {
        color: yellow;
    }

    small {
        font-size: 20px;
        font-weight: normal;
    }

    &.disabled {
        color: rgba(255, 255, 255, 0.5);
        cursor: not-allowed;
    }

    &:hover, &:focus, &.focused {
        border-left-color: white;
        background-color: rgba(0, 0, 0, 0.3);
        sound-in: "sounds/menu/button-hover.sound";
    }

    &:active {
        border-left-color: black;
        text-shadow: none;
        sound-in: "sounds/menu/button-click.sound";
    }
}

.menu-slider {
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    font-family: "Lilian";
    font-size: 34px;
    // font-weight: bold;

    text-shadow: 2px 2px 0 black, 4px 4px 0 black;
    font-smooth: never;
    margin: 4px 2px;
    // cursor: pointer;

    width: 800px;
    border-left: 15px solid transparent;
    flex-direction: row;
    flex-shrink: 0;
    gap: 20px;

    .label {
        mask-image: url("/ui/text-greyscale2.png");
    }

    small {
        font-size: 20px;
        font-weight: normal;
    }

    &:hover, &:focus, &.focused {
        border-left-color: white;
        background-color: rgba(0, 0, 0, 0.3);
        sound-in: "sounds/menu/button-hover.sound";
    }
}

.message {
    border: none;
    color: white;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.5);
    gap: 0.2em;
    flex-wrap: wrap;
    width: 100%;
    // flex-direction: column;
    small {
        font-size: 20px;
        font-weight: normal;
    }

    br {
        flex-grow: 1;
        width: 100%;
    }

    &.text-right {
        align-items: flex-end;
        justify-content: flex-end;
    }
}

$bounce-speed: 1s;
$bounce-delay: 0.1s;

h1.title {
    font-family: "Lilian";
    text-transform: uppercase;
    font-smooth: never;
    font-size: 160px;
    font-weight: bold;
    font-style: italic;
    // color: white;
    color: linear-gradient(90deg, red, orange );
    padding: 0 32px;
    // margin-bottom: 20px;

    text-shadow: 6px 6px 0 black, 4px 4px 0 black;
    /*.label { 
        mask-image: url("/ui/text-greyscale2.png");
    }*/

    span:nth-child(1) {
        animation: title $bounce-speed ease-in-out infinite;
    }

    span:nth-child(2) {
        animation: title $bounce-speed 0.1s ease-in-out infinite;
    }

    span:nth-child(3) {
        animation: title $bounce-speed 0.2s ease-in-out infinite;
    }

    span:nth-child(4) {
        animation: title $bounce-speed 0.3s ease-in-out infinite;
    }

    span:nth-child(5) {
        animation: title $bounce-speed 0.4s ease-in-out infinite;
    }

    span:nth-child(6) {
        animation: title $bounce-speed 0.5s ease-in-out infinite;
    }

    span:nth-child(7) {
        animation: title $bounce-speed 0.6s ease-in-out infinite;
    }
}

@keyframes title {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0);
    }
}

@import "./Menu.Cars.scss";

.leaderboard-container {
    flex-direction: column;
    
    padding: 20px;
    
    gap: 20px;
    
    .header {
        color: white;
        // padding: 20px;
    }
    
    .leaderboard-divider {
        flex-grow: 1;
        gap: 20px;
    }
    
    .leaderboard-controls {
        flex-shrink: 0;
        width: 400px;
        gap: 20px;
        flex-direction: column;
        position: relative;
    }
    
    .loading-blocker {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        color: white;
        font-family: "Lilian";
        font-size: 40px;
        font-smooth: never;
        text-shadow: 2px 2px 0 black;
        gap: 20px;
        .icon {
            font-size: 120px;
        }
    }
}

.leaderboard {
    flex-direction: column;
    flex-grow: 1;
    // width: 100%;

    // max-height: 80%;
    // max-height: 80%;
    max-height: 100%;
    height: auto;
    overflow: scroll;
    // flex-shrink: 0;
    width: auto;
    
    color: white;
    
    // padding: 20px;
    
    font-family: Roboto;
    font-size: 20px;

    row {
        flex-shrink: 0;
    }
    
    .leaderboard-header {
        // flex-direction: row;
        // height: 100px;
        height: auto;
        flex-grow: 1;
        column {
            flex-grow: 1;
        }
    }
    
    .entry {
        
        // font-family: "Lilian";
        // font-size: 26px;
        // font-smooth: never;
        // font-weight: 400;
        
        padding: 5px;
        color: #eee;
        
        &:nth-child(odd) {
            background-color: rgba(255, 255, 255, 0.1);
        }
        
        text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
        
        .date {
            width: 180px;
        }

        .rank {
            color: yellow;
            font-weight: bold;
            max-width: 100px;
            min-width: 50px;
            width: auto;
            flex-shrink: 0;
        }

        .name {
            align-content: flex-start;
            align-items: flex-start;
            justify-content: flex-start;
            flex-grow: 1;
            flex-shrink: 1;
        }

        .score {
            width: 150px;
            align-content: flex-end;
            align-items: flex-end;
            justify-content: flex-end;
            flex-shrink: 0;
        }
        
        .car {
            min-width: 150px;
        }
        
        .level {
            min-width: 150px;
        }

        &.me {
            color: lightgreen;
            background-color: rgba(0, 0, 0, 0.5);
            font-weight: bold;

            .rank {
                color: lightgreen;
                font-weight: bold;
            }
        }

    }

    
}

.issues {
    position: absolute;
    left: 50px;
    top: 50px;
    padding: 20px;
    flex-direction: column;
    color: white;
    font-family: Lilian;
    font-size: 30px;
    border: 5px solid white;
    border-radius: 10px;
    background-image-tint: red;
    text-shadow: 2px 2px 0 #2e0707;

    h2 {
        font-size: 40px;
        font-weight: bold;
        font-family: "Lilian";
        gap: 15px;
        align-items: center;

        .icon {
            font-size: 35px;
        }
    }

    ul {
        flex-direction: column;
        gap: 10px;

        li {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 30px;

            strong {
                font-weight: bold;
            }
        }
    }
}


/*.leaderboard {
    position: absolute;
    bottom: 150px;
    right: 50px;
    color: white;
    font-size: 22px;
    font-family: "Segoe UI Light";
    text-shadow: 1px 1px 0 black;

    flex-direction: column;

    h2 {
        font-family: Segoe UI;
        font-size: 30px;
        font-weight: bold;
        margin-bottom: 10px;
    }

    table {
        flex-direction: column;
        width: 400px;
    }

    column {
        display: flex;
        flex-direction: column;
        justify-content: center;
        // align-items: center;
        &.grow {
            flex-grow: 1;
        }

        gap: 10px;

        &.rank {
            font-weight: bold;
            // font-size: 15px;
        }
    }

    row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;

        &.me {
            color: yellow;
        }
    }
}*/

@import "./Menu.Levels.scss";

.notice {
    border: none;
    color: white;
    padding: 15px 32px;
    font-family: "Lilian";
    font-size: 30px;
    // font-weight: bold;

    margin: 4px 2px;
    width: 800px;
    // border-left: 15px solid transparent;
    // background-color: rgba(194, 89, 89, 0.3);
    // flex-direction: column;

    small {
        font-size: 20px;
        font-weight: normal;
    }
}

.controls {
    position: absolute;
    bottom: 50px;
    right: 50px;
    color: white;
    font-size: 35px;
    font-family: "Lilian";
    text-shadow: 2px 2px 0 black;
    font-smooth: never;
    gap: 50px;

    div {
        display: flex;
        gap: 10px;
        align-items: center;
        justify-content: center;

        img {
            width: 50px;
            height: 50px;
        }
    }
}

/*.car-stats {
    position: absolute;
    top: 50px;
    right: 50px;
    color: white;
    font-size: 40px;
    font-family: "Roboto";
    text-shadow: 1px 1px 0 black;

    gap: 10px;
    flex-direction: column;
    align-content: flex-end;
    justify-content: flex-end;
    align-items: flex-end;

    h2 {
        font-size: 60px;
        font-weight: bold;
        font-family: "Rubik Mono One";
        gap: 10px;
    }

    ul {
        flex-direction: column;
        gap: 10px;

        li {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 30px;

            strong {
                font-weight: bold;
            }
        }
    }

}*/

.challenges {
    position: absolute;
    top: 50px;
    left: 50px;
    color: white;
    font-size: 25px;
    gap: 10px;
    width: 1000px;
    flex-direction: column;
    /* .challenge-button {
         flex-direction: column;
 
         padding: 15px;
         background-color: rgba(0, 0, 0, 0.5);
 
         font-family: Roboto;
         // text-shadow: none;
 
         gap: 5px;
 
         h3 {
             font-size: 30px;
             font-weight: bold;
             gap: 10px;
             align-items: center;
         }
 
         &:hover {
             background-color: rgba(0, 0, 0, 0.6);
             sound-in: "sounds/menu/button-hover.sound";
             cursor: pointer;
         }
 
         &:active {
             background-color: rgba(0, 0, 0, 0.3);
             sound-in: "sounds/menu/button-click.sound";
         }
 
         &.selected {
             background-color: rgba(224, 209, 28, 0.3);
         }
 
 
     }*/
}



/*.info-box {

    color: white;
    font-size: 25px;

    width: 500px;
    flex-direction: column;

    align-content: flex-end;
    justify-content: flex-end;
    align-items: flex-end;

    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(1px);

    padding: 20px;

    gap: 5px;

    h2 {
        font-size: 30px;
        font-weight: bold;
        font-family: "Rubik Mono One";
    }

    ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;

        li {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 30px;

            strong {
                font-weight: bold;
            }
        }
    }

    table {
        flex-direction: column;
        width: 100%;
    }

    column {
        display: flex;
        flex-direction: column;
        justify-content: center;
        // align-items: center;
        &.grow {
            flex-grow: 1;
        }

        gap: 10px;

        &.rank {
            font-weight: bold;
            // font-size: 15px;
        }
    }

    row {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;

        &.me {
            color: yellow;
        }
    }

}*/

.unlock-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 20px;
    gap: 0.3em;
    background-color: rgb(219, 168, 38);
    color: white;
    text-shadow: 2px 2px 2px #d27535;
    // flex-shrink: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    align-content: center;
    transform: rotate(-4deg);

    &:hover {
        background-color: rgb(149, 110, 70);
        sound-in: "sounds/menu/button-hover.sound";
        transform: rotate(-6deg);
    }

    &:active {
        background-color: rgb(219, 168, 38);
        sound-in: "sounds/menu/button-click.sound";
        transform: rotate(-2deg);
    }

    &.error {
        background-color: rgb(205, 53, 53);
        color: #f6e6e6;
    }

    .icon {
        font-size: 25px;
    }

    span {
        font-size: 20px;
        font-weight: bold;
    }
}

.sbux-button {
    position: absolute;
    bottom: 10px;
    left: 10px;
    height: 32px;
    width: 32px;
    opacity: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;

    img {
        width: 100%;
        height: 100%;
        background-size: contain;
    }

    transition: transform 0.2s;

    &:hover {
        transform: scale(1.1);
    }
}

.social {
    position: absolute;
    bottom: 120px;
    right: 50px;
    color: white;
    font-size: 30px;
    font-family: "Lilian";
    text-shadow: 1px 1px 0 black;

    ul {
        flex-direction: column;
        gap: 5px;
    }

    ul li {
        gap: 10px;
    }
}

credits {
    h3 {
        font-size: 30px;
        font-weight: bold;
        font-family: "Lilian";
    }
}

.lobbies {

    position: absolute;
    top: 50px;
    left: 50px;
    color: white;

    flex-direction: column;

    .lobby-list {
        flex-direction: column;
        max-height: 500px;
        overflow: scroll;
        gap: 10px;
    }

    .lobby-item {
        
        flex-direction: column;
       
        gap: 0;

        flex-shrink: 0;

        align-content: flex-start;
        align-items: flex-start;

        .name {
            font-size: 22px;
            font-weight: bold;
            color: yellow;
        }

        .players {
            font-size: 18px;
            color: #eee;
        }

        .level {
            font-size: 16px;
            color: #ccc;
        }
    }

}

table {
    flex-direction: column;
    width: 100%;

    flex-shrink: 0;
    
    tr, th {
        display: flex;
        flex-direction: row;
        // justify-content: space-between;
        // align-items: center;
        gap: 10px;
    
        flex-grow: 1;
        flex-shrink: 0;
        
        td {
            // flex-grow: 1;
            
        }
    }
    
    th {
        font-weight: bold;
    }
    
}
