@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700;900&display=swap");

/* General */
body {
  --dark-color: #1b1c1e;
  --light-color: #fefdfb;
  --gray-color: #888888;
  --accent-color: #759bd9;
  --dark-overlay: 0.8;
  --light-overlay: 0.2;
  --dark-rgb: 0;
  --light-rgb: 200;
  overflow: auto;
}

body.dark {
  --dark-color: var(--light-color);
  --dark-overlay: var(--light-overlay);
  --light-color: var(--dark-color);
  --dark-rgb: var(--light-rgb);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

img {
  max-width: 100%;
}

body {
  background: var(--dark-color);
  transition: all 0.5s ease-in-out;
  overflow-x: hidden;
  height: 100%;
}

main {
  margin: 0 2rem;
  display: none;
}

button {
  transition: all 0.2s ease-in-out;
}

button:hover {
  transform: scale(1.07);
}

h1 span,
h2 span {
  color: var(--accent-color);
}

/* Background img */

.background-image {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  min-width: 100vw;
  height: 100vh;
}

.background-image img {
  min-width: 100vw;
  height: 100vh;
  object-fit: cover;
}

.background-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(
    var(--dark-rgb),
    var(--dark-rgb),
    var(--dark-rgb),
    var(--dark-overlay)
  );
  transition: all 0.3s ease-in-out;
}

/* Functionalities on the top */
.reset-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent-color);
  color: var(--light-color);
  border-radius: 1.2rem;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  display: none;
}

input {
  outline: none;
  border-radius: 1.2rem;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

button {
  background: transparent;
  border: 3px --light-color solid;
  border-radius: 1.2rem;
  color: var(--light-color);
}

.swap-theme-button {
  position: absolute;
  top: 10px;
  right: 190px;
  background: var(--accent-color);
  color: var(--light-color);
  border-radius: 1.2rem;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  display: none;
}

.swap-theme-button svg {
  width: 20px;
  margin-right: 0.5rem;
  fill: var(--light-color);
}

/* Actually in order here */

/* The login signup and forgot password part */
section {
  position: absolute;
  background: var(--light-color);
  border-radius: 1rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding-bottom: 2rem;
}

.forgot-password {
  z-index: 9999;
  display: none;
  min-width: 200px;
  max-width: 40%;
}

.forgot-password form {
  width: 100%;
}

.forgot-password h1 {
  padding: 0.2rem 2rem;
}

.forgot-password-input-wrapper {
  position: relative;
  margin-top: 1rem;
}

.forgot-password-input-wrapper input {
  width: 85%;
}

.forgot-password-input-wrapper input:focus {
  border-bottom: 2px var(--accent-color) solid;
}

.remember-me-forgot-password-wrapper {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

.forgot-password #forgot-password-email-input {
}

.forgot-password label {
  margin-left: 1rem;
  position: absolute;
  bottom: 30%;
  color: var(--gray-color);
  cursor: text;
  transition: all 0.2s ease-in-out;
}

.forgot-password button {
  margin-top: 1rem;
}

.forgot-password-button-wrapper a {
  margin-right: 1.5rem;
  color: var(--accent-color);
  cursor: pointer;
  text-decoration: underline;
}

#return-to-login {
  color: var(--accent-color);
  cursor: pointer;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  text-decoration: underline;
}

#return-to-login:hover {
  color: var(--dark-color);
}

section h1 {
  text-align: center;
}

section form {
  display: flex;
  flex-direction: column;
}

section button {
  background-color: var(--accent-color);
  color: var(--light-color);
  border: none;
  padding: 0.5rem;
  margin: 0 0.75rem;
  margin-top: 2.5rem;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

section button:hover {
  background-color: var(--dark-color);
  color: var(--accent-color);
  transform: inherit;
}

#login-button {
  margin-top: 1rem;
}

section input {
  padding: 0.3rem 0;
  margin: 0 1rem;
  border-radius: 0;
  outline: none;
  border: none;
  border-bottom: 2px var(--gray-color) solid;
  transition: all 0.3s ease-in-out;
  font-size: 1rem;
}

section p {
  margin-top: 0.5rem;
  padding: 0 1rem;
}

section p span {
  cursor: pointer;
  color: var(--accent-color);
  text-decoration: underline;
}

section p span:hover {
  color: #749ddf62;
}

.login-signup-header-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.login-signup-header-wrapper h1 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.login-signup-header-wrapper::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  background-color: #808080;
  bottom: -10px;
}
/* Password show hide */

.eye-icon,
.eye-icon-signup {
  position: absolute;
  width: 25px;
  right: 20px;
  cursor: pointer;
}

.eye-icon:hover {
  fill: var(--accent-color);
}

#eye-slash-icon-login,
#eye-slash-icon-sign-up {
  display: none;
}

