/*
 * Use this CSS to learn some intersting techniques,
 * in case you're wondering how I built the UI.
 * Have fun! 😁
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  font-size: 62.5%;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #444;
  background-color: #f3f3f3;
  height: 100vh;
  padding: 2rem;
  max-width: 160rem;
  margin: 0 auto;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav div {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.welcome,
.login-message {
  font-size: 1.9rem;
  font-weight: 500;
}

.logo {
  height: 5.25rem;
}

/* MAIN */
.app {
  /* NOTE This creates the fade in/out anumation */
  transition: all 1s;
}

/* Login */
.login-form {
  position: absolute;
  top: 45%;
  left: 2rem;
  right: 2rem;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  padding: 5rem 6rem;
  max-width: 550px;
}

.login-wrapper .logo,
.login-message,
.small-text {
  display: block;
  margin: 0 auto;
}

.small-text {
  font-size: 1.2rem;
}

.login-message {
  padding: 2rem 0;
}

.login {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}
.input-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.icon {
  position: absolute;
  width: 1.5rem;
  fill: #5e5e5e;
}

.modal__btn {
  width: 1rem;
  top: 2rem;
  right: 2rem;
  transform: skewX(-10deg);
}
.input__icon {
  left: 3rem;
  top: 50%;
  transform: translateY(-50%);
}

.login__input,
.login__btn,
.logout__btn {
  border: none;
  padding: 0.5rem 2rem;
  font-size: 1.6rem;
  font-family: inherit;
  text-align: center;
  width: 85%;
  border-radius: 10rem;
  color: inherit;
  border: 1px solid #fff;
  transition: all 0.3s;
}

.cta__btn {
  display: flex;
  align-self: center;
  margin-top: 1rem;
  color: white;
  background-color: #333;
  padding: 0.5rem 2rem;
  width: fit-content;
  border-radius: 10rem;
  font-size: 1.6rem;
  text-decoration: none;
}

.login__input:focus,
.logout__btn {
  outline: none;
  border: 1px solid #ccc;
}

.login__input::placeholder {
  color: #bbb;
}

.login__btn {
  border: none;
  font-size: 1.6rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  background-color: #5e5e5e;
  width: 15rem;
  margin-top: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.login__btn:hover,
.logout__btn:hover {
  background-color: white;
  color: #5e5e5e;
  cursor: pointer;
}
/* //////////----MODAL DESIGNS----/////////// */
.hidden {
  display: none;
}
.overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.432);
  width: 100%;
  height: 100vh;
  z-index: 1;
}

.modal {
  position: absolute;
  background-color: #fff;
  width: 30rem;
  padding: 5rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.6rem;
}

.modal-content span {
  font-weight: bold;
}

.record {
  display: flex;
  justify-content: space-between;
}

.record p {
  width: 8rem;
}

.close-modal,
.close-banner {
  position: absolute;
  background: none;
  border: 1px solid;
  width: 3rem;
  height: 3rem;
  font-size: 2rem;
  border-radius: 50%;
  top: 5%;
  right: 5%;
}
.modal__btn,
.close-modal:hover,
.overlay {
  cursor: pointer;
}

