/* Global --------------------------- */
:root {
  --dark-blue: #363f5f;
  --green: #49aa26;
  --light-green: #3dd705;
  --red: #e92929;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* color: rgb(207, 187, 0) */
}

html {
  font-size: 93.75%; /* 15px */
}

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

.sr-only { /* Truque para fazer o elemento "invisível", mantendo a acessibilidade */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.container {
  width: min(100vw, 80rem);
  padding: 1rem;
  margin: auto;
  position: relative;
}

/* Header --------------------------- */

header {
  background: #2d4a22;
  padding: 2rem 0 10rem;
  text-align: center;
}

.logo {
  color: #fff;
  font-weight: 100;
}

/* Titles ---------------------------- */

h2 {
  margin-top: 3.2rem;
  margin-bottom: 1.6rem;
  color: var(--dark-blue);
  font-weight: normal;
  text-align: center;
  font-size: 2rem;
}

/* Links & Buttons --------------------------- */

a {
  color: var(--green);
  text-decoration: none;
}

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

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

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

.button.new {
  display: inline-block;
  margin: .8rem 0;
  background: var(--green);
  color: white;
  padding: 1rem;
  border-radius: 0.25rem;
}

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

.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;
}

/* Balance --------------------------- */

.balance {
  margin-top: -8rem;
}

.balance h2 {
  color: white;
}

/* Cards --------------------------- */

.card {
  background: #E3F4F4;
  padding: 1.5rem 2rem;
  border-radius: 0.25rem;
  margin-bottom: 2rem;
}

.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: linear-gradient(to right, rgb(143, 250, 2), var(--light-green)); */
  color: black;
}

/* Table --------------------------- */

.transaction {
  display: block;
  width: 100%;
  margin-bottom: 5rem;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-spacing: 0 0.5rem;
  color: #969cb3;
}

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

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

table thead th {
  background: white;
  font-weight: normal;
  padding: 1rem 2rem;
  text-align: left;
}

table tbody tr {
  opacity: 0.7;
}

table tbody tr:hover {
  opacity: 1;
}

table tbody td {
  background: white;
  padding: 1rem 2rem;
}

td.description {
  color: var(--dark-blue);
}

td.income {
  color: #12a454;
}

td.expense {
  color: #e92929;
}

/* Modal --------------------------- */

.modal-overlay {
  width: 100vw;
  height: 100%;
  background-color: rgba(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;
}

.modal {
  background: #f0f2f5;
  padding: 2.4rem;
  position: relative;
  z-index: 1;
  width: min(100vw, 570px);
}

/* Form --------------------------- */

.form {
  max-width: 500px;
}

.form h2 {
  margin-top: 0;
}

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

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

.transactionTypeBox {
  display: flex;
  justify-content: center;
  align-items: center;
}

.transactionType {
  width: 25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

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

.input-group .help {
  opacity: 0.4;
  display: inline-block;
  width: 100%;
  text-align: center;
}

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

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

.input-group.actions button {
  font-size: 1.2rem;
}

.signal-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Footer --------------------------- */

footer {
  padding: .4rem;
  color: white;
  background: #2d4a22;
  position: fixed;
  width: 100%;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  display: none;
}

/* Responsive ------------------------- */

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

  .balance {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  footer {
    display: flex;
  }
}