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

#pedido-troca-item-overlay{
    z-index: 2000;
    background: rgba(0,0,0,0.5);
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

#pedido-troca-item-module{
    position: fixed;
    z-index: 2000;
    width: 100%;
    height: 80vh;
    max-width: 850px;
    max-height: 585px;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    background-color: map.get(helpers.$palletMinhaConta, light);
    transition: width 0.4s 0.2s;

    &.show-sku-list{
        .body{
            .content-1{
                width: calc(50% - 7px);

                @media(max-width:767px){
                    width: 100%;
                    margin-bottom: 15px;
                }
            }

            .content-2{
                margin-right: 0px;

                @media(max-width:767px){
                    display: block;
                    width: 100%;
                }
            }
        }
    }

    .header{
        display: flex;
        width: 100%;
        padding: 5px 15px;
        align-items: center;
        justify-content: flex-end;
        border-bottom: solid 1px map.get(helpers.$palletMinhaConta, borders);

        .btn-save{
            display: block;
            cursor: pointer;
            width: 100%;
            max-width: 130px;
            padding: 10px;
            margin-right: 15px;
            color: map.get(helpers.$palletMinhaConta, textLight);
            font: normal 15px helpers.$fontRegular;
            text-align: center;
            border-radius: map.get(helpers.$palletMinhaConta, borderRadius);
            border: solid 1px map.get(helpers.$palletMinhaConta, success);
            background-color: map.get(helpers.$palletMinhaConta, success);
            @include helpers.transicao(0.4s ease-in-out);

            &:hover,&:focus{
                border-color: map.get(helpers.$palletMinhaConta, highlight);
                background-color: map.get(helpers.$palletMinhaConta, highlight);
            }
        }

        .btn-close{
            display: flex;
            cursor: pointer;
            width: 43px;
            height: 43px;
            align-items: center;
            justify-content: center;
            border-radius: map.get(helpers.$palletMinhaConta, borderRadius);
            background-color: map.get(helpers.$palletMinhaConta, highlight);
            @include helpers.transicao(0.4s ease-in-out);

            &:before{
                display: block;
                content: "";
                width: 24px;
                height: 24px;
                background-image: url(../img/minha-conta/icon18.svg);
                background-size: contain;
                background-position: center;
                background-repeat: no-repeat;
            }

            &:hover,&:focus{
                background-color: map.get(helpers.$palletMinhaConta, success);
            }
        }
    }

    .body{
        display: flex;
        width: 100%;
        max-height: calc(100% - 56px);
        padding: 10px 15px;
        overflow-y: auto;
        overflow-x: hidden;
        transition: opacity 0.3s linear;
        align-items: stretch;
        justify-content: space-between;

        @media(max-width:767px){
            display: block;
        }

        .content-1{
            display: flex;
            width: 100%;
            flex-direction: column;
            @include helpers.transicao(0.4s ease-in-out);

            .content-1-1{
                display: flex;
                flex-grow: 1;
                margin-bottom: 5px;

                .foto{
                    flex-grow: 1;
                    width: 50%;
                    min-height: 300px;
                    border: solid 1px helpers.$borders;
                    background-size: contain;
                    background-repeat: no-repeat;
                    background-position: center;
                }

                .acao{
                    padding: 0 0 0 6px;
                    flex-grow: 1;
                    width: 50%;
                    font-family: helpers.$fontRegular;
                    color: helpers.$textoDark;
                    display: flex;
                    flex-direction: column;

                    p{
                        display: block;
                        margin: 0px;
                        margin-bottom: 5px;
                        color: map.get(helpers.$palletMinhaConta, textDark);
                        font: normal 13px helpers.$fontRegular;
                    }

                    .sl-motivo,
                    .sl-acao,
                    .observacao{
                        display: block;
                        outline: 0px;
                        width: 100%;
                        height: auto;
                        padding: 5px 10px;
                        color: map.get(helpers.$palletMinhaConta, textMedium);
                        font: normal 13px helpers.$fontRegular;
                        border-radius: map.get(helpers.$palletMinhaConta, borderRadius);
                        border: solid 1px map.get(helpers.$palletMinhaConta, borders);
                        background-color: map.get(helpers.$palletMinhaConta, light);
                        box-shadow: none;
                    }
                    .observacao{
                        border-color: helpers.$borders;
                        height: 60px;
                        resize: none;
                        padding: 4px;
                        flex-grow: 1;
                    }
                    .observacao-wrap{
                        flex-grow: 1;
                        display: flex;
                        margin-bottom: 0;
                        flex-direction: column;
                    }
                }
            }

            .info{
                color: helpers.$textoDark;
                font-family: helpers.$fontRegular;
                border: solid 1px helpers.$borders;
                padding: 10px;
                letter-spacing: 0.3px;

                h3{
                    position: relative;
                    display: block;
                    margin: 0px;
                    margin-bottom: 15px;
                    color: map.get(helpers.$palletMinhaConta, textDark);
                    font: normal 13px helpers.$fontMedium;
                    text-align: center;

                    &:after{
                        content:'';
                        display: block;
                        width: 60px;
                        height: 1px;
                        background: map.get(helpers.$palletMinhaConta, borders);
                        position: absolute;
                        top: 100%;
                        left: 50%;
                        margin-top: 5px;
                        transform: translateX(-50%);
                    }
                }

                p{
                    display: flex;
                    /*                    width: 100%;
                                        max-width: 400px;
                                        margin: 0 auto;*/
                    margin: 0px;
                    margin-bottom: 5px;
                    color: map.get(helpers.$palletMinhaConta, textMedium);
                    font: normal 13px helpers.$fontRegular;
                    align-items: center;
                    justify-content: space-between;

                    span{
                        color: map.get(helpers.$palletMinhaConta, textDark);
                        font-family: helpers.$fontMedium;
                    }

                    .qtd-label{
                        color: map.get(helpers.$palletMinhaConta, textMedium);
                        font-family: helpers.$fontRegular;
                    }

                    .qtd{
                        display: block;
                        width: auto;
                        padding: 5px 10px;
                        min-width: 50px;
                        text-align: right;
                        border-radius: map.get(helpers.$palletMinhaConta, borderRadius);
                        border: solid 1px map.get(helpers.$palletMinhaConta, borders);
                        background-color: map.get(helpers.$palletMinhaConta, medium);

                        &::-webkit-inner-spin-button {
                            -webkit-appearance: none;
                            cursor:pointer;
                            display:none;
                            width:8px;
                            color: helpers.$textoDark;
                            text-align:center;
                            position:relative;
                        }

                        -moz-appearance: textfield;
                        appearance: textfield;
                        margin: 0 -4px;
                    }
                }
            }
        }

        .content-2{
            display: flex;
            width: calc(50% - 7px);
            margin-right: calc(-50% + -20px);
            flex-direction: column;
            @include helpers.transicao(0.4s ease-in-out);

            @media(max-width:767px){
                display: none;
                margin: 0px;
            }

            p{
                display: block;
                margin: 0px;
                margin-bottom: 5px;
                color: map.get(helpers.$palletMinhaConta, textDark);
                font: normal 13px helpers.$fontRegular;
            }

            .cor-list{
                height: 100px;
                border: solid 1px helpers.$borders;
                overflow: auto;
                margin-bottom: 12px;

                .cor-item{
                    width: 45px;
                    float: left;
                    padding: 3px;
                    position: relative;

                    input{
                        display: none;

                        &:checked{
                            ~ span{
                                transition-delay: 0s;
                                border-color: map.get(helpers.$palletMinhaConta, highlight);
                            }
                        }
                    }

                    img{
                        width: 100%;
                        /*max-width: 47px;*/
                        display: block;
                        transition: all 0.2s 0.1s;
                        box-shadow: 0 0 0 0 #666;
                    }

                    span{
                        position: absolute;
                        top: 0;
                        left: 0;
                        right: 0;
                        bottom: 0;
                        border: solid 2px transparent;
                        transition: border 0.2s 0.1s;
                    }

                    &:hover,&:focus{
                        span{
                            transition-delay: 0s;
                            border-color: map.get(helpers.$palletMinhaConta, highlight);
                        }
                        /*
                        img{
                            transition-delay: 0s;
                            box-shadow: 0 5px 5px -2px #666;
                            transform: translateY(-3px);
                        }
                        */
                    }
                }
            }

            .content-2-1{
                display: flex;
                flex-grow: 1;
                /*align-items: stretch;*/

                @media(max-width:767px){
                    margin-bottom: 50px;
                    min-height: 200px;
                }

                .content-2-1-1,
                .content-2-1-2{
                    display: flex;
                    flex-direction: column;
                }
                .content-2-1-1{
                    padding: 5px 5px 0 0;
                    flex-grow: 1;
                }
                .content-2-1-2{
                    padding: 5px 0 0 0;
                    min-width: 110px;
                }
                .tamanho-list{
                    display: flex;
                    flex-grow: 1;
                    flex-wrap: wrap;
                    align-items: flex-start;
                    padding: 10px;
                    overflow: auto;
                    min-height: 75px;
                    border: solid 1px helpers.$borders;

                    .tamanho-item{
                        position: relative;
                        cursor: pointer;
                        display: inline-block;
                        min-width: 45px;
                        top: 0px;
                        left: 0px;
                        margin: 2px;
                        color: map.get(helpers.$palletMinhaConta, textDark);
                        font: normal 13px helpers.$fontRegular;
                        text-align: center;
                        border: solid 1px map.get(helpers.$palletMinhaConta, borders);
                        background-color: map.get(helpers.$palletMinhaConta, light);
                        @include helpers.transicao(0.4s ease-in-out);

                        &:hover{
                            span{
                                &:after{
                                    opacity: 1;
                                }
                            }
                        }

                        &.loading{
                            transition-duration: 0s;
                            transform: scale(0.7);
                            opacity: 0;
                        }

                        input{
                            display: none;

                            &:checked{
                                + span{
                                    &:after{
                                        opacity: 1;
                                    }
                                }
                            }
                        }

                        span{
                            position: relative;
                            display: flex;
                            width: 100%;
                            height: 100%;
                            padding: 10px;
                            align-items: center;
                            justify-content: center;

                            &:after{
                                position: absolute;
                                display: block;
                                content: '';
                                opacity: 0;
                                width: calc(100% - 2px);
                                height: calc(100% - 2px);
                                top: 0;
                                left: 0;
                                box-sizing: content-box;
                                border: solid 2px map.get(helpers.$palletMinhaConta, highlight);
                            }
                        }
                    }

                }

                .foto{
                    flex-grow: 1;
                    border: solid 1px helpers.$borders;
                    background-size: contain;
                    background-repeat: no-repeat;
                    background-position: top center;
                }
            }
        }

        .msg-add{
            background-color: helpers.$highlight;
            border-color: helpers.$highlight;
            border-radius: 12px;
            color: helpers.$textoLight;
            font-family: helpers.$fontRegular;
            font-size: 15px;
            left: 50%;
            letter-spacing: 0.5px;
            max-width: 320px;
            padding: 8px 12px;
            position: absolute;
            text-align: center;
            top: 50%;
            transform: translateY(-50%) translateX(-50%);
            width: 86%;
            z-index: 5;

            p{
                margin: 4px 0;
            }

            a{
                font-weight: bold;
                text-decoration: underline;
            }
        }
    }

    &.loading{
        .body{
            opacity: 0.3;
        }

        .icon-loading{
            display: block;
        }
    }

    .icon-loading{
        animation-duration: 1.4s;
        animation-name: loadingRotate;
        animation-iteration-count: infinite;
        animation-timing-function: linear;
        opacity: 0.6;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-left: -24px;
        margin-top: -24px;
        display: none;
    }
}

