@use "sass:map";
@use "helpers";

#con-content{
    min-height: 100vh;
}

#he-itens{
    z-index: 2000 !important;
}

#carrinho-module{
    .carrinho-loading{
        display: none !important;
    }
}

#live-top-bar{
    display: block;
    margin-left: -15px;
    margin-right: -15px;
    background-color: map.get(helpers.$palletLivecommerce, 'topBarColor');

    .bar-content{
        display: flex;
        width: 100%;
        max-width:1650px;
        min-height: 65px;
        padding: 10px 15px;
        margin: 0 auto;
        align-items: center;
        justify-content: space-between;

        .bar-logo{
            display: block;
            outline: 0px;
            width: 100%;
            max-width: 163px;

            img{
                display: block;
                width: 100%;
            }
        }

        .bar-options{
            display: flex;
            gap: 20px;
            flex-grow: 1;
            align-items: center;
            justify-content: flex-end;

            .opt{
                display: block;
                outline: 0px;

                &.opt-cart{
                    position: relative;
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    .icon{
                        display: block;
                        width: 22px;
                        height: 22px;
                        color: helpers.$textoDark;
                    }

                    .cart-total{
                        display: flex;
                        width: 20px;
                        height: 20px;
                        color: map.get(helpers.$palletLivecommerce, 'textDark');
                        font: normal 10px helpers.$fontBold;
                        border-radius: 100%;
                        background-color: map.get(helpers.$palletLivecommerce, 'light');
                        align-items: center;
                        justify-content: center;
                    }
                }

                &:last-of-type{
                    margin-right: 0px;
                }
            }
        }
    }
}

