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

.conteudo-conta {
    .box-header{
        display: flex;
        width: 100%;
        align-items: flex-start;
        justify-content: space-between;

        .box-titulo{
            display: block;
        }

        .localizar-pedidos{
            display: flex;
            width: 100%;
            max-width: 275px;
            align-items: stretch;
            justify-content: center;
            border-radius: map.get(helpers.$palletMinhaConta, borderRadius);
            border: solid 1px map.get(helpers.$palletMinhaConta, borders);
            background-color: map.get(helpers.$palletMinhaConta, light);

            .btn-buscar{
                display: flex;
                outline: 0px;
                width: 43px;
                height: 43px;
                border: none;
                border-radius: 0px;
                box-shadow: none;
                background-color: transparent;
                align-items: center;
                justify-content: center;

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

            .form-control{
                display: block;
                outline: 0px;
                width: calc(100% - 63px);
                height: auto;
                color: map.get(helpers.$palletMinhaConta, textMedium);
                font: normal 15px helpers.$fontRegular;
                border: none;
                box-shadow: none;
                background-color: transparent;
            }
        }
    }

    .pedidos{
        position: relative;
        display: block;
        width: 100%;

        .alert{
            margin-top: 20px;
        }

        .loading {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            overflow: hidden;
            display: none;
            background-color: rgba(255,255,255, 0.8);
            background-image: url("../img/loading.gif");
            background-repeat: no-repeat;
            background-position: center;
        }

        .pedido{
            display: flex;
            outline: 0px;
            width: 100%;
            padding: 30px;
            align-items: center;
            justify-content: space-between;
            border: solid 1px transparent;
            box-shadow: none;
            @include helpers.transicao(0.4s ease-in-out);

            @media(max-width:1300px){
                padding: 15px;
                margin-bottom: 20px;
                flex-wrap: wrap;
                border-color: map.get(helpers.$palletMinhaConta, borders);
            }

            @media(max-width:575px){
                flex-direction: column;
            }

            .p-text{
                display: block;

                p{
                    display: block;
                    margin: 0px;
                    color: map.get(helpers.$palletMinhaConta, textDark);
                    font: normal 15px helpers.$fontRegular;

                    &:first-of-type{
                        color: map.get(helpers.$palletMinhaConta, textMedium);
                        font: normal 14px helpers.$fontMedium;
                        margin-bottom: 5px;
                    }
                }
            }

            .box-1{
                display: flex;
                width: 100%;
                max-width: 330px;
                align-items: center;
                justify-content: flex-start;

                @media(max-width:575px){
                    margin-wudth: 100%;
                    flex-direction: column;
                    justify-content: center;
                }

                .p-text{
                    @media(max-width:575px){
                        margin-bottom: 10px;
                    }
                }

                .p-itens{
                    display: flex;
                    width: 100%;
                    margin-left: 15px;
                    max-width: 160px;
                    padding-left: 25px;
                    align-items: center;
                    justify-content: flex-start;

                    .item{
                        overflow: hidden;
                        display: flex;
                        width: 55px;
                        height: 55px;
                        margin-left: -25px;
                        border-radius: 100%;
                        border: solid 1px map.get(helpers.$palletMinhaConta, borders);
                        align-items: center;
                        justify-content: center;
                        background-color: map.get(helpers.$palletMinhaConta, light);

                        img{
                            display: block;
                            width: 100%;
                            height: 100%;
                            border-radius: 100%;
                            object-fit: cover;
                            object-position: 0px 0px;
                        }

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

            .box-2{
                display: block;
                width: 100%;
                max-width: 110px;

                @media(max-width:575px){
                    margin-top: 20px;
                }

                p{
                    display: block;
                    width: 100%;
                    margin: 0px;
                    padding: 5px 10px;
                    color: map.get(helpers.$palletMinhaConta, textMedium);
                    font: normal 14px helpers.$fontRegular;
                    text-align: center;
                    border-radius: map.get(helpers.$palletMinhaConta, borderRadius);
                    border: solid 1px map.get(helpers.$palletMinhaConta, borders);
                    background-color: map.get(helpers.$palletMinhaConta, light);

                    &.aberto,
                    &.realizado{
                        color: map.get(helpers.$palletMinhaConta, warning);
                        border-color: map.get(helpers.$palletMinhaConta, warning);
                        background-color: rgba(map.get(helpers.$palletMinhaConta, warning), 0.1);
                    }

                    &.confirmado,
                    &.pacote,
                    &.transporte{
                        color: map.get(helpers.$palletMinhaConta, info);
                        border-color: map.get(helpers.$palletMinhaConta, info);
                        background-color: rgba(map.get(helpers.$palletMinhaConta, info), 0.1);
                    }

                    &.entregue{
                        color: map.get(helpers.$palletMinhaConta, success);
                        border-color: map.get(helpers.$palletMinhaConta, success);
                        background-color: rgba(map.get(helpers.$palletMinhaConta, success), 0.1);
                    }

                    &.cancelado,
                    &.fechado,
                    &.abandonado{
                        color: map.get(helpers.$palletMinhaConta, error);
                        border-color: map.get(helpers.$palletMinhaConta, error);
                        background-color: rgba(map.get(helpers.$palletMinhaConta, error), 0.1);
                    }
                }
            }

            .box-3{
                display: flex;
                width: 100%;
                max-width: 350px;
                align-items: center;
                justify-content: flex-end;

                @media(max-width:1300px){
                    max-width: 100%;
                    margin-top: 20px;
                    justify-content: flex-start;
                }

                @media(max-width:575px){
                    flex-direction: column;
                    justify-content: center;
                }

                .p-text{
                    margin-right: 30px;

                    @media(max-width:575px){
                        margin-right: 0px;
                        margin-bottom: 10px;
                        text-align: center;
                    }
                }

                .ver-detalhes{
                    display: block;
                    width: 100%;
                    max-width: 105px;
                    padding: 10px;
                    color: map.get(helpers.$palletMinhaConta, textDark);
                    font: normal 15px helpers.$fontRegular;
                    text-align: center;
                    border-radius: map.get(helpers.$palletMinhaConta, borderRadius);
                    border: solid 1px map.get(helpers.$palletMinhaConta, borders);
                    background-color: map.get(helpers.$palletMinhaConta, light);
                    @include helpers.transicao(0.4s ease-in-out);

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

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

    .btn-carregar-pedidos{
        margin-top: 30px;
    }
}

/*.conteudo-topo{
    display: block;
    margin-bottom: 15px;
    text-align: right;

    .titulo-conteudo{
        padding-right: auto;

        @media(min-width:990px){
            display: inline-block !important;
            padding-right: 15%;
            vertical-align: middle;
        }

        &:before{
            background-position: -112px -455px;
        }
    }

    .localizar-pedidos{
        display: block;
        width: 100%;
        height: auto;
        max-width: 285px;
        margin: 0 auto;

        @media(min-width:990px){
            display: inline-block;
            width: 100%;
            height: auto;
            max-width: 285px;
            vertical-align:middle;
        }

        .form-group{
            display: block;
            background-color: $light;
            border: solid 1px $borders;
            text-align:center;
            vertical-align:top;

            .form-control{
                display: inline-block;
                width: calc(100% - 60px);
                padding: 10px;
                border: none;
                color: $textoDark;
                font-size: 13px;
                font-family: $fontRegular;
                vertical-align: middle;
                box-shadow: none;
            }

            .btn-buscar{
                display: inline-block;
                padding: 10px;
                vertical-align: middle;
                background-color: transparent;
                border: none;

                i{
                    @include sprite();
                    display: block;
                    width: 20px;
                    height: 20px;
                    background-position: -8px -53px;
                }
            }
        }
    }
}

.pedidos {
    position: relative;
    margin-bottom: 35px;

    .pedido{
        display: block;
        padding-bottom: 35px;
        margin-bottom: 35px;
        border-bottom: solid 1px rgba(169,169,169,0.1);

        .col-xs-12{
            &:first-of-type{
                @media(min-width:767px){
                    padding-right: 5px;
                }
            }
            &:last-of-type{
                @media(min-width:767px){
                    padding-left: 5px;
                }
            }
        }

        .pedido-status{
            position: relative;
            display: block;
            width: 100%;
            height: auto;
            padding: 30px 20px;
            background-color: $medium;
            border: solid 1px $borders;

            @media(min-width:767px){
                padding: 100px 20px;
            }

            &:before{
                position: absolute;
                z-index: 1;
                display: none;
                content: "";
                width: calc(100% - 40px);
                height: 1px;
                top: 50%;
                left: 20px;
                border: dashed 1px $borders;

                @media(min-width:1852px){
                    display: block;
                }
            }

            .status{
                position: relative;
                z-index: 5;
                display: block;
                width: 100%;
                height: auto;
                list-style: none;
                text-align: center;

                .item{
                    display: inline-block;
                    width: 100%;
                    height: auto;
                    max-width: 100px;
                    margin: 10px 0px;
                    vertical-align: middle;

                    p{
                        display: block;
                        margin: 0px;
                        font-family: $fontRegular;
                        font-size: 14px;

                        &.item-titulo{
                            color: $textoDark;
                        }

                        &.item-data{
                            color: $textoMedium;
                        }
                    }

                    .item-icone{
                        @include sprite();
                        display: block;
                        width: 35px;
                        height: 35px;
                        margin: 10px auto;
                        background-position: -74px -398px;
                    }

                    &.entregue{
                        .item-icone{
                            width: 50px;
                            height: 50px;
                            margin: 3px auto;
                            background-position: -10px -387px;
                        }
                    }

                    &.cancelado{
                        .item-icone{
                            background-position: -329px -401px;
                        }
                    }
                }
            }

            .status-navegacao{
                @include sprite();
                cursor: pointer;
                position: absolute;
                display:block;
                width: 11px;
                height: 20px;
                top: calc(50% - 10px);

                &.nav-prev{
                    left: 10px;
                    background-position: -435px -10px;
                }
                &.nav-next{
                    right: 10px;
                    background-position: -456px -10px;
                }
            }
        }

        .pedido-itens{
            position: relative;
            display: block;
            width: 100%;
            height: auto;
            background-color: $light;
            border: solid 1px $borders;

            .itens{
                .item{
                    display: block;
                    width: 100%;
                    height: auto;
                    margin-top: 10px;
                    margin-bottom: 10px;

                    .item-imagem{
                        display: block;
                        width: 100%;
                        height: auto;
                        max-width: 150px;
                        margin: 0 auto;
                        margin-bottom: 10px;
                    }

                    .item-informacoes{
                        display: block;
                        width: 100%;
                        height: auto;
                        max-width: 160px;
                        margin: 0 auto;
                        color: $textoMedium;
                        font-size: 12px;
                        font-family: $fontRegular;

                        .item-nome{
                            display: block;
                            margin: 0px;
                            font-size: 10px;
                            text-align: center;
                        }

                        .item-referencia{
                            display: block;
                            margin: 0px;
                            margin-bottom: 10px;
                            text-align: center;
                        }

                        .item-col{
                            display: block;
                            width: 100%;
                            height: auto;
                            font-size: 0px;
                            text-align: center;

                            p{
                                display: inline-block;
                                margin: 0px;
                                width: 50%;
                                vertical-align: middle;
                                text-align: left;
                                font-size: 9px;

                                &:last-of-type{
                                    color: $textoMedium;
                                    font-size: 12px;
                                    font-weight: normal;
                                    text-align: right;
                                    font-family: $fontMedium;
                                }
                            }
                        }
                    }
                }
            }

            .pedido-navegacao{
                @include sprite();
                cursor: pointer;
                position: absolute;
                display:block;
                width: 11px;
                height: 20px;
                top: calc(50% - 10px);

                &.nav-prev{
                    left: 10px;
                    background-position: -435px -10px;
                }
                &.nav-next{
                    right: 10px;
                    background-position: -456px -10px;
                }
            }
        }

        .pedido-resumo{
            display: block;
            width: 100%;
            height: auto;
            padding: 50px 10px;
            background-color: $light;
            border: solid 1px $borders;

            .pedido-titulo{
                display: block;
                margin: 0px;
                margin-bottom: 30px;
                color: $textoDark;
                font-size: 13px;
                font-family: $fontRegular;
                text-align: center;
            }

            .pedido-informacoes{
                display: block;
                width: 100%;
                height: auto;
                margin-bottom: 30px;

                .informacao{
                    display: block;
                    width: 100%;
                    height: auto;
                    margin-bottom: 10px;
                    font-size: 0px;
                    text-align: center;

                    p{
                        display: inline-block;
                        width: 50%;
                        margin: 0px;
                        color: $textoDark;
                        font-size: 13px;
                        font-family: $fontRegular;
                        vertical-align: middle;
                        text-align: left;

                        &:last-of-type{
                            color: $textoMedium;
                            font-size: 14px;
                            font-weight: normal;
                            font-family: $fontMedium;
                        }
                    }
                }
            }

            .ver-detalhes{
                display: block;
                width: 100%;
                height: auto;
                max-width: 180px;
                margin: 0 auto;
                padding: 5px 10px;
                border: solid 1px $highlight;
                background-color: $highlight;
                text-align: center;
                text-transform: uppercase;
                color: $textoLight;
                font-size: 12px;
                font-family: $fontRegular;
                @include transicao(0.4s ease-in-out);

                &:hover,
                    &:focus{
                    color: $textoLight;
                    border-color: $success;
                    background-color: $success;
                }
            }
        }
    }

    .loading {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        overflow: hidden;
        display: none;
        background-color: rgba(255,255,255, 0.8);
        background-image: url("../img/loading.gif");
        background-repeat: no-repeat;
        background-position: center;
    }

    .msg {
        width: 100%;
        display: block;
        border-radius: 0px 0px 5px 5px;
        background-color: $medium;
        padding: 12px 0px;
        text-align: center;
    }
}

.btn-carregar-pedidos {
    cursor: pointer;
    display: block;
    width: 100%;
    height: auto;
    max-width: 240px;
    padding: 10px;
    margin: 0 auto;
    background-color: $light;
    border: 1px solid $borders;
    color: $textoDark;
    font-size: 12px;
    font-family: $fontRegular;
    text-align: center;
    text-transform: uppercase;
    @include transicao(0.3s ease-in-out);

    &:hover,&:focus{
        color: $textoLight !important;
        border-color: $success;
        background-color: $success;
    }
}*/