/* GLOBAL ============ */
:root {
    --dark-blue: #363F5F;
    --green: #49AA26;
    --light-green: #3DD705;
    --red: #E92929;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 93.75%;
}

body {
    background: #f0f2f5;
    font-family: 'Poppins', sans-serif;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

.container {
    width: min(90vw, 800px);
    margin: auto;
}

/* TITLES ============= */
h2 {
    margin-top: 3.2rem;
    margin-bottom: 0.8rem;
    color: #363F5F;
    font-weight: normal;
}

/* Links e Buttons ============= */
a {
    color: var(--green);
    text-decoration: none;
}

a:hover {
    color: var(--light-green);
}

button {
    width: 100%;
    height: 50px;
    border: none;
    color: #FFF;
    background-color: var(--green);
    padding: 0;
    border-radius: 0.25rem;
    cursor: pointer;
}

button:hover {
    background: var(--light-green);
}

.button.new {
    display: inline-block;
    margin-bottom: 0.8rem;
}

.button.cancel {
    color: var(--red);
    border: 2px var(--red) solid;
    border-radius: 0.25rem;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0.6;
}

.button.cancel:hover {
    opacity: 1;
}

/* HEADER ============= */
header {
    background: #2D4A22;
    padding: 2rem 0 10rem;
    text-align: center;
}

#logo {
    color: #FFF;
    font-weight: 100;
}

/* BALANCE ============= */
#balance {
    margin-top: -8rem;
}

#balance h2 {
    color: #FFF;
    margin-top: 0;
}

/* CARDS ============= */
.card {
    background: #FFF;
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-radius: 0.5rem;
    color: var(--dark-blue);
}

.card h3 {
    font-weight: normal;
    font-size: 1rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card p {
    font-size: 2rem;
    line-height: 3rem;
    margin-top: 1rem;
}

.card.total {
    background: var(--green);
    color: #FFF;
}

/* TRANSAÇÕES ============= */
#transaction {
    display: block;
    width: 100%;
    overflow-x: auto;
}

#data-table {
    width: 100%;
    text-align: left;
    border-spacing: 0 0.5rem;
    color: #969CB3;
}

#data-table thead tr th:first-child,
#data-table tbody tr td:first-child {
    border-radius: 0.25rem 0 0 0.25rem;
}

#data-table thead tr th:last-child,
#data-table tbody tr td:last-child {
    border-radius: 0 0.25rem 0.25rem 0;
}

#data-table thead th, 
#data-table tbody td {
    background: #FFF;
    font-weight: normal;
    padding: 1rem 2rem;
}

#data-table tbody tr {
    opacity: 0.7;
}

#data-table tbody tr:hover {
    opacity: 1;
}

#data-table tbody td.description {
    color: var(--dark-blue);
}

#data-table tbody td.income {
    color: #12A454;
}

#data-table tbody td.expense {
    color: var(--red);
}

#data-table tbody td img.remove {
    cursor: pointer;
}

/* MODAL ============= */
.modal-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    
    position: fixed;
    top: 0;
    z-index: 999;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
}

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

.modal {
    background-color: #F0F2F5;
    padding: 2.4rem;

    position: relative;
    z-index: 1;
}

/* FORM ============= */
#form {
    max-width: 500px;
}

#form h2 {
    margin-top: 0;
}

#form form input {
    border: none;
    border-radius: 0.2rem;
    padding: 0.8rem;
    width: 100%;    
}

.input-group {
    margin-top: 0.8rem;
}

.input-group p {
    font-size: 0.8rem;
    opacity: 0.4;
    text-align: justify;
    margin-top: 0.30rem;
}

.input-group.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-group.actions a,
.input-group.actions button{
    width: 48%;
}

/* FOOTER ============= */
footer {
    text-align: center;
    color: var(--dark-blue);
    padding: 3rem;
    opacity: 0.6;
}

/* Responsive ============= */
@media (min-width: 800px){
    html {
        font-size: 87.5%;
    }

    #balance {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }

}
