/*
* Meta box products
*/
.field {
    float: none;
    margin: 0;
}

#products {
    margin-bottom: 10px;

    .content-products {
        width: 100%;

        .products-container {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            margin: 20px 0;
            border: 1px solid grey;
            border-radius: 10px;
            box-shadow: 1px 1px 2px grey;
            padding: 20px;

            &:hover {
                box-shadow: 1px 1px 4px grey;
            }

            .handle-container {
                display: flex;
                align-items: center;
                cursor: move;
            }

            .type {
                margin: 0 10px;
                display: flex;
                flex-basis: 15%;
                align-items: center;
            }

            .field {
                display: flex;
                margin: 0 10px;
                flex-basis: 85%;
                flex-wrap: wrap;

                .margin {
                    margin: 5px 5px;
                    width: 100%;
                }

                input.multilingual {
                    margin: 5px 0;
                }

                .post-meta-defaults {
                    margin: 0;
                    flex-wrap: nowrap;
                    justify-content: space-between;
                    flex-basis: 100%;
                }
            }

            .actions-container {
                display: flex;
                align-items: center;
                margin: 0 10px;
            }
        }
    }

    .actions-container.add {
        display: flex;
        justify-content: center;
        border-bottom: 1px dotted black;
        border-radius: 0 0 10px 10px;
        padding-bottom: 10px;
    }
}

#products-order-by {
    margin-bottom: 10px;

    .content-products-order-by {
        width: 100%;

        .products-order-by-container {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            margin: 20px 0;
            border: 1px solid grey;
            border-radius: 10px;
            box-shadow: 1px 1px 2px grey;
            padding: 20px;

            &:hover {
                box-shadow: 1px 1px 4px grey;
            }

            .handle-container {
                display: flex;
                align-items: center;
                cursor: move;
            }

            .margin {
                margin: 5px 5px;
                flex-basis: 33%;
            }

            .actions-container {
                display: flex;
                align-items: center;
                margin: 0 10px;
            }
        }
    }

    .actions-container.add {
        display: flex;
        justify-content: center;
        border-bottom: 1px dotted black;
        border-radius: 0 0 10px 10px;
        padding-bottom: 10px;
    }
}

#meta-box-products {
    .default-image {
        .image-preview-wrapper {
            position: relative;
            width: 150px;
            height: 150px;

            img {
                max-width: 150px;
                max-height: 150px;
                width: 150px;
                height: 150px;
                border: 1px grey solid;
                box-sizing: border-box;
            }

            div.close {
                position: absolute;
                right: 0;
                top: 0;
                width: 20px;
                height: 20px;
                display: flex;
                justify-content: center;
                align-items: center;

                color: black;
                font-size: 20px;
                cursor: pointer;

                z-index: 1;

                &:hover {
                    color: red;
                }
            }

            .choose-image {
                display: flex;
                position: absolute;
                width: 100px;
                height: 100px;
                justify-content: center;
                align-items: center;
                top: 25px;
                left: 25px;
                z-index: 3;

                span {
                    display: none;
                    padding: 5px;
                    border: 2px gray solid;
                    background-color: rgba(255,255,255,.75);
                    text-align: center;
                }

                &:hover {
                    span {
                        display: flex;
                        cursor: pointer;
                    }
                }
            }

            .no-image {
                display: none;

                position: absolute;
                width: 150px;
                height: 150px;
                background: url(../../img/default-image.png) no-repeat;
                justify-content: center;

                border: 1px grey solid;
                box-sizing: border-box;
                z-index: 2;

                span {
                    margin-top: 20px;
                }

                &.visible {
                    display: flex;
                }
            }
        }

        .image-action {
            select {
                width: 150px;
                margin-top: 10px;
            }
        }
    }
}
