* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  background-color: #e4e4e4;
}
.have_an_acc {
  display: block;
  margin: 15px 0 0 0;
}
.container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: #fff;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  flex-wrap: wrap;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form_box form {
  max-width: 600px;
}
.form_box {
  position: absolute;
  right: 0;
  width: 50%;
  height: 100%;
  background-color: rgb(255, 255, 255);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  text-align: center;
  padding: 40px;
  z-index: 1;
  transition: 0.6s ease-in-out, visibility 0s 1s;
}
.container.active .form_box {
  right: 50%;
}
.container.active .form_box.register {
  visibility: visible;
}
.form_box.register {
  visibility: hidden;
}
form {
  width: 100%;
}
.container h1 {
  font-size: 36px;
  margin: -10px 0;
}
.input_box {
  position: relative;
  margin: 20px 0;
}
.input_box_error {
  border: 1px solid red !important;
  border-radius: 8px !important;
}
/* error msg */
.pw_icon_error {
  border-left: 1px solid rgb(255, 0, 0) !important;
  height: 100%;
}
.error_msg {
  position: relative;
  /* margin: 30px 0; */
  color: red;
  font-size: 0.7rem;
}

/* hides/shows eye */
#user_icon {
  width: 24px;
  margin-right: 5px;
  padding-left: 5px;
}
#pw_icon,
#cpw_icon,
#lpw_icon {
  cursor: pointer;
  width: 24px;
  margin-right: 5px;
  padding-left: 5px;
}
.input_box input:focus {
  outline: 1px solid gray;
}
.input_box input {
  width: 100%;
  padding: 13px 50px 13px 20px;
  background-color: #eee;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 16px;
  color: #333;
  font-weight: 500;
}
.input_box input::placeholder {
  color: #888;
  font-weight: 400;
}
.input_box img {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: #888;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* Terms and Privacy Policy checkbox styling */
.terms_checkbox {
  margin: 10px 0;
  font-size: 14px;
  color: #333;
  display: flex;
  justify-content: flex-start;
  align-items: left;
}

.terms_checkbox input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.2);
}

.terms_checkbox a {
  color: #b92828;
  text-decoration: none;
  transition: color 0.3s ease;
  margin-left: 5px;
}

.terms_checkbox a:hover {
  color: #8b1919;
}

.terms_checkbox label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
}

.remember_me {
  display: flex;
  align-items: left;
  font-size: 14px;
  color: #333;
}

