/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: #6a38c2;
  --first-color-alt: #6a38c4;
  --title-color: hsl(220, 68%, 4%);
  --white-color: hsl(0, 0%, 100%);
  --text-color: hsl(220, 15%, 66%);
  --body-color: hsl(0, 0%, 100%);
  --container-color: hsl(220, 50%, 97%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Poppins", sans-serif;
  --big-font-size: 1.5rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --tiny-font-size: .688rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --big-font-size: 3rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --tiny-font-size: .75rem;
  }
}

#msg {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
}

#msg .alert {
    color: #ff3333;
    padding: 15px;
    border-radius: 6px;
    animation: fadeIn 0.3s ease;
    line-height: 1.6;
}

/* Update password requirements styling */
#msg .alert .password-requirements {
    list-style: none;
    padding: 0;
    margin: 5px 0;
}

#msg .alert .password-requirements li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

#msg .alert .password-requirements li::before {
    content: "•";
    position: absolute;
    left: 5px;
}

#msg .success {
    color: #000;
    /* background-color: rgba(252, 207, 207, 0.1); */
    padding: 10px;
    border-radius: 6px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body,
input,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
}

input,
button {
  border: none;
  outline: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

nav {
  position: fixed;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  z-index: 9;
}

.nav__header {
  padding: 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fff;
  position: fixed;
  top: 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #6a38c2;
}

.logo span {
  color: #000;
}
/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1120px;
  margin-inline: 1.5rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

/*=============== LOGIN  ===============*/
.login {
  position: relative;
  min-height: 100vh;
  align-items: flex-start;
  padding-top: 5rem;
  overflow-y: auto;
}

.login__blob {
  display: none;
}

.login__title {
  padding-top: 1rem;
  margin-top: 1rem;
  font-size: var(--big-font-size);
  color: var(--title-color);
  text-align: center;
  margin-bottom: 1rem;
}

.login__box {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--container-color);
  border-radius: 1rem;
}

.login__input {
  background: none;
  width: 100%;
  padding: 1.5rem 2.5rem 1.5rem 1.25rem;
  font-weight: var(--font-semi-bold);
  border: 3px solid transparent;
  border-radius: 1rem;
  z-index: 1;
  transition: border-color .4s;
}

.login__input:autofill {
  transition: background-color 6000s, color 6000s;
}

.login__label {
  position: absolute;
  left: 1.25rem;
  font-weight: var(--font-semi-bold);
  transition: transform .4s, font-size .4s, color .4s;
}

.login__icon {
  position: absolute;
  right: 1rem;
  font-size: 1.25rem;
  transition: color .4s;
}

.login__password {
  cursor: pointer;
  z-index: 10;
}

.login__forgot {
  display: block;
  width: max-content;
  margin: 1rem 0 0 auto;
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--text-color);
  transition: color .4s;
}

.login__forgot:hover {
  color: var(--first-color);
}

.login__button {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  background-color: var(--first-color);
  color: var(--white-color);
  font-weight: var(--font-semi-bold);
  padding-block: 1.5rem;
  border-radius: 4rem;
  margin-block: 2rem;
  cursor: pointer;
  transition: background-color .4s, box-shadow .4s;
}

.login__button:hover {
  background-color: var(--first-color-alt);
  box-shadow: 0 8px 24px hsla(208, 92%, 32%, .3);
}

.login__social {
  margin-bottom: 2rem;
}

.login__social-title {
  text-align: center;
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  margin-bottom: 1rem;
}

.login__social-img {
  width: 1rem;
}

.login__social-links {
  display: flex;
  justify-content: center;
  column-gap: 1.5rem;
}

.login__social-link {
  width: 32px;
  height: 32px;
  background-color: var(--body-color);
  box-shadow: 0 4px 8px hsla(0, 0%, 0%, .1);
  border-radius: .5rem;
  display: grid;
  place-items: center;
  transition: transform .4s;
}

.login__social-link:hover {
  transform: translateY(-.25rem);
}

.login__switch {
  text-align: center;
  font-size: var(--small-font-size);
}

.login__switch button {
  background: none;
  color: var(--first-color);
  font-size: var(--small-font-size);
  font-weight: var(--font-semi-bold);
  cursor: pointer;
  transition: color .4s;
}

.login__switch button:hover {
  color: var(--first-color-alt);
}

.login__access, 
.login__register {
  position: relative;
  left: 0;
  right: 0;
  width: 100%;
  transition: transform .4s, opacity .4s .1s;
  padding-bottom: 2rem;
}

.login__register {
  opacity: 1;
  transform: translateX(0);
}

