@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --back-colo: #f6f8fa;
  --text-colo: #1d1f27;
  --main-colo: linear-gradient(to right, #005c97, #363795);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  padding: 1rem;
  font-family: "Poppins", sans-serif;
  background-color: rgb(238, 238, 238);
  color: var(--text-colo);
}
li {
  list-style-type: none;
}
h1,
h2,
h3 {
  text-align: center;
}

h3,
li {
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
}
h3 {
  font-family: "Montserrat", serif;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 2px;
}
main {
  max-width: 400px;
  margin: 1rem auto;
  /* border: 1px solid black; */
  background-color: #fff;
  padding: 1rem;
  border-radius: 25px;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px,
    rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px,
    rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}
header {
  text-align: center;
  padding: 1rem;
  background: var(--main-colo);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  box-shadow: rgba(41, 104, 39, 0.12) 0px 2px 4px 0px,
    rgba(14, 30, 37, 0.32) 0px 2px 16px 0px;
  border-radius: 25px;
  margin-bottom: 1rem;
}
header div {
  padding: 5px;
}
header div:first-child {
  width: 100%;
  font-size: 2.4rem;
  font-weight: 700;
}
header div:nth-child(n + 2) {
  width: 50%;
  font-size: 1.2rem;
  font-weight: 600;
}
#status {
  text-align: center;
  margin-bottom: 0.5rem;
  font-family: "Montserrat", serif;
}
ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgb(201, 201, 201);
  border-radius: 15px;
  position: relative;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  font-size: 1.1rem;
}
ul li:hover {
  background: rgba(0, 0, 0, 0.1);
}
.name {
  flex: 1;
}
.name h4 {
  font-size: 1rem;
  font-weight: 600;
  text-transform: capitalize;
}
.name p {
  font-size: 0.8rem;
  color: #555;
}
.amount {
  font-weight: 600;
}
.amount.income {
  color: green;
}
.amount.expense {
  color: indianred;
}
.action {
  position: absolute;
  top: 0;
  right: 0;
  background-color: rgb(230, 28, 28);
  color: #fff;
  height: 100%;
  width: 50px;
  display: grid;
  place-items: center;
  transform: scaleX(0);
  transition: all 300ms;
  transform-origin: right;
  border-radius: 20px;
}
ul li:hover .action {
  transform: scaleX(1);
}
.action svg {
  height: 35px;
  width: 35px;
  cursor: pointer;
}
header h5 {
  font-size: 0.7rem;
  font-weight: 400;
  font-family: "Montserrat", serif;
  text-transform: uppercase;
  letter-spacing: 3px;
}
form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
form input:not(#type),
form button {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid rgb(197, 197, 197);
  border-radius: 5px;
  margin-bottom: 5px;
  height: 40px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-colo);
}
form button:active {
  background-color: linear-gradient(to right, #363795, #005c97);
}
form label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}
form button {
  background: var(--main-colo);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}
form div:nth-child(-n + 2) {
  flex-basis: 100%;
}
form div:nth-child(n + 3) {
  flex-basis: calc(50% - 5px);
}
#trx-input {
  margin-bottom: 1.2rem;
}
input#type {
  appearance: none;
  position: absolute;
}
input {
  outline: none;
}
.option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #dfdfdf;
  border-radius: 10px;
  position: relative;
}
.option span {
  width: 50%;
  text-align: center;
  cursor: pointer;
  z-index: 10;
}
.option::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  background-color: #fff;
  height: calc(100% - 10px);
  width: calc(50% - 10px);
  transform: translateX(5px);
  border-radius: inherit;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  transition: all 400ms ease-in-out;
}
input#type:checked ~ .option::before {
  left: 50%;
}
