/* BASIC RESETS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* GENERAL STYLES */
body {
  font-family: "Poppins";
  min-height: 100vh;
  background: linear-gradient(to bottom, #09a893, #ffffff);
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  background-color: white;
  padding: 1rem;
  border-radius: 1rem;
  width: 100%;
  max-width: 1200px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

/* BALANCE CONTAINER */

#balance {
  background: linear-gradient(-45deg, #1a7c43, #c4e2d3);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#global-balance {
  font-size: 0.75rem;
}

#global-amount {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.income-expenses {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.income,
.expences {
  width: 50%;
  background-color: white;
  font-size: 0.5rem;
  padding: 1rem;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
}

.income:hover,
.expences:hover {
  transform: scale(1.05);
}

.income {
  color: rgb(24, 156, 134);
}

.expences {
  color: rgb(202, 28, 28);
}

.income p,
.expences p {
  font-size: 1rem;
  font-weight: 700;
}

/* TRANSACTIONS CONTAINER */
.transactions {
  display: flex;
  flex-direction: column;
}

.history-transaction {
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  max-height: 500px;
}

.history-transaction h3 {
  margin-bottom: 20px;
  margin-left: 20px;
}

.transaction-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* STYLING THE SCROLL BAR */
.transaction-list::-webkit-scrollbar {
  width: 8px;
}

.transaction-list::-webkit-scrollbar-track {
  background-color: #f1f1f1;
  border-radius: 4px;
}

.transaction-list::-webkit-scrollbar-thumb {
  background-color: #cbd5e0;
  border-radius: 4px;
}

.transaction-list::-webkit-scrollbar-thumb:hover {
  background-color: #a0aec0;
}

.add-transaction {
  background-color: rgb(245, 239, 239);
  border-radius: 1rem;
  padding: 1rem;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.transaction {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  height: 60px;
  padding: 1rem 1.2rem;
  margin-bottom: 12px;
  border-radius: 12px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0px);
  }
}

.transaction:hover {
  transform: translateX(4px);
}

.transaction.income-trans {
  border-right: 5px solid #059669;
}

.transaction.expences-trans {
  border-right: 5px solid #dc2626;
}

.transaction-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.transaction .delete-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0;
  padding: 0 6px;
  border-radius: 4px;
  margin-left: 12px;
  transition: all 0.2s ease;
}

.transaction:hover .delete-btn {
  opacity: 1;
}

.transaction .delete-btn:hover {
  background-color: #fee2e2;
  transform: scale(1.1);
}

label {
  font-size: 0.75rem;
  font-weight: 600;
}

input {
  font-family: inherit;
  padding: 0.1rem 0.5rem;
  margin: 5px 0 5px 5px;
  width: 100%;
  border: 2px solid #e2e8f0;
  transition: all 0.2s ease;
}

input:focus {
  outline: none;
  border-color: #667eea;
}

.note {
  font-size: 0.5rem;
  margin-left: 10px;
}

button {
  margin: 20px auto;
  font-family: inherit;
  width: 100%;
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background-color: #119749;
  color: white;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  transform: scale(1.02);
}

button:active {
  transform: scale(1);
}

/* MEDIA QUERIES */
@media screen and (min-width: 768px) {
  .transactions {
    margin-top: 1rem;
    flex-direction: row;
    gap: 1rem;
  }
  #transaction-form {
    height: 100%;
  }
}

/*  2.44 - 3.07  */