/* Input focus move up label */
.login__input:focus ~ .login__label {
  transform: translateY(-12px);
  font-size: var(--tiny-font-size);
}

.login__input:focus {
  padding-block: 2rem 1rem;
}

/* Input focus sticky top label */
.login__input:not(:placeholder-shown).login__input:not(:focus) ~ .login__label {
  transform: translateY(-12px);
  font-size: var(--tiny-font-size);
}

.login__input:not(:placeholder-shown).login__input:not(:focus) {
  padding-block: 2rem 1rem;
}

/* Input focus color */
.login__input:focus {
  border-color: var(--first-color);
}

.login__input:focus ~ .login__label,
.login__input:focus ~ .login__icon {
  color: var(--first-color);
}

/* Show hide login & create account */
.active .login__access {
  transform: translateX(15rem);
  opacity: 0;
  pointer-events: none;
}

.active .login__register {
  transform: translateX(0);
  opacity: 1;
  pointer-events: initial;
}


input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

.preloader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader {
width: fit-content;
height: fit-content;
display: flex;
align-items: center;
justify-content: center;
}

.truckWrapper {
width: 200px;
height: 100px;
display: flex;
flex-direction: column;
position: relative;
align-items: center;
justify-content: flex-end;
overflow-x: hidden;
}
/* truck upper body */
.truckBody {
width: 130px;
height: fit-content;
margin-bottom: 6px;
animation: motion 1s linear infinite;
}
/* truck suspension animation*/
@keyframes motion {
0% {
  transform: translateY(0px);
}
50% {
  transform: translateY(3px);
}
100% {
  transform: translateY(0px);
}
}
/* truck's tires */
.truckTires {
width: 130px;
height: fit-content;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0px 10px 0px 15px;
position: absolute;
bottom: 0;
}
.truckTires svg {
width: 24px;
}

.road {
width: 100%;
height: 1.5px;
background-color: #282828;
position: relative;
bottom: 0;
align-self: flex-end;
border-radius: 3px;
}
.road::before {
content: "";
position: absolute;
width: 20px;
height: 100%;
background-color: #282828;
right: -50%;
border-radius: 3px;
animation: roadAnimation 1.4s linear infinite;
border-left: 10px solid white;
}
.road::after {
content: "";
position: absolute;
width: 10px;
height: 100%;
background-color: #282828;
right: -65%;
border-radius: 3px;
animation: roadAnimation 1.4s linear infinite;
border-left: 4px solid white;
}

.lampPost {
position: absolute;
bottom: 0;
right: -90%;
height: 90px;
animation: roadAnimation 1.4s linear infinite;
}

@keyframes roadAnimation {
0% {
  transform: translateX(0px);
}
100% {
  transform: translateX(-350px);
}
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .container {
    margin-inline: 1rem;
  }
}

/* For medium devices */
@media screen and (min-width: 540px) {
  .login__area {
    width: 380px;
    margin-inline: auto;
  }
}

@media screen and (min-width: 350px) and (max-height: 600px) {
  .login {
    height: 760px;
  }
}

/* For large devices */
@media screen and (min-width: 1150px) {
  .container {
    margin-inline: auto;
  }

  .login__area {
    width: 460px;
    margin: initial;
  }
  .login__access, 
  .login__register {
    width: 600px;
  }
  .login__title {
    text-align: initial;
    margin-bottom: 3rem;
  }
  .login__button {
    margin-bottom: 3rem;
  }
  .login__group {
    grid-template-columns: repeat(2, 1fr);
  }
  .login__blob {
    display: block;
    height: 100vh;
    position: absolute;
    top: 0;
    right: 0;
  }
  .login__img {
    transform: translate(0rem, 0rem);
  }
}

@media screen and (max-width: 768px) {
  .login {
    padding-top: 4rem;
    height: auto;
  }

  .login__area {
    padding-bottom: 3rem;
  }
}

@media screen and (max-height: 700px) {
  .login {
    height: auto;
    min-height: 100vh;
  }
}

/* Add these styles for password requirements */
.password-requirements {
    margin-top: 10px;
    padding-left: 20px;
    list-style: none;
}

.password-requirements li {
    color: #666;
    font-size: var(--small-font-size);
    margin-bottom: 5px;
    position: relative;
}

.password-requirements li::before {
    content: "•";
    color: #ff3333;
    position: absolute;
    left: -15px;
}

.password-requirements li.valid::before {
    content: "✓";
    color: #2ecc71;
}

.login__terms {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.login__terms a {
    color: var(--first-color);
    text-decoration: none;
    font-weight: 500;
}

.login__terms a:hover {
    text-decoration: underline;
}
