@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Open Sans", sans-serif;
}

.container {
  display: flex;
  flex-direction: row;
  width: 100%;
  background-color: white;
}

.image-section {
  width: 50%;
  height: auto;
  min-height: 640px;
  background-image: url("pics/bg19.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: #f97316;
}

.form-section {
  width: 50%;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-container {
  padding: 0px 80px;
}

.image-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
}

.form-container h1 {
  font-size: 36px;
  color: #171717;
  font-weight: 600;
  margin: 0;
}

.form-container p {
  font-size: 16px;
  color: #2e3849;
}

.divider {
  display: block;
  width: 100%;
  height: 0.5px;
  background-color: #ddd;
  margin-bottom: 1.5rem;
}

/* Updated input container styles */
.password-container {
  position: relative;
  width: 100%;
  margin: 0 0 15px 0;
}

.input-norm {
  position: relative;
  width: 100%;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  /* Added this selector */
  width: 100%;
  padding: 16px;
  padding-right: 40px;
  border: 2px solid #5a6478;
  font-size: 16px;
  border-radius: 4px;
  transition: all 0.2s ease; /* Updated transition */
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

input[type="text"]::placeholder {
  color: #4a5a73;
}

input[type="email"]::placeholder {
  color: #4a5a73;
}
input[type="password"]::placeholder {
  color: #4a5a73;
}

.toggle-password,
.toggle-email {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #aaa;
  z-index: 1;
  font-size: 18px;
}

.toggle-password.fa-eye {
  color: #4caf49;
}
/* Error message styles */
.form-error {
  font-size: 15px;
  margin: 8px 0 0 0;
  
}

/* Input validation states */
/* Base focus state */
input:focus {
  outline: none;
  border-color: blue;
  box-shadow: 0 0 0 0.3rem rgba(0, 123, 255, 0.25);
}
.highlight {
  color: #ff8c00;
}

/* Error state - needs higher specificity to override focus */
input.input-error,
input.input-error:focus {
  border-color: red;
  box-shadow: 0 0 0 0.3rem rgba(255, 0, 0, 0.25);
}

/* Valid state */
input.valid {
  border-color: green;
  box-shadow: none;
}

.remember-forgot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 20px 0;
  width: 100%;
}

.custom-checkbox {
  display: inline-flex;
  align-items: center;
  position: relative;
  color: #2e3849;
}

.custom-checkbox input[type="checkbox"] {
  display: none;
}

.custom-checkbox .checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #8b94a7;
  border-radius: 3px;
  margin-right: 5px;
  position: relative;
  display: inline-block;
  transition: all 0.2s ease;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark {
  background-color: #5a6478;
  border-color: #5a6478;
}

.custom-checkbox input[type="checkbox"]:checked + .checkmark::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot-password {
  color: #4caf50;
  text-decoration: none;
  font-size: 16px;
}
.forgot-password:hover {
  text-decoration: underline;
}
.lgn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  font-size: 16px;
  background-color: #4aa629;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  margin: 20px 0;
  font-family: "Open Sans", sans-serif;
  transition: color 0.3s ease;
  overflow: hidden;
  z-index: 1;
}

.lgn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #449e25;
  transform: rotateX(0deg);
  transform-origin: top;
  transition: transform 0.5s ease;
  z-index: -1;
}

.lgn:hover::before {
  transform: rotateX(90deg);
}

.lgn:hover {
  color: white;
}

.register {
  text-align: center;
  margin: 0;
  color: #2e3849;
  font-size: 16px;
}

.register a {
  color: #0000ee;
  text-decoration: none;
  font-weight: 600;
  text-underline-offset: 4px;
}

.register a:hover {
  text-decoration: underline;
}

/* Error message styling */
.error-message {
  color: red;
  font-size: 15px;
  margin: 8px 0 0 0;
}

/* Media Query for Tablets (1100px) */
@media (max-width: 1100px) {
  .container {
    flex-direction: column;
  }

  .forgot-password {
    color: #4caf50;
    text-decoration: none;
    font-size: 14px;
  }

  .image-section {
    width: 100%;
    min-height: 300px;
    height: 300px;
  }

  .form-section {
    width: 100%;
    min-height: auto;
  }

  .form-container {
    padding: 30px 20px;
  }

  .form-container h1 {
    font-size: 24px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .form-container p {
    font-size: 14px;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"] {
    padding: 12px;
    font-size: 14px;
  }

  .remember-forgot {
    font-size: 14px;
    gap: 10px;
  }

  .custom-checkbox .checkmark {
    width: 16px;
    height: 16px;
  }

  .lgn {
    padding: 12px;
    font-size: 14px;
  }

  .register {
    font-size: 14px;
  }

  .divider {
    font-size: 14px;
    margin: 15px 0;
  }
}

/* Media Query for Mobile (560px) */
@media (max-width: 560px) {

  .forgot-password {
    color: #4caf50;
    text-decoration: none;
    font-size: 13px;
}

  .image-section {
    width: 100%;
    min-height: 200px;
    height: 200px;
  }

  .form-container {
    padding: 20px 15px;
  }

  .form-container h1 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .form-container p {
    font-size: 13px;
    line-height: 1.4;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"] {
    padding: 12px;
    font-size: 13px;
  }

  .toggle-password,
  .toggle-email {
    right: 12px;
    font-size: 16px;
  }

  .remember-forgot {
    font-size: 13px;

    gap: 8px;
  }

  .custom-checkbox .checkmark {
    width: 14px;
    height: 14px;
  }

  .custom-checkbox input[type="checkbox"]:checked + .checkmark::before {
    top: 1px;
    left: 5px;
    width: 4px;
    height: 8px;
  }

  .lgn {
    padding: 12px;
    font-size: 13px;
    margin: 15px 0;
  }

  .register {
    font-size: 13px;
    margin: 12px 0 0 0;
    line-height: 1.4;
  }

  .divider {
    font-size: 13px;
    margin: 12px 0;
  }

  .password-container,
  .input-norm {
    margin-bottom: 12px;
  }
}
