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

.login-modal-active {
    #login-modal-fade{
        visibility: visible;
        pointer-events: initial;
        opacity: 1;
        transition: opacity 0.3s linear;
    }
    #login-modal{
        visibility: visible;
        pointer-events: initial;
        opacity: 1;
        transition: opacity 0.3s linear;
    }
}
.login-modal-required{
    .btn-close{
        display: none;
        pointer-events: none;
    }

    #login-modal-fade{
        pointer-events: none;
    }
}

#login-modal-fade{
    pointer-events: none;
    position: fixed;
    z-index: 2001;
    opacity: 0;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5); 
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s linear;
}

#login-modal{
    pointer-events: none;
    position: fixed;
    z-index: 2002;
    display: flex;
    width: 96%;
    max-width: 555px;
    max-height: 90vh;
    top: 50%;
    left: 50%;
    border-radius: map.get(helpers.$palletCheckout, borderRadius);
    border: solid 1px map.get(helpers.$palletCheckout, borders);
    background-color: map.get(helpers.$palletCheckout, light);
    flex-direction: column;
    transform: translate(-50%, -50%);
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s linear;

    .header{
        position: relative;
        display: flex;
        height: 40px;
        min-height: 40px;
        padding: 0 15px;
        align-items: center; 

        .title{
            position: relative;
            z-index: 1;
            display: block;
            width: 100%;
            margin: 0px;
            color: map.get(helpers.$palletCheckout, textDark);
            font: normal 18px helpers.$fontMedium;
            text-align: center;
        }

        .btn-form-login, .btn-close{
            position: absolute;
            cursor: pointer;
            z-index: 2;
            display: flex;
            outline: 0px;
            width: 31px;
            height: 31px;
            top: 5px;
            padding: 0px;
            margin: 0px;
            box-shadow: none;
            border: none;
            background-image: initial;
            background-color: transparent;

            &:before{
                display: block;
                content: "";
                width: 31px;
                height: 31px;
                background-size: contain;
                background-repeat: no-repeat;
                background-position: center;
            }
        }

        .btn-form-login{
            left: 10px;
            &:before{
                background-image: url(../img/login/icon-back.svg);
            }
        }

        .btn-close{
            right: 10px;
            &:before{
                background-image: url(../img/login/icon-close.svg);
            }
        }
    }

    .content{
        position: relative;
        overflow-y: auto;
        display: flex;
        min-height: 0px;
        padding: 15px;
        flex-grow: 1;
        font-family: helpers.$fontRegular;

        .content-login,
        .content-senha,
        .content-cadastro,
        .content-cadastro-done{
            width: 100%;
        }

        .titulo{
            display: block;
            color: map.get(helpers.$palletCheckout, textDark);
            font: normal 17px helpers.$fontRegular;
            text-align: center;
            margin: 10px 0px;
        }

        .subtitulo{
            display: block;
            color: map.get(helpers.$palletCheckout, textMedium);
            font: normal 14px helpers.$fontRegular;
            text-align: center;
            margin: 0px;
            margin-bottom: 20px;
        }

        .content-form{
            display: block;
            width: 100%;
            max-width: 395px;
            margin: 0 auto;
            margin-bottom: 20px;
        }

        .form-titulo{
            display: block;
            color: map.get(helpers.$palletCheckout, textoDark);
            font-size: 14px;
            margin: 0px;
            margin-bottom: 20px;
        }

        .form-input,
        .form-control{
            display: block;
            outline: 0px;
            width: 100%;
            height: auto;
            margin-bottom: 10px;
            padding: 10px;
            color: map.get(helpers.$palletCheckout, textDark);
            font: normal 15px helpers.$fontRegular;
            text-align: center;
            box-shadow: none;
            border-radius: map.get(helpers.$palletCheckout, borderRadius);
            border: 1px solid map.get(helpers.$palletCheckout, borders);
            background-color: map.get(helpers.$palletCheckout, light);

            &.error{
                border-color: map.get(helpers.$palletCheckout, error);
                box-shadow: inset 0px 0px 2px map.get(helpers.$palletCheckout, error);

                &:after{
                    content: 'Erro';
                }
            }
        }

        .msgError{
            position: static;
            display: block;
            z-index: 10;
            float: left;
            width: 20px;
            max-height: 18px;
            padding: 0;
            top: 0;
            color: map.get(helpers.$palletCheckout, error);

            span{
                position: absolute;
                display: none;
                width: calc(100% - 30px);
                min-height: calc(100% - 28px);
                margin-top: 0;
                padding: 2px 10px;
                top: 18px;
                border-radius: map.get(helpers.$palletCheckout, borderRadius);
                font-size: 10px;
            }

            &:empty{
                display: none;
            }

            &:before{
                display: inline-block;
                cursor: pointer;
                content: '';
                width: 20px;
                height: 18px;
                background-image: url(../img/sprite.png);
                background-position: -2px -291px;
                background-repeat: no-repeat;
            }

            &:hover{
                span{
                    display: block;
                }
            }
        }

        .g-recaptcha{
            display: flex;
            margin: 10px 0px;
            align-items: center;
            justify-content: center;
        }

        .btn-submit{
            display: block;
            outline: 0px;
            width: 100%;
            padding: 10px;
            margin: 5px auto 10px auto;
            color: map.get(helpers.$palletCheckout, textLight);
            font: normal 13px helpers.$fontMedium;
            text-align: center;
            box-shadow: none;
            border: none;
            border-radius: map.get(helpers.$palletCheckout, borderRadius);
            background-color: map.get(helpers.$palletCheckout, highlight);
            @include helpers.transicao(0.4s ease-in-out);

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

        .btn-form{
            display: block;
            margin-bottom: 50px;
            color: map.get(helpers.$palletCheckout, textDark);
            font: normal 15px helpers.$fontRegular;
            text-align: center;
            text-decoration: underline;
        }

        .box-cadastro{
            display: block;
            margin-left: -15px;
            margin-right: -15px;
            margin-bottom: -15px;
            padding: 30px 15px;
            background-color: map.get(helpers.$palletCheckout, medium);

            .titulo{
                display: block;
                margin: 0px;
                margin-bottom: 20px;
                color: map.get(helpers.$palletCheckout, textMedium);
                font: normal 15px helpers.$fontRegular;
                text-align: center;
            }

            .opcoes{
                display: flex;
                width: 100%;
                align-items: center;
                justify-content: center;

                .btn-cadastro{
                    display: block;
                    width: 100%;
                    max-width: 190px;
                    padding: 10px;
                    color: map.get(helpers.$palletCheckout, textLight);
                    font: normal 13px helpers.$fontMedium;
                    text-align: center;
                    border-radius: map.get(helpers.$palletCheckout, borderRadius);
                    background-color: map.get(helpers.$palletCheckout, highlight);
                    @include helpers.transicao(0.4s ease-in-out);

                    &:last-of-type{
                        margin-left: 15px;
                    }

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

        .msg-error{
            /*            display: block;
                        margin: 10px 0;
                        margin-bottom: 15px;
                        color: map-get($palletCheckout, error);
                        font-size: 14px;
                        font-weight: bold;
                        text-align: center;*/

            a{
                span{
                    text-decoration: underline;
                }
            }

            &:empty{
                display: none;
            }
        }

        .content-login{
            .titulo-redes{
                display: block;
                margin: 0px;
                margin-top: 20px;
                margin-bottom: 20px;
                color: map.get(helpers.$palletCheckout, textMedium);
                text-align: center;
                font: normal 15px helpers.$fontMedium;
            }

            .redes-login{
                position: relative;
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;

                .item{
                    position: relative;
                    overflow: hidden;
                    display: block;
                    width: 100%;
                    max-width: 190px;

                    .btn-facebook{
                        pointer-events: none;
                        position: relative;
                        display: block;
                        outline: 0px;
                        z-index: 2;
                        width: 100%;
                        padding: 10px;
                        color: map.get(helpers.$palletCheckout, textDark);
                        font: normal 13px helpers.$fontRegular;
                        text-align: center;
                        border-radius: map.get(helpers.$palletCheckout, borderRadius);
                        border: solid 1px map.get(helpers.$palletCheckout, borders);
                        background-color: map.get(helpers.$palletCheckout, light);

                        &:before{
                            display: inline-block;
                            content: "";
                            width: 24px;
                            height: 24px;
                            margin-right: 10px;
                            vertical-align: middle;
                            background-image: url(../img/login/icon-facebook.svg);
                            background-size: contain;
                            background-repeat: no-repeat;
                            background-position: center;
                        }
                    }
                    .fb-login-button{
                        position: absolute;
                        z-index: 1;
                        opacity: 0;
                        width: 100%;
                        height: 100%;
                        left: 0px;
                        top: 0px;
                    }

                    .fb-reset{
                        background: none;
                        border: 0;
                        border-spacing: 0;
                        color: map.get(helpers.$palletCheckout, textDark);
                        cursor: auto;
                        direction: ltr;
                        font-family: helpers.$fontRegular;
                        font-size: 11px;
                        font-style: normal;
                        font-variant: normal;
                        font-weight: normal;
                        letter-spacing: normal;
                        line-height: 1;
                        margin: 0;
                        overflow: visible;
                        padding: 0;
                        text-align: left;
                        text-decoration: none;
                        text-indent: 0;
                        text-shadow: none;
                        text-transform: none;
                        visibility: visible;
                        white-space: normal;
                        word-spacing: normal;
                    }

                    .btn-google{
                        pointer-events: none;
                        position: relative;
                        outline: 0px;
                        z-index: 2;
                        display: block;
                        width: 100%;
                        padding: 10px;
                        color: map.get(helpers.$palletCheckout, textDark);
                        font: normal 13px helpers.$fontRegular;
                        text-align: center;
                        border: solid 1px map.get(helpers.$palletCheckout, borders);
                        background-color: transparent;

                        &:before{
                            display: inline-block;
                            content: "";
                            width: 24px;
                            height: 24px;
                            margin-right: 10px;
                            vertical-align: middle;
                            background-image: url(../img/login/icon-google.svg);
                            background-size: contain;
                            background-repeat: no-repeat;
                            background-position: center;
                        }
                    }

                    .g-signin2{
                        position: absolute;
                        z-index: 1;
                        opacity: 0;
                        width: 100%;
                        height: 100%;
                        left: 0px;
                        top: 0px;
                    }

                    &:last-of-type{
                        margin-left: 15px;
                    }
                }
            }
        }

        .content-senha{
            .content-sending{
                display: none;
                margin: 20px;
                text-align: center;

                .loading{
                    margin-top: 20px;
                }
            }

            .content-sended{
                display: none;
                margin: 20px;
                text-align: center;
            }

            &.sending{
                .btn-form-login,
                .btn-form-cadastro,
                .content-form{
                    display: none;
                }
                .content-sending{
                    display: block;
                }
            }

            &.sended{
                .btn-form-cadastro,
                .content-form{
                    display: none;
                }
                .content-sended{
                    display: block;
                }
            }
        }

        .content-cadastro{
            .content-form{
                max-width: 590px;

                .step-nav{
                    display: flex;
                    width: 100%;
                    margin: 50px 0px;
                    align-items: center;
                    justify-content: center;

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

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

                    .option{
                        display: flex;
                        outline: 0px;
                        margin-left: 55px;
                        box-shadow: none;
                        align-items: center;
                        justify-content: center;

                        @media(max-width:695px){
                            margin-left: 30px;
                        }

                        @media(max-width:575px){
                            width: 100%;
                            max-width: 170px;
                            margin-left: 0px;
                            margin-bottom: 10px;
                        }

                        .number{
                            display: flex;
                            width: 35px;
                            height: 35px;
                            color: map.get(helpers.$palletCheckout, textMedium);
                            font: normal 15px helpers.$fontRegular;
                            align-items: center;
                            justify-content: center;
                            border-radius: 100%;
                            background-color: map.get(helpers.$palletCheckout, medium);
                        }

                        .titulo{
                            display: block;
                            width: calc(100% - 35px);
                            margin: 0px;
                            padding-left: 10px;
                            color: map.get(helpers.$palletCheckout, textMedium);
                            font: normal 15px helpers.$fontRegular;
                        }

                        &:first-of-type{
                            margin-left: 0px;

                            @media(max-width:575px){
                                margin-bottom: 0px;
                            }
                        }

                        &.ativo{
                            .number,.titulo{
                                color: map.get(helpers.$palletCheckout, textDark);
                            }
                        }
                        &.concluido{
                            .number{
                                color: map.get(helpers.$palletCheckout, textLight);
                                background-color: map.get(helpers.$palletCheckout, success);
                            }
                        }
                    }
                }
            }

            #con-titulo {
                margin-bottom: 10px;

                h1 {
                    color: map.get(helpers.$palletCheckout, textDark);
                    margin: 0;
                    font-size: 18px;
                    font-family: helpers.$fontMedium;
                    font-weight: normal;
                }

                p {
                    color: map.get(helpers.$palletCheckout, textMedium);
                    margin: 0;
                    font-size: 12px;
                    font-family: helpers.$fontMedium;
                }
            }

            .content-campos {
                padding-bottom: 50px;

                .box {
                    header {
                        margin-bottom: 15px;

                        h2 {
                            color: map.get(helpers.$palletCheckout, textDark);
                            font: normal 16px helpers.$fontBold;
                            text-transform: uppercase;
                        }
                        span {
                            color: map.get(helpers.$palletCheckout, textMedium);
                            font-size: 12px;
                            font-family: helpers.$fontMedium;
                        }
                    }

                    label {
                        position: relative;
                        text-indent: 0px;
                        margin-bottom: 0px;
                        color: map.get(helpers.$palletCheckout, textMedium);
                        font: normal 15px helpers.$fontRegular;
                    }

                    .form-control {
                        display: block;
                        outline: 0px;
                        width: 100%;
                        height: auto;
                        margin-bottom: 10px;
                        padding: 10px;
                        color: map.get(helpers.$palletCheckout, textDark);
                        font-family: helpers.$fontRegular;
                        font-size: 15px;
                        text-align: left;
                        box-shadow: none;
                        border-radius: map.get(helpers.$palletCheckout, borderRadius);
                        border: 1px solid map.get(helpers.$palletCheckout, borders);
                        background-color: map.get(helpers.$palletCheckout, light);
                    }
                }

                .next-step, .btn-cadastro{
                    display: block;
                    outline: 0px;
                    width: 100%;
                    padding: 10px;
                    margin-top: 10px;
                    color: map.get(helpers.$palletCheckout, textLight);
                    font: normal 13px helpers.$fontMedium;
                    text-align: center;
                    border: none;
                    border-radius: map.get(helpers.$palletCheckout, borderRadius);
                    background-color: map.get(helpers.$palletCheckout, highlight);
                    @include helpers.transicao(0.4s ease-in-out);

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

                .box-sucesso{
                    display: block;
                    width: 100%;
                    padding: 20px 15px;

                    .sucesso-imagem{
                        display: block;
                        width: 100%;
                        max-width: 95px;
                        margin: 0 auto;
                        margin-bottom: 10px;
                    }

                    .titulo,.texto,.contador{
                        display: block;
                        margin: 0px;
                        margin-bottom: 10px;
                        color: map.get(helpers.$palletCheckout, textDark);
                        text-align: center;
                    }

                    .titulo{
                        font: normal 24px helpers.$fontRegular;
                    }

                    .texto{
                        font: normal 15px helpers.$fontRegular;
                    }

                    .contador{
                        width: 100%;
                        max-width: 40px;
                        padding: 10px;
                        margin: 0 auto;
                        font: normal 15px helpers.$fontRegular;
                        border-radius: 4px;
                        background-color: map.get(helpers.$palletCheckout, medium);
                    }
                }

                /*                #btCadastro,.btCadastro {
                                    display: block;
                                    width: 100%;
                                    max-width: 410px;
                                    padding: 10px;
                                    margin: 20px auto 0 auto;
                                    color: map-get($palletCheckout, textDark);
                                    font: normal 13px $fontBold;
                                    text-align: center;
                                    border: none;
                                    border-radius: map-get($palletCheckout, borderRadius);
                                    background-color: map-get($palletCheckout, highlight);
                                    transition: all 0.4s ease-in-out;
                
                                    &:hover, &:focus{
                                        color: map-get($palletCheckout, textLight);
                                        background-color: map-get($palletCheckout, success);
                                    }
                                }*/
            }
        }
        
        .content-cadastro-done{
            .box-sucesso{
                display: block;
                padding: 20px 15px;
                text-align: center;
                width: 100%;

                .sucesso-imagem{
                    display: block;
                    width: 100%;
                    max-width: 95px;
                    margin: 0 auto;
                    margin-bottom: 10px;
                }

                .titulo,.texto,.contador{
                    display: block;
                    margin: 0px;
                    margin-bottom: 10px;
                    color: map.get(helpers.$palletCheckout, textDark);
                }

                .titulo{
                    font: normal 24px helpers.$fontRegular;
                }

                .texto{
                    font: normal 15px helpers.$fontRegular;
                }

                .contador{
                    width: 100%;
                    max-width: 40px;
                    padding: 10px;
                    margin: 0 auto;
                    font: normal 15px helpers.$fontRegular;
                    border-radius: 4px;
                    background-color: map.get(helpers.$palletCheckout, medium);
                }
            }
        }
    }

    &.large{
        max-width: 1024px;
    }
}

#modal-exists{
    position: fixed;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    padding: 15px;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s linear;

    .box-overlay{
        position: absolute;
        z-index: 1;
        cursor: pointer;
        width: 100%;
        height: 100%;
        top: 0px;
        left: 0px;
        background-color: rgba(0,0,0,0.7);
    }

    .box-conteudo{
        position: relative;
        z-index: 2;
        display: block;
        width: 100%;
        height: auto;
        max-width: 600px;
        background-color: #FFF;
        overflow-y: auto;
        overflow-x: hidden;

        .box-header{
            display: block;
            width: 100%;
            padding: 20px 15px;
            border-bottom: 1px solid #F1F1F1;
        }

        .conteudo{
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-end;
            width: 100%;
            max-width: 420px;
            margin: 0 auto;
            padding: 50px 15px;
            background-size: cover; 
            background-position: center;
            background-repeat: no-repeat;

            @media(max-width:575px){
                padding-top: 30px;
                padding-bottom: 30px;
            }

            .texto{
                display: block;
                margin: 0px;
                color: #5F5F5F;
                font: normal 16px helpers.$fontRegular;
                text-align: center;

                strong{
                    font-family: helpers.$fontBold;
                }
            }

            .modal-rodape{
                display: flex;
                width: 100%;
                margin-top: 30px;
                flex-wrap: wrap;
                align-items: center;
                justify-content: space-between;

                .btn-voltar{
                    display: flex;
                    cursor: pointer;
                    color: #5F5F5F;
                    font: normal 13px helpers.$fontRegular;
                    align-items: center;
                    margin-right: 15px;

                    &:before{
                        @include helpers.sprite();
                        content: '';
                        width: 18px;
                        height: 17px;
                        margin-right: 10px;
                        background-position: -271px -126px;
                    }
                }

                .btnConfirmar{
                    display: block;
                    outline: 0px;
                    width: 100%;
                    max-width: 200px;
                    padding: 15px 10px;
                    color: #FFFFFF;
                    font: normal 13px helpers.$fontRegular;
                    text-align: center;
                    text-transform: uppercase;
                    background-color: #1A1818;
                    border-radius: 0px;
                    border: none;
                    box-shadow: none;
                    @include helpers.transicao(0.4s ease-in-out);

                    @media(max-width:575px){
                        max-width: 180px;
                    }

                    &:hover, &:focus{
                        color: #FFFFFF;
                        background-color: #0EAF78;
                    }
                }
            }
        }
    }

    &.ativo{
        visibility: visible;
        opacity: 1;
        transition: opacity 0.3s linear;
    }
}