.login-error-message {
  color: red;
  pointer-events: none;
  display: none;
}

.fill-empty-error-message {
  color: red;
  pointer-events: none;
  display: none;
}

.used {
  color: red;
}

.signup-section {
  display: none;
}

.user-name-input-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  color: var(--gray-color);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.user-name-input-wrapper input:focus {
  border-bottom: 2px var(--accent-color) solid;
}

.user-name-input-wrapper label {
  margin-left: 1rem;
  position: absolute;
  bottom: 30%;
  cursor: text;
  transition: all 0.2s ease-in-out;
}

.user-name-already-taken,
.enter-proper-email {
  display: none;
  color: red;
  margin-top: -1rem;
}

.password-input-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  color: var(--gray-color);
  margin-top: 1.5rem;
}

.password-input-wrapper input:focus {
  border-bottom: 2px var(--accent-color) solid;
}

.password-input-wrapper label {
  margin-left: 1rem;
  position: absolute;
  bottom: 30%;
  cursor: text;
  transition: all 0.3s ease-in-out;
}

.remember-me {
  display: flex;
  align-items: center;
}

#remember-me {
  margin: 0;
  margin-left: 1rem;
  margin-right: 0.5rem;
  width: 18px;
  height: 18px;
}

.sign-up-error {
  margin-left: 1.25rem;
  margin-top: 1rem;
  display: none;
}

.error-variables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 0.9rem;
}

.sign-up-error p {
  padding-left: 0;
}

.invalid {
  color: red;
}

.valid {
  color: green;
}

/* Setting up the monthly allowance */

.monthly-allowance-container {
  position: absolute;
  background: var(--light-color);
  margin-bottom: 1.5rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 1rem;
  z-index: 999;
  font-size: 0.8rem;
}

.monthly-allowance-wrapper {
  display: flex;
  padding: 2rem;
  padding-top: 3rem;
  flex-direction: column;
  position: relative;
}

.monthly-allowance-container button {
  cursor: pointer;
}

.monthly-allowance-container input {
  font-size: 1.2rem;
  padding: 0.3rem 0;
  border: none;
  border-radius: 3rem;
  border: 2px var(--gray-color) solid;
  margin-bottom: 0.5rem;
  text-align: center;
  margin-top: 1rem;
}

.monthly-allowance-container input::placeholder {
  font-size: 1rem;
  text-align: center;
}

.monthly-allowance-container button {
  margin-top: 1.2rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  padding: 0.5rem 0;
  border: none;
  color: var(--light-color);
  background: var(--accent-color);
  transition: all 0.3s ease;
}

.monthly-allowance-container button:hover {
  color: var(--light-color);
  background: var(--dark-color);
}

.monthly-allowance-container h1 {
  font-size: 1.2rem;
}

.info-icon-wrapper {
  width: 100%;
  position: absolute;
  left: 10px;
  top: 10px;
}

.info-icon-wrapper svg {
  width: 25px;
  cursor: pointer;
}

.info-icon-wrapper svg:hover {
  fill: var(--accent-color);
}

.info-wrapper {
  position: absolute;
  background: var(--light-color);
  left: 0;
  top: -50px;
  border-radius: 1rem;
  font-size: 1rem;
  padding: 1rem;
  display: none;
}

.info-wrapper h3 {
  margin-bottom: 0.5rem;
}

.info-wrapper .ok-button {
  cursor: pointer;
  text-align: center;
  color: var(--accent-color);
  margin-top: 5rem;

  font-size: 1.3rem;
  transition: all 0.3s ease-in-out;
}
.info-wrapper .ok-button:hover {
  color: var(--dark-color);
}

#date-of-the-month-to-start-on {
  width: 100%;
}

.money-cant-be-0-warning {
  color: red;
  font-size: 0.9rem;
  margin-left: 0.2rem;
  display: none;
}
.money-cant-be-over-10-million-warning {
  color: red;
  font-size: 0.9rem;
  margin-left: 0.2rem;
  display: none;
}

.total-money-you-can-use-text {
  margin-top: 2rem;
}

.too-much-money-spent-complain {
  color: var(--light-color);
  display: none;
}

.empty-money-spent-complain {
  color: var(--light-color);
  display: none;
}

.money-input-wrapper {
  margin-top: 3.5rem;
  display: none;
}

.money-input-wrapper > * {
  margin: 0.4rem 0;
}

.money-input-wrapper input {
  padding: 0.5rem;
  font-size: 1rem;
  border: none;
  outline: 2px var(--accent-color) solid;
}

.money-input-wrapper button {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
  cursor: pointer;
  border: 2px var(--dark-color) solid;
  background-color: var(--accent-color);
}

