@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {  
    margin: 0;
    padding: 0;
    text-decoration: none;
    box-sizing: border-box; /* Limitar tamanho de todas as caixas contando padding e margin */
}

html {
    height: 100%;
}

body {
    background-color: #A8DBA8;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    
    min-height: 100%;
}

main {
    padding: 50px;
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    column-gap: 50px;
}

section.produtos {

    width: 600px;

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;    

    /* display: none; */
}

div.container-produto {
    background-color: #fff;
    width: 180px;

    padding: 15px 10px;
    border-radius: 20px;

    display: flex;
    flex-direction: column;
    justify-content:center;
    align-items:center;
    justify-content: space-around;
    
    row-gap: 8px;

    box-shadow: 5.21689px 7.30364px 5.21689px rgba(0, 0, 0, 0.03);
    
    font-size: 0.85rem;

}

div.container-produto > h2 {
    font-size: 0.9rem;
}

div.container-produto > img {
    max-width:150px;
    max-height:107px;
    width: auto;
    height: 107px;
    object-fit: cover;
    border-radius:8px;
 
}

input {
    display: none;
}


button {
    /* RESET STYLE ALL BUTTON */
    background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
}


div.operacao {
    padding-top: 10px;
    display: flex;
    flex-direction: row;
    justify-content: center;



    gap: 5px;
    font-size: 1.4rem;
}


div.operacao button.venda {
    font-weight: bold;
    color: #1FAA6F;

    border: 1px solid #1FAA6F;

    width: 30px;
    height: 30px;
    border-radius: 7px;
    padding-bottom: 5px;
}

div.operacao button.compra {
    font-weight: bold;
    color: #fff;
    background-color: #1FAA6F;    

    width: 30px;
    height: 30px;
    border-radius: 7px;

    padding-bottom: 5px;
}

div.operacao output {
    width: 50px;
    text-align: center;
}



section.resultado {
    opacity: 1;
    /* display: none; */
}

section.resultado div.titulo {
    width: 300px;
    background-color: #fff;
    padding: 20px 20px;

    border-radius: 25px;

    position: fixed;
}

section.resultado div.titulo > h1 {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-size: 1.8rem;   
    color: #354064;
}

section.resultado div.valor {
    margin-top: 20px;
    width: 300px;
    background-color: #354064;
    padding: 20px 20px;

    display: flex;
    flex-direction: row;
    gap: 5px;

    border-radius: 25px;

    position: fixed;
    top: 170px;

    
}

section.resultado div.barra-fake {
    width: 300px;    
}



section.resultado div.valor > p {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-size: 1.2rem;   
    color: #fff;
}

/* section.resultado div.lista {
    color: #fff;
    width: 300px;
    padding: 20px 20px;

    display: flex;
    flex-direction: column;
    gap: 5px;

    position: fixed;
    top: 270px;    
} */

div.container-lista .item {
    margin-top: 7px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;    
    row-gap: 7px;
}

div.gasto-total {
    color: #000000;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 5px;
}

div.gasto-total span {
    font-weight: bold;
}

@media (max-width: 1040px) {
    main { 
        display: flex;
        flex-direction: column-reverse;
        justify-content: center;
        align-items: center;
        padding: 10px;
    }

    section.resultado div.titulo {
        position: relative;
        width: 300px;
    }
    
    section.resultado div.valor {
        position: relative;
        top: 0px;
        width: 300px;
    }

    section.resultado div.lista {
        position: relative;
        top: 0px;
        display: none;
    }

    section.resultado div.barra-fake {
        position: relative;
        display: none;
    }

    div.infos-resultado {
        position: fixed;
        background-color: #A8DBA8;
        width: 100vw;
        top: 0;
        left: 0;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: black;
        padding: 20px 20px;

    }

    section.produtos {
        margin-top: 240px;
    }

    section.produtos {
        max-width: 600px;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    div.btn button.nota {
        bottom: 40px;
        right: 25px;
    }

    main section.nota-fiscal {
        width: 300px;
    }

    div.lista button.fechar {
        left: 240px;
    }

    div.lista div.container-lista div.item > p {
        font-size: 0.8rem;
    }

    div.gasto-total div.total {
        font-size: 0.9rem;
    }

    div.gasto-total > p {
        font-size: 0.9rem;
    }

}

section.nota-fiscal {
    display: none;
    width: 370px;

    /* adcionando animação de abertura do pop-up */
    animation: open 0.8s forwards;
}



@keyframes open {
    0% { 
        transform: scale(0);
    }
    50% { 
        transform: scale(1.2);
    }
    70% { 
        transform: scale(0.95);
    }
    100% { 
        transform: scale(1);
    }
}



section.nota-fiscal .lista {
    background-color: #fff;
    padding: 30px 30px;
    border-radius: 25px;
    box-shadow: 5.21689px 7.30364px 5.21689px rgba(0, 0, 0, 0.03);

}

div.btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

button.nota {
    bottom: 100px;
    position: fixed;    
    background-color: #1FAA6F;
    border-radius: 100px;
    padding: 12px 20px;
    color: #FFFFFF;
    font-size: 1rem;

    display: none;
    justify-content: center;
    align-items: center;
    gap: 7px;
    
    /* aplicando animação de pulse */
    transform: scale(1);
    animation: pulse 2s infinite;
}

/* criando animação de pulse */
@keyframes pulse {
    0% {
      transform: scale(0.95);
      box-shadow: 0 0 0 0 #1faa70b0;
    }
    
    70% {
      transform: scale(1);
      box-shadow: 0 0 0 10px rgba(24, 127, 52, 0);
    }
    
    100% {
      transform: scale(0.95);
      box-shadow: 0 0 0 0 rgba(31, 133, 85, 0);
    }
  }


button.nota img {
    width: 20px;
}

p.nome-nota {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;

    color: #14133F;

    margin-top: -30px;
    margin-bottom: 20px;
}

div.container-lista div.item > p {
    font-size: 0.9rem;
}

div.container-lista > div.item::after {
    content: '';
    width: 100%;   

    border-top: 0.9px dashed #8B8B8B;
    display: block;
    margin: 0 auto;

    opacity: 0.4;
}

button.fechar {
    top: -41px;
    left: 315px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    position: relative;
    background-color: #354064;
    color: #fff;
    font-weight: bold;
}

div.item p:nth-child(1) {
    min-width: 10%;
}

div.item p:nth-child(2) {
    max-width: 40%;    
}

div.item p:nth-child(3) {
    min-width: 50%;
    text-align: right;
    flex-grow: 1;
    font-weight: bold;
}


div.total {
    font-weight: bold;
    margin-top: 12px;
    margin-bottom: 5px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    color: #000000;
}
