@import url("form.css");
@import url("button.css");
@import url("nav.css");
@import url("account.css");
@import url("transaction.css");
@import url("category.css");

body  {
    margin: 0%;

    overflow: hidden;
}

/* Titles */
h1 {
    font: bold 2.4em "arial-black", Arial, sans-serif;
}

/* Icons */
.icon {
    width: 30px;
    height: 30px;
    /*padding-top: 6px; pour la fin*/
}

/* Amounts */
#balance {
    filter: invert(1);
    color: deepskyblue;
}
#revenues {
    filter: invert(1);
    color: green;
}
#expenses {
    filter: invert(1);
    color: red;
}

/* Login and register pages */
#main_login {
    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background-color: aliceblue;
}
#body_login {
    width: 325px;
    padding: 3%;

    display: flex;
    flex-direction: column;
    align-items: center;

    background-color: white;
    border-radius: 14px;
    box-shadow: 0px 0px 7px 2px rgba(0, 0, 175, 0.1);
}
#login_links {
    width: 100%;

    margin-top: 10%;

    display: flex;
    justify-content: center;    
    gap: 5px;
    box-sizing: border-box;
}
#body_login > h1 {
    color: rgb(60, 71, 77);
}

/* Home page */
#main_home {
    height: 100%;

    display: grid;
    flex-direction: column;
    align-items: center;
    justify-items: center;
    
    color: white;
    background: radial-gradient(circle at 100% 50%, rgb(22, 88, 168) 10%, rgb(9, 37, 71) 45%);
    overflow: hidden;
}
#body_home {
    width: 100%;

    display: grid;
    justify-items: center;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 200px;
    text-align: center;
}
#body_home > .card {
    width: 200px;
    height: 200px;

    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;

    filter: invert(1);
    background-image: url("/public/images/icones/carte-de-credit.png");
    background-size: 200px 200px;
    font: bold 1.1em "arial-black", Arial, sans-serif;
}
#body_home > .card > .amount_title {
    height: calc(100% - 5px);

    padding-top: 5px;

    display: flex;
    align-items: center;
    justify-content: center;
}
#body_home > .card > .amount {
    height: calc(100% - 21px);
    width: calc(100% - 25px);
    padding-top: 21px;
    padding-left: 25px;

    display: flex;
    align-items: flex-start;
    justify-content: center;
}
#body_home > .accounts {
    height: 100%;
    width: 100%;
    
    grid-column: 2;
    grid-row: 2 / 4;
    display: flex;
    flex-direction: column;
    justify-self: start;
    align-self: center;
    gap: 20px;
    
    overflow: auto;
}
#home_title {
    font-size: 3.2rem;
}
#body_home > .message {
    align-self: center;
    justify-content: start;
}

/* Inputs page */
#body_inputs {
    height: 100%;

    display: grid;
    grid-template-rows: 5fr 1fr 100px;
    gap: 20px;
    justify-items: center;
}
.transactions {
    height: fit-content;
    max-height: 75vh;
    padding: 45px;

    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;

    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
}
#body_inputs > form {
    position: fixed;
    bottom: 0;
    padding: 25px;
    
    display: flex;
    flex-direction: row;
    align-items: center;

    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
}
#body_inputs > form > input, #body_inputs > form > div > input {
    border-bottom: none;
    font: 0.9em "arial-black", Arial, sans-serif;
}
#body_inputs > form > .input  {
    min-width: 50px;
    width: 100%;
    display: flex;
}  
#body_inputs > form > .input > input[type="number"] {
    text-align: center;
} 
#body_inputs > form > .input > input[type = "text"] {
    width: 280px;
}
#overflow {
    padding-right: 14px;
    padding-left: 14px;

    overflow: auto;
    scroll-snap-type: y mandatory;
}
table, td, th {
    padding: 7px;

    border: 1px solid black;
    border-collapse: collapse;
    font: 1em "arial-black", Arial, sans-serif;
    scroll-snap-align: end;
}
table {
    border: none;
}
table:hover {
    cursor: crosshair;
}
thead {
    position: sticky;
    top: 0;

    color: white;
    background-color: deepskyblue;
}
th {
    border: 2px solid deepskyblue;
    font: bold 1em "arial-black", Arial, sans-serif;
}


/* Template menus */
#main_account {
    display: grid;
    grid-template-columns: 14vw  86vw;

    background-color: aliceblue;
}
#body_account {
    height: 100vh;
    padding: 25px;

    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;

    overflow: scroll;
}
#body_account .message {
    color: black;
    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
}

