@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");

html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  background-color: #fff;
}

#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  margin: 0;
  padding: 0;
  color: white;
  background: black;
  font-family: "Outfit", sans-serif;
}

#navbar h1,
#navbar .nav_empty,
#navbar .nav_right {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 33.33%;
}

#navbar h1 {
  font-size: clamp(16px, 1.458vw, 28px);
}

.nav_right {
  gap: 20px;
}

#navbar a {
  position: relative;
  font-size: clamp(16px, 1.458vw, 28px);
  color: #fff;
  text-decoration: none;
  transition: 0.1s;
}

/* copied from somewhere else, can't do this by myself tbh */

#navbar a::after{
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #918aff;
  /* 1. Scale down horizontally to 0 to hide it */
  transform: scaleX(0);
  transform-origin: bottom center; /* Change to "bottom left" to slide from left to right */
  transition: transform 0.1s ease-out;
}

#navbar a:hover::after {
  transform: scaleX(1);
  color: #918aff;
}

#navbar a:hover{
  transition: 0.1s ease-out;
  color: #918aff;
}

#mainWrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-bottom: 100px;
  width: 100%;
}

#tableWrapper {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
}

#incomes h2,
#expenses h2 {
  /* font-size: clamp(20px, 100cqh, 100cqh); */
  font-size: clamp(26px, 1.875vw, 36px);
  font-family: "Outfit", sans-serif;
}

#incomes .header,
#expenses .header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 36px;
  width: 100%;
  column-gap: 20px;
  container-type: size;
  padding-top: 20px;
}

#createExpenseBtn,
#createIncomeBtn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Outfit", sans-serif;
  color: #fff;
  border-radius: 5px;
  height: 120%;
  width: 50%;
  cursor: pointer;
  transition: 0.1s;
  border-width: 0;
}

#createExpenseBtn{
  background-color: rgb(255, 10, 75, 70%);
}

#createExpenseBtn:hover {
  background-color: rgb(255, 10, 75, 100%);
  transition: 0.1s;
}

#createIncomeBtn {
  background-color: rgb(25, 227, 111, 70%);
}

#createIncomeBtn:hover {
  background-color: rgb(25, 227, 111, 100%);
  transition: 0.1s;
}

#createIncomeBtnMobile, #createExpenseBtnMobile{
  display: none;
}

#incomes,
#expenses {
  position: relative;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0px 12px 17px 0px rgba(0,0,0,0.1);
}

#incomeList,
#expenseList {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.incomeName,
.expenseName,
.incomeInput,
.expenseInput {
  display: flex;
  justify-content: left;
  align-items: center;
  border-radius: 5px;
  border-width: 1px;
  padding: 10px;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
  font-weight: 500;
  transition: 0.1s;
  min-height: 40px;
}
.incomeInput,
.expenseInput {
  width: 25%;
}
.currencySelector {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 5px;
  padding: 10px;
  transition: 0.1s;
}

.incomeName:focus,
.expenseName:focus,
.incomeInput:focus,
.expenseInput:focus,
.currencySelector:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px black;
  transition: 0.1s;
}

#totalIncome, #totalExpense, #bruteSavings{
  font-size: clamp(20px, 1.458vw, 28px);
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  field-sizing: content;
  background-color: rgb(255, 255, 255, 100%);
  border: none;
  color: #000000;
}

li {
  position: relative;
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  row-gap: 5px;
  column-gap: 1%;
}

span {
  font-family: "Outfit", sans-serif;
  font-weight: 500;
}

ul {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

li:marker {
  font-family: "Outfit", sans-serif;
}

.selfDestroyBTN {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Outfit", sans-serif;
  color: #fff;
  cursor: pointer;
  background-color: rgb(255, 10, 75, 75%);
  border-radius: 5px;
  border: 0;
  min-height: 40px;
  width: 40px;
  transition: 0.1s;
  box-sizing: border-box;
}

.selfDestroyBTN:hover {
  background-color: rgb(255, 10, 75, 100%);
  color: #fff;
  transition: 0.1s;
}

#resultsWrapper {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 300px;
  gap: 10px;
  border-radius: 5px;
  padding: 10px;
  box-shadow: 0px 12px 17px 0px rgba(0,0,0,0.1);
}

#incomes span,
#expenses span,
.result {
  font-size: clamp(20px, 1.458vw, 28px);
}

.result{
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#createIncomeBtn.mobileBtn, #createExpenseBtn.mobileBtn{
  display: none;
}

/* mobile */

@media screen and (min-width: 1000px) and (max-width: 1200px) {
  #mainWrapper{
    flex-direction: row;
    align-items: baseline;
  }
  #navbar .nav_right {
    justify-content: right;
    padding-right: 30px;
  }

  #navbar .nav_empty {
    display: none;
  }

  #navbar h1 {
    justify-content: left;
    padding-left: 30px;
    width: 50%;
  }

  #tableWrapper {
    flex-direction: column;
  }

  #resultsWrapper{
    width: 400px;
  }
}

