@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,400;0,700;1,100;1,400;1,700&display=swap');
:root {
  --dark-blue: #363f5f;
  --green: #49AA26;
  --light-green: #52be2b;
  --red: #e92929;
}

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

html {
  font-size: 87.5%;
}

body {
  background: #f0f2f5;
  font-family: 'Poppins', sans-serif;
  /* display: grid;
  height: 100vh;
  grid-template-rows: auto 1fr auto; */
}

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

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

/* TITLES =========== */

h2 {
  font-weight: 400;
  color: var(--dark-blue);
  margin-top: 3.2rem;
  margin-bottom: 0.8rem;
}

/* LINKS and BUTTON ========= */

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

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

.button.new {
  display: inline-block;
  margin-bottom: 0.8rem;
}
button{
  width: 100%;
  height: 50px;
  border: none;
  color: white;
  background: var(--green);
  border-radius: 0.25rem;
  cursor: pointer;
  padding: 0;

}
button:hover {
  background: var(--light-green);
}
.button.cancel{
  border: 2px solid var(--red);
  border-radius: 0.25rem;
  color: var(--red);
  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 {
  width: 80%;
  max-width: 350px;
}

/* BALANCE ========== */

#balance {
  margin-top: -5rem;
}

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

/* CARDS =========== */

.card {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: .4rem;
  margin-bottom: 2rem;
  color: var(--dark-blue);
}

.card h3 {
  font-size: 1rem;
  font-weight: normal;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.positive {
  background: var(--green);
  color: white;
}
.negative {
  background: var(--red);
  color: white;
}

/* TABLE ======== */

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

#transaction {
  display: block;
  overflow-x: auto;
}

table th:first-child, table td:first-child {
  border-radius: 0.4rem 0 0 0.4rem;
}

table th:last-child, table td:last-child {
  border-radius: 0 0.4rem 0.4rem 0;
}

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

table tbody tr {
  opacity: 0.7;
}

table tbody tr:hover {
  opacity: 1;
}

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

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

td.income {
  color: #12a454
}

td.expense {
  color: var(--red)
}

/* MODAL ========= */

.modal_overlay {
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  position: fixed;
  top: 0;

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

  visibility: hidden;
  opacity: 0;
  z-index: 2;
}
.modal_overlay.active{
  visibility: visible;
  opacity: 1;
}

.modal {
  background: #f0f2f5;
  padding: 2.4rem;
  position: relative;
}

.modal-content {}

/* FORM ============ */
#form {
  max-width: 500px;
}
#form h2{
  margin-top: 0;
}
input{
  border: none;
  border-radius: .25rem;
  padding: .8rem;
  width: 100%;
}
.input-group{
  margin-top: 0.8rem;
}
.input-group small{
  opacity: 0.4;
}
.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;
  font-size: .7rem;
}

footer a {
  text-decoration: none;
  color: var(--dark-blue);
}
footer p {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ICONS ======== */

.feather-minus-circle{
  cursor: pointer;
}

.income {
  color: var(--green);
}

.outcome, .delete {
  color: var(--red);
}

/* RESPONSIVE ======== */

@media(min-width: 800px) {
  html {
    font-size: 81.25%;
  }
  #balance {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
  footer p {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }
}