/* Page summary */
#body_summary {
    width: 100%;
    height: 100%;
    
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: minmax(60px, 80px) repeat(4, auto);
    gap: 25px;
}
#body_summary > h1 {
    grid-column: 1 / 3;

    justify-self: center;

    color: rgb(60, 71, 77);
}
#body_summary > .block_amount {
    width: 9vw;
    height: 9vw;
    padding: 20px;

    grid-column: 1;
    display: grid;
    grid-template-rows: 1fr 7fr;
    text-align: center;
    box-sizing: border-box;

    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
    font: bold 1em "arial-black", Arial, sans-serif;
}
#body_summary > #permonth {
    padding: 45px;

    grid-column: 2;
    grid-row: 2 / 6;
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-template-rows: auto 1fr;
    justify-items: center;
    align-items: center;

    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
}
#body_summary > #permonth > .mblock_amount {
    width: 20vw;
    height: 5vw;
    padding: 20px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: center;
    align-items: center;
    box-sizing: border-box;

    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
    font: bold 1em "arial-black", Arial, sans-serif;
}
#body_summary > #permonth > #mtransactions {
    grid-column: 1 / 4;
    grid-row: 2;
}
#body_summary > form {
    width: 9vw;
    height: 10vw;
    margin: 0;

    align-items: center;
    justify-content: center;
    align-self: flex-end;
    
    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
}
#body_summary >  #account_balance {
    color: white;
    background-color: deepskyblue;
}
#body_summary > #account_balance > .amounts {
    border: 3px solid white;
}
#account_expenses > .amounts {
    color: red;
}
#account_revenues > .amounts {
    color: green;
}
#account_mbalance > .amounts {
    color: white;
    background-color: deepskyblue;
}
#body_summary .amounts {
    padding: 10px;

    align-self: center;
    box-sizing: border-box;

    border: 3px solid deepskyblue;
    border-radius: 25px;
}

/* Details */
#body_details {
    display: grid;
    grid-template-rows: minmax(60px, 80px) repeat(2, 42vh);
    justify-items: center;
    align-items: center;
}
#body_details > #detailed {
    height: fit-content;
    max-height: 41vh;
    padding: 25px;

    display: flex;
    box-sizing: border-box;

    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
}
#amount_case {
    min-width: 90px;
    max-width: 90px;
    box-sizing: border-box;
}
tbody > .cat_level_1 {
    font: bold 1.1em "arial-black", Arial, sans-serif;
}
tbody > #cat_level_1 {
    background-color: rgba(0, 191, 255, 0.3);
}
tbody > .cat_level_2 {
    font: bold 0.9em "arial-black", Arial, sans-serif;
    background-color: rgba(138, 158, 165, 0.082);
}
tbody > .cat_level_3 {
    font: bold 0.65em "arial-black", Arial, sans-serif;
}
tbody > .cat_level_4 {
    font: bold 0.6em "arial-black", Arial, sans-serif;
}
tbody > .cat_level_5 {
    font: bold 0.55em "arial-black", Arial, sans-serif;
}
tbody > .cat_level_6 {
    font: bold 0.50em "arial-black", Arial, sans-serif;
}
tbody > .cat_level_7 {
    font: bold 0.45em "arial-black", Arial, sans-serif;
}
tbody > .cat_level_8 {
    font: bold 0.40em "arial-black", Arial, sans-serif;
}
tbody > .cat_level_9 {
    font: bold 0.35em "arial-black", Arial, sans-serif;
}
tbody > .cat_level_10 {
    font: bold 0.30em "arial-black", Arial, sans-serif;
}
tbody > .cat_level_2 > td {
    padding-left: 12px;
}
tbody > .cat_level_3 > td {
    padding-left: 15px;
}
tbody > .cat_level_4 > td {
    padding-left: 17px;
}
tbody > .cat_level_5 > td {
    padding-left: 20px;
}
tbody > .cat_level_6 > td {
    padding-left: 25px;
}
tbody > .cat_level_7 > td {
    padding-left: 30px;
}
tbody > .cat_level_8 > td {
    padding-left: 35px;
}
tbody > .cat_level_9 > td {
    padding-left: 40px;
}
tbody > .cat_level_10 > td {
    padding-left: 45px;
}
tbody > tr > .total {
    color: white;
    background-color: deepskyblue;
    border: 1px solid deepskyblue;
    font-weight: bold;
}
tbody > tr > .revenues {
    color: green;
}
tbody > tr > .expenses {
    color: red;
}
tbody > .spacer > td {
    border: none;
}

/* Catégories */
#body_categories {
    display: grid;
    justify-items: center;
    gap: 20px;
}
#body_categories > form {
    position: fixed;
    bottom: 0;
    padding: 15px;

    display: grid;
    grid-template-columns: 3fr 2fr 1fr;

    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);
}
#body_categories > form > input, #body_categories > form > div > input {
    border-bottom: none;
    font: 0.9em "arial-black", Arial, sans-serif;
}
#body_categories > form > .input  {
    width: 100%;
    display: flex;
}
#body_ctaegories > form > .input > input[type = "text"] {
    width: 300px;
}
#categories_display {
    padding: 35px;
    max-height: 530px;

    display: grid;
    gap: 20px;

    background-color: white;
    border-radius: 17px;
    box-shadow: 0px 0px 7px 5px rgba(0, 0, 175, 0.1);

    overflow: scroll;
}
#categories_display > .first_cat {
    height: fit-content;
}

/* Add account page */
#body_add_account {
    width: 350px;
    padding: 40px;

    display: flex;
    flex-direction: column;

    color: black;
    background-color: white;
    border-radius: 21px;
    box-shadow: -1px 0px 7px 3px rgba(1, 3, 8, 0.5);
}
#body_add_account .message {
    color: black;
}