@media screen and (min-width: 500px) and (max-width: 999.98px) {
  #mainWrapper{
    flex-direction: column;
  }

  #navbar .nav_right {
    justify-content: right;
    padding-right: 30px;
  }

  #navbar .nav_empty {
    display: none;
  }

  #navbar h1 {
    justify-content: left;
    padding-left: 30px;
    width: 50%;
  }

  h2{
    margin-bottom: 5px;
  }

  #tableWrapper{
    flex-direction: column;
  }

  #incomes, #expenses{
    width: 100%;
    padding: 0;
    padding-bottom: 25px;
    gap: 20px;
  }

  li {
    width: 90%;
  }
  .incomeName,
  .expenseName {
    width: 37.83%;
  }
  .incomeInput,
  .expenseInput {
    width: 30%;
  }

  .currencySelector {
    width: 20%;
  }

  .selfDestroyBTN {
    padding: 0;
    margin: 0;
  }
  #incomeList, #expenseList{
    margin-left: 0;
    padding-left: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    padding-top: 0px;
    margin-top: 0px;
  }

  #createIncomeBtn.desktopBtn, #createExpenseBtn.desktopBtn {
    display: none;
  }

  #resultsWrapper{
    width: 400px
  }

  #financial_result{
    width: 100%;
  }
  #createIncomeBtn.mobileBtn, #createExpenseBtn.mobileBtn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Outfit", sans-serif;
  color: #fff;
  border-radius: 5px;
  min-height: 40px;
  width: 90%;
  cursor: pointer;
  transition: 0.1s;
  border-width: 0;
}

#createIncomeBtn.mobileBtn{
  background-color: rgb(25, 227, 111, 70%);
}

#createExpenseBtn.mobileBtn{
  background-color: rgb(255, 10, 75, 70%);
}

#createIncomeBtn.mobileBtn:hover{
  background-color: rgb(25, 227, 111, 100%);
  transition: 0.1s;
}

#createExpenseBtn.mobileBtn:hover{
  background-color: rgb(255, 10, 75, 100%);
}
}

@media screen and (max-width: 499.98px) {
  #mainWrapper{
    flex-direction: column;
  }

  #navbar .nav_right {
    justify-content: right;
    padding-right: 30px;
  }

  #navbar .nav_empty {
    display: none;
  }

  #navbar h1 {
    justify-content: left;
    padding-left: 30px;
    width: 50%;
  }

  h2{
    margin-bottom: 5px;
  }

  #tableWrapper{
    flex-direction: column;
  }

  #incomes, #expenses{
    width: 100%;
    padding: 0;
    padding-bottom: 25px;
    gap: 20px;
  }

  li {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 90%;
  }
  .incomeName,
  .expenseName {
    min-height: 0;
    height: 36px;
    width: 35%;
  }
  .incomeInput,
  .expenseInput {
    min-height: 0;
    height: 36px;
    width: 29%;
  }

  .currencySelector {
    min-height: 0;
    height: 36px;
    width: 19%;
  }

  .selfDestroyBTN {
    padding: 0;
    margin: 0;
  }
  #incomeList, #expenseList{
    margin-left: 0;
    padding-left: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    padding-top: 0px;
    margin-top: 0px;
  }

  #createIncomeBtn.desktopBtn, #createExpenseBtn.desktopBtn {
    display: none;
  }

  #resultsWrapper{
    width: 400px
  }

  #financial_result{
    width: 100%;
  }
  #createIncomeBtn.mobileBtn, #createExpenseBtn.mobileBtn {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Outfit", sans-serif;
  color: #fff;
  border-radius: 5px;
  min-height: 40px;
  width: 90%;
  cursor: pointer;
  transition: 0.1s;
  border-width: 0;
}

#createIncomeBtn.mobileBtn{
  background-color: rgb(25, 227, 111, 70%);
}

#createExpenseBtn.mobileBtn{
  background-color: rgb(255, 10, 75, 70%);
}

#createIncomeBtn.mobileBtn:hover{
  background-color: rgb(25, 227, 111, 100%);
  transition: 0.1s;
}

#createExpenseBtn.mobileBtn:hover{
  background-color: rgb(255, 10, 75, 100%);
}

}

#financial_result {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.greatFinScore {
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 5px;
  font-size: clamp(14px, 1.041vw, 20px);
  background: rgb(64, 245, 88, 50%);
}
.decentFinScore {
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 5px;
  font-size: clamp(14px, 1.041vw, 20px);
  background: rgb(255, 226, 10, 50%);
}

.alertFinScore {
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 5px;
  font-size: clamp(14px, 1.041vw, 20px);
  background: rgb(245, 64, 72, 50%);
}

.brokeBoy {
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 5px;
  font-size: clamp(14px, 1.041vw, 20px);
  background-color: #000000;
  color: #fff;
}