.forgot_link {
  margin: 15px 0 15px;
}
.forgot_link a {
  font-size: 14.5px;
  color: #a1a0a0;
  text-decoration: none;
}
.btn {
  width: 100%;
  height: 48px;
  background-color: #b92828;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #fff;
  font-weight: 600;
}
.btn:hover {
  background-color: #8b1919;
}
.container p {
  font-size: 14.5px;
  margin: 15px 0;
}
.social_icons {
  display: flex;
  justify-content: center;
}
.social_icons a {
  display: inline-flex;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 24px;
  color: #d1cccc;
  text-decoration: none;
  margin: 0 8px;
}
.toggle_box {
  position: absolute;
  width: 100%;
  height: 100%;
}
.toggle_box::before {
  content: "";
  position: absolute;
  width: 300%;
  left: -250%;
  height: 100%;
  background-color: #38292a;

  border-radius: 100px;
  z-index: 2;
  transition: 1.8s ease-in-out;
}
.container.active .toggle_box::before {
  left: 50%;
}
.toggle_panel {
  position: absolute;
  width: 50%;
  height: 100%;
  display: flex;
  color: rgb(255, 255, 255);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
  transition: 0.6s ease-in-out;
}
.toggle_panel.toggle_left {
  left: 0;
  transition-delay: 1.2s;
}
.container.active .toggle_panel.toggle_left {
  left: -50%;
  transition-delay: 0.6s;
}
.toggle_panel.toggle_right {
  right: -50%;
  transition-delay: 0.6s;
}
.container.active .toggle_panel.toggle_right {
  right: 0;
  transition-delay: 1.2s;
}
.toggle_panel p {
  margin-bottom: 20px;
}
.btn.register_btn,
.btn.login_btn {
  color: gray;
  width: 160px;
  height: 46px;
  background: none;
}
.btn.register_btn:hover,
.btn.login_btn:hover {
  color: red;
}
.toggle_box img {
  margin-bottom: 20px;
  width: 200px;
  background-color: white;
  border-radius: 200px;
  z-index: -1;
}
/* Styling for BFP officer registration link */
.bfp_link p {
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

.bfp_link .officer_registration {
  font-size: 14px;
  text-decoration: none;
  color: #a1a0a0;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.bfp_link .officer_registration:hover {
  color: #a1a0a0;
  /* text-decoration: underline; */
}

.btn-text {
  display: inline-block;
}

.btn-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading .btn-text {
  display: none;
}

.btn.loading .btn-loader {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media screen and (max-height: 650px) {
  /* .toggle_panel {
    display: none;
  } */
  /* .toggle_box::before {
    background: none;
    background: unset;
  } */
}

@media screen and (max-width: 1300px) {
  .input_box {
    margin: 10px 0;
  }
  .container {
    height: 100%;
  }
  .input_box input {
    padding: 10px 40px 10px 20px;
    font-size: 16px !important;
  }
  .container h1 {
    font-size: 30px;
  }
  .btn {
    width: 100%;
    height: 30px;
    background-color: #b92828;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 400;
  }
}

@media screen and (max-height: 850px) and (max-width: 650px) {
  .input_box input {
    padding: 5px 40px 5px 20px;
  }
  .container h1 {
    font-size: 30px;
  }
  .btn {
    width: 100%;
    height: 30px;
    background-color: #b92828;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 400;
  }
  .container.active .toggle_box::before {
    top: 85%;
    left: 0;
    z-index: 1;
  }
}

@media screen and (max-width: 650px) {
  .toggle_panel {
    padding: 0 2em;
  }
  .toggle_panel p {
    text-align: center;
  }
  /* .container {
    height: calc(100vh - 70px);
  } */
  .form_box.login {
    bottom: 0;
    width: 100%;
    height: 100%;
  }
  .form_box.register {
    bottom: 0;
    width: 100%;
    height: 70%;
  }
  .social_icons {
    padding-bottom: 30px;
  }
  .container.active .form_box {
    right: 0;

    bottom: 20%;
  }
  .toggle_box::before {
    left: 0;
    top: -280%;
    width: 100%;
    height: 300%;
  }
  .container.active .toggle_box::before {
    top: 90%;
    left: 0;
    z-index: 1;
  }
  .toggle_panel {
    width: 100%;
    height: 20%;
  }

  .toggle_panel.toggle_left {
    top: 0;
  }
  .container.active .toggle_panel.toggle_left {
    left: 0;
    top: -30%;
  }
  .container .toggle_panel.toggle_left h1,
  .container .toggle_panel.toggle_right h1 {
    font-size: 20px;
  }
  .container .toggle_panel.toggle_left p,
  .container .toggle_panel.toggle_right p {
    font-size: 12px;
  }
  .toggle_panel.toggle_right {
    right: 0;
    bottom: -40%;
  }
  .container.active .toggle_panel.toggle_right {
    bottom: -40px;
    z-index: 2;
  }
  .toggle_box img {
    visibility: hidden;
    height: 0;
    width: 0;
  }
}

.open-modal {
  background: none;
  border: none;
  color: green;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

/* Modal backdrop */
.modal {
  display: none;
  align-items: center;
  justify-items: center;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
}

/* Modal content box */
.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-in-out;
}

/* Close button */
.modal-content .close {
  float: right;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}

/* Scrollable body for long terms */
.modal-body {
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2em;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .modal-content {
    margin: 10% auto;
    width: 95%;
    padding: 15px;
  }
  .modal-content h2 {
    font-size: 18px;
  }
  .modal-body {
    font-size: 14px;
  }
}

/* Fade animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 400px) {
  .form_box {
    padding: 20px;
  }
  .toggle_panel h1 {
    font-size: 30px;
  }
  .container.active .toggle_box::before {
    top: 85%;
    left: 0;
    z-index: 1;
  }
}
