@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}
a {
  text-decoration: none;
}
.logo {
  color: #fff;
  cursor: pointer;
}
.App {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header,
.footer {
  padding: 20px;
  text-align: center;
  background-color: #4338ca;
  color: whitesmoke;
}

.main {
  flex-grow: 1;
  display: flex;
}

.container {
  width: 90%;
  max-width: 1024px;
  margin: 20px auto;
}

.homepage-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: center;
}

.top_card {
  background-color: #4338ca;
  color: white;
  padding: 10px 20px;
  min-width: 400px;
}

.top_card p {
  color: #d6d6d6;
  margin-bottom: 5px;
  font-size: 0.8rem;
}

.top_card h3 {
  font-size: 2rem;
}

.form {
  background-color: #f5f5f5;
  padding: 20px;
  width: 400px;
}

.form-group {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.radio {
  grid-template-columns: 1fr 1fr 1fr;
}

input {
  padding: 8px 12px;
}

.form-input {
  border: none;
  border-radius: 5px;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
  outline: none;
}

.btn {
  width: 100%;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px;
  background-color: #4338ca;
  color: white;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #094d3d;
}

ul {
  list-style: none;
  width: 400px;
}

label {
  display: block;
  align-self: center;
}

.radio_group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.transaction {
  margin: 10px 0;
  color: white;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.income {
  background-color: #4338ca;
}

.expense {
  background-color: #e6425e;
}

.transaction .right {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.link {
  background: none;
  color: white;
  cursor: pointer;
  outline: none;
  border: none;
  transition: color 0.3s ease;
}

.link:hover {
  color: #d1f3ff;
}

.icon {
  width: 14px;
  height: 14px;
}

.right {
  display: inline-flex;
  gap: 10;
}

.right p {
  font-size: 1.3rem;
}

.red {
  background-color: #e6425e !important;
}

.cancel_edit {
  /* display: none; */
  margin-top: 10px;
  background-color: #e6425e !important;
}

.cancel_edit:hover {
  background-color: #9e1028 !important;
}

.second_heading {
  margin: 20px 0;
  text-align: left;
}

.conatiner_of_list_of_transactions ul {
  max-height: 500px;
  overflow-y: auto;
}
.loading {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin: 1rem auto;
}
.error {
  font-size: 1rem;
  text-align: center;
  margin: 1rem auto;
  color: red;
}
@media (max-width: 450px) {
  .top_card,
  .form {
    min-width: 90%;
    width: 90%;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: stretch;
  }

  label {
    align-self: flex-start;
    margin-bottom: 5px;
  }

  .conatiner_of_list_of_transactions {
    width: 90vw;
  }

  ul {
    width: 90vw;
    max-height: 100px;
    overflow-y: auto;
  }

  .transaction {
    width: 100%;
    margin: 10px auto;
  }

  * {
    font-size: 95% !important;
  }
}

/* all transaction page */
.transactions-page {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.all-transactions {
  flex-grow: 1;
}

.show-all {
  width: 100%;
  display: block;
  margin-inline: auto;
  margin-top: 40px;
  padding: 10px;
  font-size: 20px;
  cursor: pointer;
  background: #f35500;
  border: none;
  color: #fff;
}
.show-all:hover {
  background: #de4f02;
}
/* header */
.filter-section {
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}
@media (max-width: 667px) {
  .filter-section {
    flex-direction: column;
  }
}
.search {
  display: flex;
  align-items: center;
  border: 1px solid rgb(140, 140, 140);
  padding: 5px 8px;
  border-radius: 8px;
  gap: 10px;
}
.search input {
  border: none;
  outline: none;
  flex-grow: 1;
}
.search button {
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search button > img {
  width: 30px;
}

.pagination {
  margin-left: auto;
  margin-top: 30px;
}

.page-button {
  padding: 5px 10px;
  font-size: 20px;
  margin-inline: 5px;
  cursor: pointer;
  border-radius: 8px;
  background: none;
  border: 2px solid #f35500;
  color: #f35500;
}
.selected {
  color: #fff;
  background-color: #f35500;
}

.edit-form-container {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.clear-filter-section {
  margin-block: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.single-filter {
  display: flex;
  flex-shrink: 1;
  gap: 20px;
  align-items: center;
  border: 1px solid #ddd;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
  border-radius: 8px;
  padding: 8px 12px;
}

.close-icon {
  width: 25px;
  cursor: pointer;
}

/* css loading animation */
.loading-container {
  width: 100%;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lds-ring {
  display: inline-block;
  position: relative;

  overflow: hidden;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 64px;
  height: 64px;
  margin: 8px;
  border-style: solid;
  border-width: 8px;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #fff transparent transparent transparent;
}
.lg {
  width: 80px;
  height: 80px;
}
.lg div {
  width: 64px;
  height: 64px;
  border-width: 8px;
}
.sm {
  width: 40px;
  height: 40px;
}
.sm div {
  width: 32px;
  height: 32px;
  margin: 4px;
  border-width: 4px;
}
.xsm {
  width: 26px;
  height: 26px;
}
.xsm div {
  width: 24px;
  height: 24px;
  margin: 2px;
  border-width: 4px;
}
.center {
  margin: 0 auto;
}
.dark div {
  border-color: #000 transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
