﻿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.5);
        backdrop-filter: blur(1px);
    }
}

.menu-button {
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;

    font-family: "Kode Mono";
    font-size: 30px;
    // 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;

    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: "Kode Mono";
    font-size: 30px;
    // 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: row;
    
    gap: 20px;

    small {
        font-size: 20px;
        font-weight: normal;
    }
}

@import "./shared.scss";

.message {
    border: none;
    color: white;
    padding: 10px 20px;

    background-color: rgba(0, 0, 0, 0.5);

    gap: 0.2em;

    flex-wrap: wrap;

    // 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;
    }
}

h1 {
    font-family: "Rubik Mono One";
    font-size: 140px;
    font-weight: bold;
    font-style: italic;
    color: white;
    padding: 0 32px;
    // margin-bottom: 20px;

    text-shadow: 2px 2px 0 black, 4px 4px 0 black;
}

.cars {
    display: flex;
    flex-direction: row;
    // justify-content: center;
    align-items: center;
    position: absolute;
    left: 50px;
    top: 50px;
    max-width: 1200px;
    flex-wrap: wrap;
    gap: 20px;
}

.car-button {
    border: none;
    background-color: transparent;
    width: 250px;
    height: 250px;
    flex-shrink: 0;

    &.disabled {
        // filter: grayscale(100%);
        cursor: not-allowed;

        img {
            opacity: 0.5;
        }
    }

    .locked-icon {
        position: absolute;
        top: 10px;
        left: 10px;
        color: white;
        font-size: 60px;
    }

    &:not(.disabled) {
        &:hover {
            background-color: rgba(229, 235, 253, 0.32);
            sound-in: "sounds/menu/button-hover.sound";
            cursor: pointer;
        }

        &:active {
            background-color: rgba(129, 154, 217, 0.32);
            sound-in: "sounds/menu/button-click.sound";
        }
    }
}

.cars .selected {
    background-color: rgba(129, 154, 217, 0.32);
}

.colors {

    width: 800px;
    height: 200px;
    flex-wrap: wrap;

    position: absolute;
    left: 50px;
    bottom: 250px;

    align-content: flex-end;

    gap: 2px;

    .color-button {
        flex-shrink: 0;
        width: 10%;
        height: 25%;
        cursor: pointer;
        // text-shadow: none;
        color: white;
        align-content: center;
        justify-content: center;

        border: 3px solid transparent;

        &:hover {
            sound-in: "sounds/menu/button-hover.sound";
            border-color: black;
        }

        &:active {
            sound-in: "sounds/menu/button-click.sound";
        }
    }

}

/*.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;
        }
    }
}*/

Credits {
    padding: 40px;
    color: white;
    font-size: 25px;
    font-family: "Segoe UI Light";
    flex-direction: column;
    flex-wrap: wrap;
    max-height: 400px;
    gap: 20px 80px;

    div {
        flex-direction: column;

        h3 {
            font-size: 30px;
            font-weight: bold;
            font-family: "Rubik Mono One";
        }
    }
}

.levels {
    position: absolute;
    left: 50px;
    top: 50px;
    color: white;
    font-size: 30px;

    max-width: 1200px;
    flex-wrap: wrap;

    font-family: Roboto;

    .level-button {
        border: none;
        background-color: transparent;
        width: 300px;
        height: 350px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;

        img {
            width: 70%;
            height: 60%;
            background-repeat: no-repeat;
            background-size: contain;
            background-position: center;
        }

        small {
            font-size: 20px;
            font-weight: normal;
        }

        &.disabled {
            // filter: grayscale(100%);
            cursor: not-allowed;

            img {
                opacity: 0.5;
            }

            span, small {
                color: rgba(255, 255, 255, 0.8);
            }
        }

        .locked-icon {
            position: absolute;
            top: 10px;
            left: 10px;
            color: white;
            font-size: 60px;
        }

        &:not(.disabled) {

            &:hover {
                background-color: rgba(203, 211, 225, 0.32);
                sound-in: "sounds/menu/button-hover.sound";
                cursor: pointer;
            }

            &:active {
                // background-color: rgba(129, 154, 217, 0.32);
                sound-in: "sounds/menu/button-click.sound";
            }

        }

        &.selected {
            background-color: rgba(46, 66, 117, 0.32);
        }
    }
}

.notice {
    border: none;
    color: white;
    padding: 15px 32px;

    font-family: "Kode Mono";
    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: 30px;
    font-family: "Segoe UI Light";
    text-shadow: 1px 1px 0 black;

    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-boxes {
    position: absolute;
    top: 50px;
    right: 50px;
    flex-direction: column;
    gap: 20px;
}

.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(219, 168, 38);
        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;
    }
}

.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;
    }
}
