@import url('https://fonts.googleapis.com/css2?family=Open+Sans&family=PT+Sans+Caption:wght@400;700&display=swap');

/* Global */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-size: 120%;
  font-family: 'Open Sans', sans-serif;
}

button, input, select {
  font-size: 100%;
}

/* Navbar */
.navbar {
  font-family: 'PT Sans Caption', sans-serif;
  color: #463f3a;
  background-color: #bcb8b1;
  padding-left: 10px;
  padding-right: 20px;
  margin-bottom: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.total {
  font-size: 150%;
  text-decoration: underline;
}

/* Main container */
.wrapper {
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

aside {
  width: 60%
}

/* Transaction Input */
.form {
  margin-top: 25px;
  width: 100%;
}

/* Table */
table {
  width: 100%;
}

td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #dddddd;
}

#date {
  width: 10%;
}

.error {
  color: red;
}

.transactions {
  text-align: left;
  overflow: auto;
  width: 90%;
  margin: 0 auto;
}

.td-data {
  position: relative;
}

.delete {
  display: none;
}

.td-data:hover .delete {
  display: block;
}

.delete {
  position: absolute;
  top: -3px;
  right: 4px;
  font-size: 16px;
  color: rgba(0,0,0,.2);
}

i:hover {
  cursor: pointer;
}

/* Chart */
.chart-container {
  position: relative; 
  height:20vh; 
  width:40vw;
  display: flex;
  flex-direction: column;
}

/* Media Query's */
/* ============= */
@media (max-width: 480px) {
  .navbar {
    align-items: center;
    flex-direction: column;
  }

  .navbar h1 {
    margin: 10px;
}
  .total {
    font-size: calc(20px + 2vw);
    margin-bottom: 5px;
  }
}

@media (max-width: 768px){
  .wrapper {
    margin: 0 auto;
    max-width: 825px;
    text-align: center;
    display: block;
  }

  .chart-container {
    width:100%;
  }
  
  aside {
    width: 100%
  }
}