#msg-container{
    position: fixed;
    top: 50px;
    right: 390px;
    z-index: 2010;

    @media(max-width:740px){
        top: 15px;
        right: 20px;
    }

    &.carrinho-off{
        right: 20px !important;
    }

    > p{
        position: relative;
        display: block;
        cursor: pointer;
        width: 320px;
        padding: 10px 15px;
        margin: 0 auto 0px auto;
        color: helpers.$textoDark;
        font: normal 13px helpers.$fontRegular;
        /*line-height: 1.6em;*/
        border-radius: 6px;
        background-color: helpers.$light;

        &:before{
            @include helpers.sprite();
            content: "";
            width: 34px;
            height: 34px;
            margin-right: 16px;
            vertical-align: middle;
        }

        &:after{
            content: "X";
            color: helpers.$textoDark;
            display: block;
            font-family: helpers.$fontRegular;
            font-size: 16px;
            font-weight: normal;
            line-height: 16px;
            opacity: 0.7;
            position: absolute;
            right: 6px;
            text-align: center;
            -webkit-text-stroke: 2px;
            text-stroke: 2px;
            top: 6px;
        }

        &.error{
            /*background: #d9534f;*/
            &:before{
                background-position: -462px -107px;
            }
        }
        &.success{
            /*background: #00D86C;*/
            /*border: solid 1px #00D86C;*/
            &:before{
                background-position: -413px -107px;
            }
        }
    }

    a{
        text-decoration: underline;
        color: helpers.$textoMedium;
    }

}
