@import '../colors';


.push-bottom {
    margin-bottom: 50px;
}

.header-with-action-buttons {
    position: fixed;
    left: 0;
    top: 0;
}

.upfold {
    height: 100vw;
    width: 100vw;
    position: sticky;
    position: -webkit-sticky;
    left: 0;
    top: 70px;
    z-index: 0;
    overflow: hidden;
    margin-bottom: 50px;

    .quadrants {
        position: absolute;
        z-index: 2;
        left: 5%;
        top: 5%;
        display: flex;
        justify-content: center;
        width: 90%;
        height: 90%;
        padding: 0;
        margin: 0;
        list-style: none;
        flex-wrap: wrap;
        border-radius: 50%;
        overflow: hidden;
        transform: scale(0);
        animation: popOut 0.3s forwards;
        animation-delay: 1s;

        li {
            width: 50%;
            height: 50%;
            background-color: rgba(#ffff, 0.2);
            display: flex;
            justify-content: center;
            color: white;
            font-weight: 700;
            letter-spacing: 0.5px;
            padding: 30px;
            transition: background-color 0.3s, color 0.3s;

            &:nth-child(1n + 1) {
                justify-content: flex-end;
            }

            &:nth-child(2n) {
                justify-content: flex-start;
            }

            &:nth-child(1) {
                border-right: 1px solid white;
                align-items: flex-end;
            }

            &:nth-child(2) {
                align-items: flex-end;
            }

            &:nth-child(3) {
                border-right: 1px solid white;
                border-top: 1px solid white;
            }

            &:nth-child(4) {
                border-top: 1px solid white;
            }

            &.active {
                background-color: rgba(#ffff, 0.8);
                color: $dark-blue;
            }
        }
    }
    
    @keyframes popOut {
        from {
            transform: scale(0);
        } to {
            transform: scale(1);
        }
    }

    .bg-img {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        filter: brightness(50%);
        opacity: 0;
        z-index: 0;
        animation: fadeInSlow 3s forwards;
        animation-delay: 1s;
    }

    @keyframes fadeInSlow {
        from {
            opacity: 0;
        } to {
            opacity: 1;
        }
    }

    figure {
        position: relative;
        margin: 0;
        display: block;
        width: 100%;
        height: 100%;
        transition: filter 0.3s;
        border: 0px;
        padding: 0;
        border-radius: 7px;
        overflow: hidden;
        z-index: 1;
        
        -webkit-perspective: 1200px;
        -moz-perspective: 1200px;
        -ms-perspective: 1200px;
        perspective: 1200px;

        &.active {
            img {
                &:nth-child(1) {
                    animation: sideViewOut 0.3s forwards;
                    animation-delay: 0.5s;
                }

                &:nth-child(2) {
                    animation: topViewIn 0.3s forwards;
                    animation-delay: 0.5s;
                }
            }
        }

        img {
            height: 90%;
            object-fit: contain;
            display: block;
            width: 90%;
            margin: 0 auto;
            position: absolute;
            left: 5%;
            top: 5%;

            -webkit-transform-style: preserve-3d;
            -moz-transform-style: preserve-3d;
            -ms-transform-style: preserve-3d;
            transform-style: preserve-3d;
            transform-origin: 50px 0;                

            &:nth-child(2) {
                transform: translateY(50%)rotateX(90deg);
                opacity: 0;
            }
        }           
    }

    @keyframes sideViewOut {
        0% {
            transform: translateY(0%)rotateX(0deg);
        } 
        100% {
            transform: translateY(50%)rotateX(-90deg);
            width: 80%;
            height: 50%;
            opacity: 0;
        }
    }

    @keyframes topViewIn {
        0% {
            transform: translateY(50%)rotateX(90deg);
            opacity: 0;
        }
        100% {
            transform: translateY(0%)rotateX(0deg);
            opacity: 1;
        }
    }
}

.seating-details {
    position: relative;
    background-color: white;
    z-index: 1;
    padding: 5px 0% 15px 0%;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    overflow: hidden;
    min-height: calc(100vh - 100vw - 50px);
    
    header h3 {
        margin: 0;
        color: lighten($dark-blue, 10%);
        font-weight: 700;
        letter-spacing: 1px;
        font-size: 1.1rem;
    }

    header {
        padding: 10px;
        border-bottom: 1px solid lighten($blue-grey, 25%);
        margin: 0 10px;
    }
}

.stand-list {
    list-style: none;
    padding: 0;
    margin: 10px 0px 0px 0px;

    li {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 10px 15px;
        border-radius: 7px;
        width: 95%;
        margin: 0 auto;

        &.active {
            background-color: $dark-blue;

            p {
                color: white;
            }
        }
    }

    label {
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 7px;
        width: 30px;
        height: 30px;
        overflow: hidden;
        color: white;
        font-weight: 500;
        letter-spacing: 1px;
        background-color: $sea-blue;
        font-size: 0.8rem;
        margin-right: 15px;        
    }

    p {
        margin: 0;
        color: $blue-grey;
        line-height: 1.5;
        font-size: 1rem;
        width: calc(100% - 30px - 100px);
    }

    .count-action {
        width: 100px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: rgba($blue-grey, 0.1);
        border-radius: 30px;
        padding: 5px;
        
        button {
            width: 25px;
            height: 25px;
            border-radius: 50%;
            font-size: 16px;
            border: 1px solid $blue-grey;
            background-color: rgba($blue-grey, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: $blue-grey;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;

            &.active {
                pointer-events: all;
                opacity: 1;
            }
        }

        .count {
            color: white;
            font-weight: 700;
            font-size: 20px;
        }
    }
}

.checkout-data {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 2;
    background-color: lighten($blue-grey, 35%);
    padding: 0 10px 0 5%;
    box-shadow: 0px 0px 10px $blue-grey;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 60px;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;

    p {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-size: 20px;
        font-weight: 400;
        color: darken($blue-grey, 20%);

        span {
            font-weight: 500;
            margin-right: 10px;
        }
    }

    button {
        background-color: $green;
        color: white;
        font-size: 14px;
        border-radius: 5px;
        height: 40px;
        padding: 0 10px;
        box-shadow: 0px 0px 5px $blue-grey;
    }
}