@import url("https://fonts.googleapis.com/icon?family=Material+Icons|Material+Icons+Outlined");

.piece {
    --piece-background-color: #9ad5ec;

    width: 400px;
    position: relative;
    background-color: #9ad5ec;

    &-menu {
        position: absolute;
        width: 150px;
        height: 50px;
        background-color: #f7f7f7;
        z-index: -1;
        top: -51px;
        left: 50%;
        transform: translateX(-50%);
        transition: transform 0.5s ease;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        border: solid black 1px;
        display: flex;
        padding: 15px 20px 15px 20px;
        justify-content: space-around;

        mat-icon {
            cursor: pointer;
            transform: scale(1.1);
        }

        mat-icon:hover {
            opacity: 0.75;
        }
    }

    &-menu.show {
        transform: translateX(-50%) translateY(0);
    }

    &-menu.hide {
        transform: translateX(-50%) translateY(100%);
    }

    &-attach {
        z-index: 1;

        &-left {
            &-top {
                border-right: solid black 1px;
                width: 50px;
                height: 50px;
                border-radius: 50%;
                background-color: var(--background-color);
                position: absolute;
                top: 200px;
                transform: translateY(-50%);
                left: -25px;
            }

            &-bottom {
                border-top: solid black 1px;
                border-right: solid black 1px;
                border-bottom: solid black 1px;
                width: 20px;
                height: 60px;
                background-color: var(--background-color);
                position: absolute;
                top: 600px;
                transform: translateY(-50%);
                left: 0px;
            }
        }

        &-right {
            border-top: solid black 1px;
            border-right: solid black 1px;
            width: 40px;
            height: 40px;
            background-color: var(--piece-background-color);
            transform: translateY(-50%) rotate(45deg);
            position: absolute;
            right: -20px;
            top: 200px;
        }
    }

    &-form {
        height: 100%;
        padding: 0px 10px 0px 35px;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        z-index: 2;

        label {
            font-size: 20px;
            font-weight: lighter;
            margin-top: 10px;
            margin-bottom: 5px;
        }

        input {
            height: 40px;
            border-radius: 10px;
            border: none;
            padding: 5px 10px 5px 10px;
        }

        textarea {
            border-radius: 20px;
            padding: 10px;
            border: none;
            resize: none;
            flex-grow: 1;
        }

        img {
            width: 20%;
            position: absolute;
            right: 5px;
            top: 5px;
        }

        &-title {
            margin-top: 20px;
            font-size: 25px;
            font-family: 'Glacial Indifference Bold';
        }

        &-comment {
            position: absolute;
            right: 30%;
            top: 25px;
            transform: scale(1.2);
            background-color: white;
            padding: 4px;
            border-radius: 50%;
        }

        &-intitule {
            display: flex;
            flex-direction: column;
            margin-top: 10px;
        }

        &-name {
            display: flex;
            flex-direction: column;
        }

        &-description {
            display: flex;
            flex-direction: column;

            textarea {
                height: 100px;
            }
        }

        &-objectives {
            margin-top: 10px;
            display: flex;
            flex-direction: column;

            input {
                width: 70%;
            }

            &-add {
                position: relative;
                width: 50px;
                height: 50px;
                background-color: white;
                left: 100%;
                transform: translateX(-100%);
                margin-top: 5px;
                border-radius: 10px;

                mat-icon {
                    transform: scale(1.3);
                }
            }

            &-objective {
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                margin-top: 5px;

                button {
                    position: relative;
                    width: 50px;
                    height: 50px;
                    background-color: white;
                    border-radius: 10px;
                    right: 0px;
                }
            }
        }

        &-rewards {
            display: flex;
            flex-direction: column;

            button {
                height: 50px;
                border-radius: 10px;
                background-color: white;

                mat-icon {
                    transform: scale(1.3);
                }
            }

            &-add {
                margin-top: 10px;

                button {
                    width: 100%;
                }
            }

            &-reward {
                display: flex;
                flex-direction: column;
                margin-top: 10px;

                select {
                    height: 50px;
                    border: none;
                    border-radius: 10px;
                    background-color: white;
                    width: 100%;
                }

                input[type="number"] {
                    width: 15%;
                }

                input[type="text"] {
                    width: 100%;
                }

                textarea {
                    width: 335px;
                    height: 100px;
                }

                &-type {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;
                    margin-bottom: 5px;

                    select {
                        width: 80%;
                    }
                }

                &-quest {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;

                    select {
                        width: 80%;
                    }
                }

                &-character {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;

                    select {
                        width: 80%;
                    }
                }

                &-discussion {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;

                    select {
                        width: 80%;
                    }
                }

                &-objective {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;

                    select {
                        width: 80%;
                    }
                }

                &-objects {
                    display: flex;
                    flex-direction: column;

                    &-add {
                        position: relative;
                        width: 50px;
                        height: 50px;
                        left: 100%;
                        transform: translateX(-100%);
                        margin-bottom: 5px;
                    }

                    &-object {
                        display: flex;
                        flex-direction: row;
                        margin-bottom: 5px;
                        justify-content: space-between;

                        input[type="text"] {
                            width: 50%;
                        }
                    }
                }

                &-skill, &-object {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;

                    select {
                        width: 55%;
                    }
                }

                &-other {
                    button {
                        position: relative;
                        left: 100%;
                        transform: translateX(-100%);
                        margin-top: 5px;
                    }
                }
            }
        }

        &-personnalization {
            &-appearance {
                display: flex;
                flex-direction: column;
                height: 150px;

                textarea {
                    background-image: url("../../../assets/background-images/equipment.png");
                    background-position: center;
                    background-repeat: no-repeat;
                    background-size: 30%;
                }
            }
        }

        &-ressources {
            display: flex;
            flex-direction: column;

            &-ressource {
                margin-top: 10px;
                display: flex;
                flex-direction: column;

                div {
                    display: flex;
                    flex-direction: row;
                    margin-bottom: 5px;
                    justify-content: space-between;
                }

                input {
                    width: 50%;
                }

                select {
                    background-color: white;
                    border: none;
                    border-radius: 10px;
                    width: 55%;
                    height: 50px;
                }

                &-name {
                    input {
                        background-image: url("../../../assets/background-images/object.png");
                        background-position: center;
                        background-repeat: no-repeat;
                        background-size: 20%;
                    }
                }
            }

            button {
                position: relative;
                width: 50px;
                height: 50px;
                background-color: white;
                left: 100%;
                transform: translateX(-100%);
                border-radius: 10px;

                mat-icon {
                    transform: scale(1.3);
                }
            }

            &-add {
                margin-top: 10px;
            }
        }

        &-supplementary {
            padding-bottom: 10px;
            width: 398px;
            position: relative;
            left: -34px;

            &-form {
                width: 350px;
                margin-left: 33px;
                margin-right: 10px;

                button {
                    width: 50px;
                    height: 50px;
                    background-color: white;
                    border-radius: 10px;
                    left: 100%;
                    transform: translateX(-100%);
                    margin-top: 5px;
                    
                    mat-icon {
                        transform: scale(1.3);
                    }
                }

                &-name {
                    margin-top: 10px;
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;
                }

                &-textarea {
                    display: flex;
                    flex-direction: column;

                    textarea {
                        height: 100px;
                    }
                }

                &-color {
                    display: flex;
                    flex-direction: row;
                    margin-top: 10px;

                    label {
                        margin-right: 33px;
                    }

                    input {
                        background-color: white;
                    }
                }

                &-add {
                    position: relative;
                    margin-top: 10px;
                    margin-bottom: 10px;
                    height: 50px;
                    background-color: white;
                    border-radius: 10px;
                    
                    mat-icon {
                        transform: scale(1.3);
                    }
                }
            }
        }
    }
}