.money-input-wrapper h1,
.money-input-wrapper h2 {
  color: var(--light-color);
  font-size: 1.5rem;
}

/* Calendar Styling  */

.calendar {
  display: none;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.fc-event-title-container {
  /* display:flex;
  justify-content: center; */
}

.fc-header-toolbar {
  font-size: 1rem;
}
.fc-prev-button,
.fc-prev-button span .fc-prev-button span::before {
  background: var(--accent-color) !important;
}
.fc-next-button,
.fc-next-button span,
.fc-next-button span::before {
  background: var(--accent-color) !important;
}

.fc-today-button {
  background-color: var(--accent-color) !important;
}

.fc-event-title-container {
  background-color: var(--accent-color);
}

.fc-toolbar-chunk h2 {
  color: var(--accent-color);
}

.fc-day-today {
  color: var(--accent-color);
  background: none !important;
}

.fc-scrollgrid {
  color: var(--light-color);
}

.fc-toolbar-title {
  color: var(--light-color);
}

/* classlist add js */

.hide {
  opacity: 0;
  pointer-events: none;
}

.show {
  display: block !important;
}

.show-flex {
  display: flex;
}

#warning {
  color: var(--light-color);
  font-size: 1.5rem;
  margin-top: 0.5rem;
}

.move-up {
  transform: translateY(-80%);
}

.change-border-color {
  border-bottom: 2px var(--accent-color) solid;
}

.change-text-color {
  color: var(--accent-color) !important;
}

.error-login {
  border-bottom: 2px red solid;
}

.sign-out-button {
  position: absolute;
  top: 10px;
  left: 19px;
  background: var(--accent-color);
  color: var(--light-color);
  border-radius: 1.2rem;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.reset-password-success,
.reset-password-fail {
  display: none;
}

.reset-password-fail {
  color: red;
}

.reset-everything-confirmation {
  background-color: rgb(244, 244, 244);
  position: fixed;
  left: 50%;
  top: 50%;
  border-radius: 1rem;
  padding: 0.85rem 1.5rem;
  z-index: 999;
  transform: translate(-50%, -50%);
  display:none;
}

.confirmation-buttons {
  display:flex;
  justify-content: center;
  margin-top:1rem;
}

.reset-everything-confirmation button {
  background: var(--accent-color);
  color: var(--light-color);
  border-radius: 1.2rem;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  padding: 0.2rem 1rem;
  margin:0 1rem;
}

/* Mobile */

@media (max-width: 800px) {
  .monthly-allowance-container {
    margin: 0 auto;
    width: 75%;
  }

  .money-input-wrapper {
    margin-top: 2rem;
  }

  .money-input-wrapper h1 {
    font-size: 1.2rem;
  }

  .money-input-wrapper .total-money-you-can-use-text {
    margin-top: 4rem;
  }
  .money-input-wrapper h2 {
    font-size: 1.2rem;
  }

  .money-input-wrapper button {
    font-size: 0.8rem;
    border: none;
  }

  .money-input-wrapper input {
    font-size: 0.8rem;
  }

  section {
    width: 75%;
  }

  .fc-toolbar-chunk {
    display: flex !important;
  }

  .fc-toolbar-title {
    font-size: 1.2rem !important;
  }

  .fc-today-button {
    font-size: 0.85rem !important;
  }

  .reset-button {
    font-size: 0.9rem;
  }

  .swap-theme-button {
    font-size: 0.9rem;
    left: 10px;
    right: inherit;
  }

  #forgot-password-button,
  #remember-me-label {
    font-size: 0.8rem;
  }
  .forgot-password h1 {
    font-size: 1.2rem;
  }

  #remember-me {
    margin-right: 0.2rem;
  }

  .background-image img {
    min-width: 100vw;
    height: 100vh;
    object-fit: cover;
  }

  .sign-out-button {
    bottom: 1rem;
    position:fixed;
    top: inherit;
  }
}

.spinner {
  height: 100vh;
  width: 100%;
  background-size: cover;
  z-index: 9999999999999999999999999999;
  background-repeat: no-repeat;
  background-image: url("./public/assets/background.jpg");
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner::before {
  z-index: 9999999999999999999999999999;
  position: absolute;
  content: "";
  background: rgba(
    var(--dark-rgb),
    var(--dark-rgb),
    var(--dark-rgb),
    var(--dark-overlay)
  );
  height: 100vh;
  background-size: 100vw;
  width: 100%;
}

.actual-spinner {
  z-index: 19999999999999999999999999999;
  width: 125px;
  height: 125px;
  border: var(--light-color) 15px solid;
  border-top-color: var(--accent-color);
  border-radius: 100%;
  margin: auto;
  animation: loading 1.75s ease-out infinite;
}

@keyframes loading {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}