.logout__btn {
  font-size: 1.6rem;
  border: none;
  background-color: #5e5e5e;
  color: white;
  padding: 1rem 2rem;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* //////////////////////////// */
.btn--sort:hover,
.btn--sort:focus {
  outline: none;
  color: #777;
}

.dashboard {
  opacity: 0;
  display: none;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.balance {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 2rem 0;
}

.balance__label {
  font-size: 2.2rem;
  font-weight: 500;
  margin-bottom: -0.2rem;
}

.balance__date {
  font-size: 1.4rem;
  color: #888;
}

.balance__value {
  font-size: 2.5rem;
  font-weight: 400;
}

/* MOVEMENTS */
.movements {
  /* grid-row: 2 / span 3; */
  background-color: #fff;
  border-radius: 1rem;
  overflow: scroll;
}

.movements__row {
  padding: 2.25rem 2rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.movements__type {
  font-size: 1.1rem;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
  padding: 0.1rem 1rem;
  border-radius: 10rem;
  margin-right: 2rem;
}

.movements__date {
  font-size: 1.1rem;
  text-transform: uppercase;
  font-weight: 500;
  color: #666;
}

.movements__type--deposit {
  background-image: linear-gradient(to top left, #39b385, #9be15d);
}

.movements__type--withdrawal {
  background-image: linear-gradient(to top left, #e52a5a, #ff585f);
}

.movements__value {
  font-size: 1.7rem;
  margin-left: auto;
}

/* SUMMARY */
.summary {
  display: flex;
  align-items: baseline;
  width: 100%;
  margin-top: 1rem;
}

.summary__label {
  font-size: 1.2rem;
  font-weight: 500;
  text-transform: uppercase;
  margin-right: 0.8rem;
}

.summary__value {
  font-size: 1.4rem;
  margin-right: 1rem;
  text-overflow: ellipsis;
  width: 10rem;
}

.summary__value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary__value--in,
.summary__value--interest {
  color: #66c873;
}

.summary__value--out {
  color: #f5465d;
}

.btn--sort {
  margin-left: auto;
  border: none;
  background: none;
  font-size: 1.3rem;
  font-weight: 500;
  cursor: pointer;
}

/* OPERATIONS */

.operation__wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.operation {
  border-radius: 1rem;
  padding: 3rem 4rem;
  color: #333;
}

.operation--transfer {
  background-image: linear-gradient(to top left, #ffb003, #ffcb03);
}

.operation--loan {
  background-image: linear-gradient(to top left, #39b385, #9be15d);
}

.operation--close {
  background-image: linear-gradient(to top left, #e52a5a, #ff585f);
}

h2 {
  font-size: 1.7rem;
  font-weight: 600;
  color: #333;
}

.form {
  display: grid;
  grid-template-columns: 2.5fr 2.5fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.4rem 1rem;
}

/* Exceptions for interst */
.form.form--loan {
  grid-template-columns: 2.5fr 1fr 2.5fr;
}
.form__label--loan {
  grid-row: 2;
}
/* End exceptions */

.form__input {
  width: 100%;
  border: none;
  background-color: rgba(255, 255, 255, 0.4);
  font-family: inherit;
  font-size: 1.5rem;
  text-align: center;
  color: #333;
  padding: 0.3rem 1rem;
  border-radius: 0.7rem;
  transition: all 0.3s;
}

.form__input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.6);
}

.form__label {
  font-size: 1.3rem;
  text-align: center;
}

.form__btn {
  border: none;
  border-radius: 0.7rem;
  font-size: 1.8rem;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.3s;
}

.form__btn:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.8);
}

.logout-timer {
  padding: 0 0.3rem;
  margin-top: 1.9rem;
  text-align: right;
  font-size: 1.25rem;
}

.timer {
  font-weight: 600;
}

/* Notification banner  */
.notification-banner {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  padding: 3rem;
  font-size: 1.4rem;
  animation: 1.5s fadeInDownCenter;
  z-index: 1;
}

.close-banner {
  right: 0;
  border: none;
  color: white;
}
.notification-banner h2 {
  color: white;
}
.success {
  background-image: linear-gradient(to top left, #39b385, #9be15d);
  color: white;
}
.alert {
  background-image: linear-gradient(to top left, #ffb003, #ffcb03);
  color: #5e5e5e;
}

.alert h2,
.alert .close-banner {
  color: #5e5e5e;
}
.error {
  background-image: linear-gradient(to top left, #e52a5a, #ff585f);
  color: white;
}

@media screen and (min-width: 768px) {
  .operation__wrapper {
    flex-direction: row;
  }
  .operation {
    padding: 1rem 2rem;
  }
}

@media screen and (min-width: 992px) {
  .operation {
    padding: 3rem 4rem;
  }
}

/* screen sizes

768px
992px */

@keyframes fadeInDownCenter {
  0% {
    transform: translate(-50%, -100%);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, 0%);
    opacity: 1;
  }
}
