:root{
    --roxo : #472562;
    --dark-blue: #363f5f;
    --greem-1: #49aa26;
    --greem-2: #3dd705;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body{
    height: 100vh;
    background-color: rgb(247, 247, 247);
}

/* Header */

header{
    width: 100%;
    height: 80px;
    background-color: var(--roxo);
    display: flex;
    justify-content: center;
    align-items: center;
}

header h1{
    color: white;
    font-size: 22px;
    letter-spacing: 3px;
    font-weight: 600;
}

/* Main */

main {
    width: 100%;
    background-color: rgb(247, 247, 247);
    margin: 25px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

main .container{
    position: relative;
    width: min(90%, 700px);
    height: 95%;
}
.container .add-box form{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container .add-box input[type="text"],
.container .add-box input[type="number"]{
    height: 60px;
    padding-left: 8px;
    font-size: 18px;
    border: 1px solid rgb(235, 235, 235);
    border-radius: 5px;
    
}

.container .add-box #produto{
    width: min(60%, 90%);
}
.container .add-box #qnt{
    width: 10%;
    margin: 0 5px;
}
.container .add-box #valor{
    width: 30%;
}

.container .add-box button{
   width: 90px;
   height: 60px;
   margin-left: 5px;
   font-size: 21px;
   color: white;
   background-color: rgb(44, 167, 28);
   border: 0;
   border-radius: 5px;
   cursor: pointer;
}

/* Modal */

main .modal-overlay{
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    position: fixed;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.modal-overlay.active{
    opacity: 1;
    visibility: visible;
}

main .modal{
    background-color: #f0f2f5;
    padding: 2.4rem;
    margin: 0 2%;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal form{
    width: min(90%, 700px);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;

}

.modal form input[type="text"],
.modal form input[type="number"]{
    height: 50px;
    padding-left: 8px;
    font-size: 18px;
    border: 1px solid #ccc;
    border-radius: 5px;
    
}

.modal form #m-produto{
    width: 90%;
    margin-bottom: 15px;
}
.modal form #m-qnt{
    width: 10%;
    min-width: 50px;
    margin: 0 5px;
}
.modal form #m-valor{
    width: 30%;
}

.modal form button{
   width: 100px;
   height: 50px;
   margin-left: 5px;
   font-size: 21px;
   color: white;
   background-color: rgb(44, 167, 28);
   border: 0;
   border-radius: 5px;
   cursor: pointer;
}

/* Total */

.container .total-box h2{
    font-weight: 400;
    font-size: 18px;
    margin: 15px 0;
    color: var(--roxo);
}
.container .total-box h2 span{
    font-weight: 600;
    font-size: 20px;
}

/* Lista */

#data-table{
    width: min(90%, 700px);
    /* height: calc(100vh - 250px); */
    
    color: #868ca1;
    display: block;
    overflow-x: auto;
    margin: 0 auto;
}
table{
    width: 100%;
    border-spacing: 0 0.5rem;
}
table thead tr th:first-child,
table tbody tr td:first-child{
    border-radius: 0.25rem 0 0 0.25rem;
}
table thead tr th:last-child,
table tbody tr td:last-child{
    border-radius: 0 0.25rem 0.25rem 0;
}

table th{
    background-color: #fff;
    font-weight: 400;
    padding: 1rem 2rem;
    text-align: left;
}

table td{
    background-color: #fff;
    padding: 1rem 2rem;
    text-align: left;
    color: var(--dark-blue);
}

table tbody tr{
    opacity: 0.7;
}

table tbody tr:hover{
    opacity: 1;
}
table tbody td:last-child{
    background-color: rgb(230, 30, 30);
    color: #fff;
    opacity: 1;

}

table .edite,
table .delete{
    text-align: center;
    cursor: pointer;
}



/* Footer */

footer{
    width: 100%;
    height: 40px;
    /* background-color: var(--roxo); */
    /* position: absolute;
    bottom: 0; */
    display: flex;
    justify-content: center;
    align-items: center;
}

footer img{
    width: 70px;
    margin-top: 5px;
    filter: invert(1);
    opacity: 0.6;
}



/* Responsivo */

@media screen and (max-width:570px){
    .container .add-box form{
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
    .container .add-box #produto{
        width: 90%;
        margin-bottom: 10px;
    }
    .container .add-box #qnt{
        min-width: 80px;
    }
    .container .add-box #valor{
        min-width: 120px;
    }
    
}