﻿$item-width: 400px;
$item-bg-full-dark: rgb(33, 33, 33);
$item-bg-extra-dark: rgba(33, 33, 33,0.95);
$item-bg-dark: rgba(33, 33, 33,0.8);

$col-green: #2ecc71;
$col-green-trans: #2ecc7196;
$col-red: #e84118;

CustomizationMenu {
    position: absolute;
    height: 100%;
    width: 100%;
    pointer-events: all;
    align-items: flex-start; // Enables columns with diff heights
    transition: opacity 0.2s ease-out 0s;
    text-shadow: 0px 1px 1px rgba(0,0,0,0.3);

    &:intro {
        opacity: 0.01;
    }

    &:outro {
        opacity: 1;
    }

    .menu {
        height: 94%;
        margin: 2% 0 0 1%;
        flex-direction: column;
        pointer-events: all;

        .title {
            min-width: $item-width;
            color: white;
            font-family: Poppins;
            font-size: 40px;
            padding: 0 10px 0 12px;
            background-color: $item-bg-extra-dark;
            border-radius: 2px;
            min-height: 60px;
            max-height: 60px;
        }

        .categories {
            margin-top: 4px;
            flex-direction: column;
            overflow: scroll;
            max-height: 73%;

            .category {
                margin-bottom: 4px;
                width: $item-width;
                border-radius: 4px;
                background-color: $item-bg-dark;
                cursor: pointer;
                align-items: center;
                min-height: 50px;
                max-height: 50px;
                transition: all 0.1s ease-out 0s;

                &:hover {
                    .name {
                        color: $col-green;
                        font-weight: 500;
                    }

                    &.hasAttachment {
                        .name {
                            color: $col-green;
                            font-weight: 500;
                        }

                        .activeAttachment {
                            .attachName {
                                font-weight: 500;
                            }
                        }
                    }
                }

                &.active {
                    border-left: 4px solid $col-green;
                    min-height: 64px;
                    max-height: 64px;

                    .name {
                        color: $col-green;
                        font-weight: 500;
                    }
                    // Disable attachment preview if active
                    &.hasAttachment {
                        min-height: 64px;
                        max-height: 64px;

                        .name {
                            color: $col-green;
                            font-size: 28px;
                            margin: 0 0 0 10px;
                        }

                        .activeAttachment {
                            opacity: 0;
                        }
                    }
                }

                .name {
                    color: white;
                    font-family: Poppins;
                    font-size: 28px;
                    margin-left: 10px;
                    border-radius: 2px;
                    transition: font-size 0.05s ease;
                    pointer-events: none;
                }

                &.hasAttachment {
                    min-height: 80px;
                    max-height: 80px;
                    overflow: hidden; // too long attach name

                    .name {
                        font-size: 20px;
                        margin-bottom: auto;
                        margin-top: 4px;
                        color: rgb(200,200,200);
                    }

                    .activeAttachment {
                        opacity: 1;
                    }
                }

                .activeAttachment {
                    position: absolute;
                    width: $item-width;
                    height: 80px;
                    border-radius: 2px;
                    opacity: 0;
                    transition: all 0.1s ease-out 0s;
                    pointer-events: none;

                    .attachName {
                        color: white;
                        font-family: Poppins;
                        font-size: 32px;
                        margin: 30px 0 0 10px;
                        transition: all 0.1s ease-out 0s;
                    }

                    .iconWrapper {
                        height: 80px;
                        min-width: 80px;
                        max-width: 80px;
                        border-radius: 2px;
                        margin-left: auto;
                        //margin-right: -1px;
                        background-color: $col-green-trans;
                        justify-content: center;
                        align-items: center;
                        transition: all 0.1s ease-out 0s;

                        .icon {
                            height: 70px;
                            width: 70px;
                            background-repeat: no-repeat;
                            background-size: cover;
                            transition: all 0.1s ease-out 0s;
                        }
                    }
                }
            }
        }

        StatsDisplay {
            margin-top: auto;
            height: 20%;
            width: 100%;
            background-color: $item-bg-full-dark;
            border-radius: 2px;
            color: white;
            font-family: Poppins;
            flex-direction: column;
            padding: 10px 0 10px 0;

            .statChange {
                width: $item-width;
                height: 20%;
                border-radius: 2px;
                align-items: center;
                overflow: hidden;

                .name {
                    width: 30%;
                    font-size: 20px;
                    text-align: right;
                    align-items: center;
                    margin-left: 10px;
                }

                .valueWrapper {
                    height: 4px;
                    width: 70%;
                    margin: 0 20px 0 10px;
                    background-color: grey;

                    .value {
                        height: 100%;

                        &.actual {
                            background-color: white;
                        }

                        &.pos {
                            background-color: $col-green;
                        }

                        &.neg {
                            background-color: $col-red;
                        }
                    }
                }
            }
        }
    }

    .selectionMenu {
        height: 94%;
        margin: 2% 0 0 4px;
        flex-direction: column;
        border-radius: 2px;
        overflow: scroll;

        .attachment {
            min-width: $item-width;
            border-radius: 2px;
            background-color: rgba(50, 50, 50,0.8);
            cursor: pointer;
            align-items: center;
            min-height: 50px;
            max-height: 50px;
            transition: all 0.1s ease-out 0s;
            overflow: hidden;

            &:not(:first-child) {
                margin-top: 2px;
            }

            &:hover {
                .name {
                    color: $col-green;
                    font-weight: 500;
                }

                .iconWrapper {
                    background-color: $col-green-trans;
                }
            }

            &.active {
                min-height: 60px;
                max-height: 60px;
                border-left: 3px solid $col-green;

                .name {
                    color: $col-green;
                    font-weight: 500;
                }

                .iconWrapper {
                    background-color: $col-green-trans;
                    min-height: 62px;
                    max-height: 62px;
                    width: 62px;

                    .icon {
                        height: 50px;
                        width: 50px;
                    }
                }
            }

            .name {
                color: white;
                font-family: Poppins;
                font-size: 24px;
                transition: all 0.1s ease-out 0s;
                pointer-events: none;
                margin-left: 10px;
            }

            .iconWrapper {
                // height: 100% -> broken somehow
                min-height: 52px;
                max-height: 52px;
                width: 52px;
                border-radius: 2px;
                margin-left: auto;
                //margin-right: -1px;
                background-color: rgba(255,255,255,0.2);
                justify-content: center;
                align-items: center;
                transition: all 0.1s ease-out 0s;
                pointer-events: none;

                .icon {
                    height: 42px;
                    width: 42px;
                    background-repeat: no-repeat;
                    background-size: cover;
                    transition: all 0.1s ease-out 0s;
                }
            }
        }
    }

    .info {
        position: relative;
        max-height: 80%;
        width: $item-width;
        margin: 2% 0 0 4px;
        flex-direction: column;
        border-radius: 2px;
        background-color: rgba(60, 60, 60,0.8);
        padding: 6px 10px 10px 10px;
        font-family: Poppins;

        .description {
            color: white;
            font-size: 16px;
        }

        .positives {
            margin-top: 10px;
            padding-left: 4px;
            flex-direction: column;
            border-left: 2px solid $col-green;

            .label {
                color: $col-green;
                font-size: 18px;
                font-weight: 500;
            }
        }

        .negatives {
            margin-top: 10px;
            padding-left: 4px;
            flex-direction: column;
            border-left: 2px solid $col-red;

            .label {
                color: $col-red;
                font-size: 18px;
                font-weight: 500;
            }
        }
    }
}
