/*
 !important -> vai considerar aquele valor o mais importante da cascata
*/
:root{
    --dark-blue: #363F5F;
    --green: #49AA26;
    --green-light: #3dd705;
}
*{ /*seletor univrsal*/
    margin: 0;
    padding: 0;
    box-sizing: border-box; /*medida da caixa*/
}
html{
    font-size: 93.75%; /*15px */
}
.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    border: solid 1px red;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}
body{
    background: #f0f2f5;
    font-family: 'Poppins', sans-serif;
}
.container{
    width: min(90vw, 800px); /*função*/
    margin: auto;
}
h2{
   margin-top: 3.2rem; 
   margin-bottom: 0.8rem;
   color:  var(--dark-blue);
   font-weight: normal;
}
a{
    color: var(--green);
    text-decoration: none;
}
a:hover{
    color: var(--green-light);
}
.button.new{
    display: inline-block;
    margin-bottom: .8rem;
}
button{
    width: 100%;
    height: 50px;
    border: none;
    border-radius: .25rem;
    color: #fff; 
    background: var(--green);   
    padding: 0;
    cursor: pointer;
}
button:hover{
    background: var(--green-light);
}
.button-cancel{
    color: #e92929;
    border: 2px #e92929 solid;
    border-radius: .24rem;
    height: 50px;    
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;    
}
.button-cancel:hover{
    opacity: 1;
    color: #e92929;
}

/* HEADER ==============================*/
header{
    background: #2D4A22;
    padding: 2rem 0 10rem; /*topo direita baixo esquerda*/
    text-align: center;
}
header h1#logo{
    color: #fff;
    font-weight: 100; /*peso da font*/
}

/* BALANCE ==============================*/
#balance{
    margin-top: -6rem;
}
#balance h2{
    color: #fff;
    margin-top: 0;   
}

/* CARDS ==============================*/
.card{
    color: var(--dark-blue);
    background: #fff;
    padding: 1.5rem 2rem; /*cima/baixa laterais*/
    border-radius: .25rem;
    margin-bottom: 2rem;
}
.card h3{
    font-weight: normal;
    font-size: 1rem;
    display: flex;
    align-items: center; /*Alinhamento do eixo x*/
    justify-content: space-between;
}
.card p{
    font-size: 2rem;
    line-height: 3rem; /*separação de uma linha para outra*/
    margin-top: 1rem;
}
.card.total{
    background: var(--green);
    color: #fff;
}

/* TABLE ==============================*/
#transaction{
    display: block; 
    width: 100%;   
    overflow-x: auto;  
}
#data-table{    
    width: 100%;   
    border-spacing: 0 0.5rem;        
    color: #969cb3;      
}
#data-table tbody tr{
    opacity: 0.7;
}
#data-table tbody tr:hover{
    opacity: 2;
}
#data-table thead th{
    background: #fff;    
    font-weight: normal;
    text-align: left;
    padding: 1rem 2rem;
}
#data-table tbody td{
    background: #fff;
    border-spacing: 0 0.5rem;/*borda da tabela*/
    padding: 1rem 2rem;
    font-weight: normal;
}
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;
}
td.description{
    color: var(--dark-blue);
}
td.income{
    color: #12a454;
}
td.expense{
    color: #e92929;
}

/* MODAL ==============================*/
.modal-overlay{
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: space-around;
    opacity: 0;
    visibility: hidden; /*n ocupa o espaço na tela*/
    z-index: 1;
}
.modal-overlay.active{
    opacity: 1;
    visibility: visible; /*n ocupa o espaço na tela*/
}
.modal{
    position: relative;
    background: #F0F2f5;    
    padding: 2.4rem;
    max-width:90%;
    width: 500px;
}

/* FORM MODAL ==============================*/
#form{
    max-width: 500px;   
}
#form h2{
    margin-top: 0;
}
input{
    border: none;
    border-radius: .2rem;
    padding: 0.8rem;
    width: 100%;
}
.input-group{
    margin-top: .8rem;    
}
.input-group small{
    opacity: 0.6;

}
.input-group.actions{
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.input-group.actions .button,
.input-group.actions button{
    width: 48%;
}

/* FOOTER ==============================*/
footer{
    text-align: center;
    padding: 4rem 0 2rem;
    color: var(--dark-blue);
    opacity: 0.6;
}
/* Responsive ==============================*/
@media (min-width: 800px){ /*a partir de 800*/
    html{
        font-size: 87.5%; /*14px*/
    }
    #balance{
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 1fr 1fr 1fr3 colunas*/
        gap: 1rem; /*espaço entre as colunas*/
    }
}