#live-commerce{
    display: flex;
    height: calc(100vh - 66px);
    margin-left: -15px;
    margin-right: -15px;
    padding: 20px 45px;
    align-items: stretch;
    justify-content: center;
    background-color: map.get(helpers.$palletLivecommerce, 'light');

    @media(max-width:1450px){
        padding: 20px 15px;
    }

    @media(max-width:1199px){
        display: block;
        padding: 0px;
    }

    #live-commerce-video{
        display: flex;
        width: calc(100% - 600px);
        height: 100%;
        flex-direction: column;

        @media(max-width:1199px){
            position: relative;
            width: 100%;
            background-color: map.get(helpers.$palletLivecommerce, 'dark');
        }

        .ctrl-bag{
            position: relative;
            z-index: 2;
            display: none;
            outline: 0px;
            width: max-content;
            height: 36px;
            margin: 10px;
            padding: 10px 15px;
            border-radius: 50px;
            background-color: map.get(helpers.$palletLivecommerce, 'highlight');
            align-items: center;
            justify-content: center;

            @media(max-width:1199px){
                display: flex;
            }

            .icon{
                display: block;
                width: 22px;
                height: 22px;
                margin-right: 10px;
                color: helpers.$textoLight;
            }

            .bag-title{
                display: block;
                margin: 0px;
                color: map.get(helpers.$palletLivecommerce, 'textLight');
                font: normal 11px helpers.$fontBold;
                line-height: 12px;
            }

            .bag-counter{
                position: absolute;
                display: flex;
                width: 18px;
                height: 18px;
                top: -2px;
                right: -5px;
                color: map.get(helpers.$palletLivecommerce, 'textDark');
                font: normal 10px helpers.$fontBold;
                line-height: 12px;
                align-items: center;
                justify-content: center;
                border-radius: 100%;
                background-color: map.get(helpers.$palletLivecommerce, 'light');
            }
        }
        
        iframe{
            display: block;
            flex-grow: 1;
            width: 100%;
            max-height: calc(100% - 225px);
            border: none;
            
            @media(max-width:1199px){
                position: relative;
                z-index: 1;
                max-height: calc(100% - 120px);
            }
        }

        .mb-ativo{
            display: none;
            width: 100%;
            align-items: stretch;
            justify-content: flex-start;
            border: solid 1px map.get(helpers.$palletLivecommerce, 'borders');
            background-color: map.get(helpers.$palletLivecommerce, 'light');

            .thumb{
                display: block;
                width: 100%;
                max-width: 79px;
                max-height: 118px;
                object-fit: cover;
            }

            .box-informacao{
                display: flex;
                width: calc(100% - 79px);
                padding: 15px;
                flex-direction: column;
                align-items: flex-start;
                justify-content: center;

                .titulo{
                    display: block;
                    margin: 0px;
                    margin-bottom: 5px;
                    color: map.get(helpers.$palletLivecommerce, 'textDark');
                    font: normal 14px helpers.$fontBold;
                    line-height: 17px;
                    letter-spacing: 0.01em;
                }

                .detalhes{
                    display: flex;
                    margin: 0px;
                    color: map.get(helpers.$palletLivecommerce, 'textMedium');
                    font: normal 14px helpers.$fontRegular;
                    line-height: 17px;
                    letter-spacing: 0.01em;
                    align-items: center;

                    .icon{
                        display: block;
                        width: 18px;
                        height: 18px;
                        margin-left: 5px;
                        color: helpers.$textoDark;
                    }
                }
            }

            @media(max-width:1199px){
                display: flex;
            }
        }
    }

    #live-commerce-produtos{
        position: relative;
        display: block;
        width: 100%;

        @media(max-width:1199px){
            position: fixed;
            z-index: 3;
            display: block;
            height: 100vh;
            top: 0px;
            left: 0px;
            padding: 0px;
            background-color: map.get(helpers.$palletLivecommerce, 'backgroundModal');
            visibility: hidden;
            pointer-events:none;
            opacity: 0;
            transition: visibility 0s 0.3s, opacity 0.3s linear;

            &.ativo{
                visibility: visible;
                pointer-events:initial;
                opacity: 1;
                transition: opacity 0.3s linear;
            }
        }

        .mb-head{
            display: none;
            width: 100%;
            max-width: 330px;
            padding: 30px 15px;
            align-items: center;
            justify-content: center;
            background-color: map.get(helpers.$palletLivecommerce, 'light');

            @media(max-width:1199px){
                display: flex;
            }

            .title{
                display: block;
                margin: 0px;
                width: calc(100% - 35px);
                color: map.get(helpers.$palletLivecommerce, 'textDark');
                font: normal 20px helpers.$fontBold;
            }

            .btn-close{
                display: flex;
                outline: 0px;
                width: 35px;
                height: 35px;
                align-items: center;
                justify-content: center;

                .icon{
                    display: block;
                    width: 25px;
                    height: 25px;
                    color: helpers.$textoDark;
                }
            }
        }

        .list-container{
            display: flex;
            width: 100%;
            padding-top: 30px;
            justify-content: space-between;
            
            @media(max-width:1199px){
                padding-top: 0px;
                height: 100%;
            }

            .ctrl-left,
            .ctrl-right{
                display: flex;
                outline: 0px;
                width: 60px;
                height: 140px;
                background-color: map.get(helpers.$palletLivecommerce, 'medium');
                align-items: center;
                justify-content: center;

                @media(max-width:1199px){
                    display: none;
                }

                .icon{
                    display: block;
                    width: 20px;
                    height: 20px;
                    color: helpers.$textoDark;
                }
            }
        }

        .box-list{
            position: relative;
            display: flex;
            overflow: auto;
            width: 100%;
            // padding-bottom: 30px;
            max-height: 225px;
            align-items: center;
            justify-content: flex-start;
            
            @media(max-width:1199px){
                display: block;
                width: 100%;
                max-width: 330px;
                max-height: initial;
                height: calc(100% - 90px);
                padding: 15px;
                background-color: map.get(helpers.$palletLivecommerce, 'textLight');
            }

            .produto{
                display: block;
                outline: 0px;
                width: 92px;
                min-width: 92px;
                margin-right: 10px;
                position: relative;

                @media(max-width:1199px){
                    display: flex;
                    width: 100%;
                    min-width: 100%;
                    margin-right: 0px;
                    margin-bottom: 15px;
                    border: solid 1px map.get(helpers.$palletLivecommerce, 'borders');
                    flex-wrap: wrap;
                    align-items: stretch;
                    justify-content: flex-start;

                    &:last-of-type{
                        margin-bottom: 0px;
                    }
                }

                img{
                    display: block;
                    width: 100%;
                    max-height: 138px;
                    object-fit: cover;
                    border: solid 1px transparent;

                    @media(max-width:1199px){
                        max-width: 79px;
                        max-height: initial;
                    }
                }

                .icon-heart{
                    position: absolute;
                    z-index: 2;
                    opacity: 0;
                    display: block;
                    width: 20px;
                    height: 20px;
                    right: 5px;
                    top: 5px;
                    color: helpers.$error;
                    @include helpers.transicao(0.4s ease-in-out);
                }

                .box-informacao{
                    display: none;
                    width:calc(100% - 79px);
                    padding: 15px;
                    flex-direction: column;
                    align-items: flex-start;
                    justify-content: center;

                    @media(max-width:1199px){
                        display: flex;
                    }

                    .titulo{
                        display: block;
                        margin: 0px;
                        margin-bottom: 5px;
                        color: map.get(helpers.$palletLivecommerce, 'textDark');
                        font: normal 14px helpers.$fontBold;
                        line-height: 17px;
                        letter-spacing: 0.01em;
                    }

                    .detalhes{
                        display: flex;
                        align-items: center;
                        margin: 0px;
                        color: map.get(helpers.$palletLivecommerce, 'textMedium');
                        font: normal 14px helpers.$fontRegular;
                        line-height: 17px;
                        letter-spacing: 0.01em;

                        .icon{
                            display: block;
                            width: 13px;
                            height: 13px;
                            margin-left: 5px;
                            color: helpers.$textoDark;
                        }
                    }
                }

                .tag-atual{
                    display: none;
                    width: 100%;
                    padding: 3px;
                    margin: 0px;
                    color: map.get(helpers.$palletLivecommerce, 'textLight');
                    font: normal 12px helpers.$fontBold;
                    text-align: center;
                    background-color: map.get(helpers.$palletLivecommerce, 'highlight');
                }

                &.favoritado{
                    .icon-heart{
                        opacity: 1;
                    }
                }

                &.inactive{
                    pointer-events: none;

                    img{
                        opacity: 0.5;
                        filter: grayscale(0.8);
                    }
                }
                
                &.atual{
                    @media(max-width:1199px){
                        border-color: map.get(helpers.$palletLivecommerce, 'highlight');
                    }

                    img{
                        filter: grayscale(0);
                        
                        @media(min-width:1200px){
                            border-color: map.get(helpers.$palletLivecommerce, 'highlight');
                        }
                    }

                    .tag-atual{
                        display: block;
                    }
                }
            }
        }
    }

    #live-commerce-form{
        position: relative;
        display: block;
        overflow: auto;
        width: 100%;
        height: 100%;
        max-width: 600px;
        padding-left: 50px;
        z-index: 10;
        // padding-bottom: 50px;

        @media(max-width:1450px){
            padding-left: 15px;
            // padding-bottom: 15px;
        }

        @media(max-width:1199px){
            position: absolute;
            z-index: 3;
            max-width: 100%;
            height: 100%;
            padding-left: 0px;
            top: 0px;
            left: 0px;
            background-color: map.get(helpers.$palletLivecommerce, 'backgroundModal');
            visibility: hidden;
            pointer-events:none;
            opacity: 0;
            transition: visibility 0s 0.3s, opacity 0.3s linear;

            &.ativo{
                visibility: visible;
                pointer-events:initial;
                opacity: 1;
                transition: opacity 0.3s linear;
            }
        }

        .ps__rail-x{
            display: none !important;
        }
        .ps__rail-y{
            z-index: 2001;
        }

        .ctrl-form{
            display: none;
            width: 100%;
            padding: 10px 15px;
            align-items: center;
            justify-content: flex-end;

            @media(max-width:1199px){
                display: flex;
            }

            .icone{
                display: flex;
                outline: 0px;
                width: 35px;
                height: 35px;
                padding: 7px;
                border-radius: 100%;
                color: helpers.$textoDark;
                background-color: map.get(helpers.$palletLivecommerce, 'light');
                align-items: center;
                justify-content: center;
            }
        }

        #carrinho-module-overlay{
            display: none !important;
        }

        #carrinho-module{
            border: none;
            box-shadow: none;
            left: 0;
            position: relative;
            top: 0;
            transform: none;

            .btnClose,
            .btnCloseBottom{
                display: none;
            }

            .inner{
                height: 100%;
                width: 100%;
                min-width: 0;
                min-height: 0;
                max-width: none;
                max-height: none;
                overflow: hidden;

                @media(max-width:1199px){
                    padding-top: 15px;
                }

                .conteudo-principal{
                    gap: 30px;
                    flex-direction: column;
                    justify-content: flex-start;
                    align-items: center;

                    .box-share{
                        padding-left: 0px;
                    }

                    .prd-fotos{
                        display: block;
                        width: 100%;
                    }

                    .content-foto-info{
                        margin-left: 0px;
                    }
                }
            }

            &.active{
                display: block;
            }
        }
    }
}

.msg-error{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

.ctrl-favoritos{
    display: block;
    outline: 0px;

    .icon-heart{
        display: block;
        width: 24px;
        height: 24px;
        color: helpers.$textoDark;
    }
}
