
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Inherit fonts for inputs and buttons */
input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

:root {
  --main-colour: rgb(0, 125, 190);
  --secondary-colour: rgb(0, 100, 170);
}

body {
  /* font-family: 'Roboto', sans-serif; */
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  background-color: #f4f4f4;
}

.container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  max-width: 1200px;
}


/* header */
header {
  background-color: white;
  color: rgb(0, 125, 190);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

header img {
  width:250px;
  height: auto;
}

/* info section*/
.info {
  margin: 20px 0;
  line-height: 1.5;
  font-size: 1.1rem;
}

 /* Hero Section */
 .hero {
  background-color: rgb(0, 150, 220);
  color: #fff;
  text-align: center;
  padding: 2rem;
}

.cta-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.link {
  display: block;
  padding: 1rem;
  background-color: rgb(0, 125, 190);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
}

.link:hover {
  background-color: rgb(0, 100, 160);
  cursor:pointer;
}

.form-container {
  padding: 20px;
}

.row-group {
  display: flex;
  gap: 15px;
}

.row-compact{
  width: 50%;
  margin:0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 15px 0;
}

.required {
  color: red;
  /* margin-left: 5px; */
}


label {
  margin-bottom: 5px;
}

input,
select {
  padding: 10px;
  border: 2px solid var(--main-colour);
  border-radius: 4px;
  font-size: inherit;
}

input:focus,
select:focus {
  border: 2px solid #333;
}


/* ==================================  */


/* general button style */
button {
  background-color: var(--main-colour);
  color: white;
  padding: 15px;
  margin-top: 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  font-size: inherit;
}

button:hover {
  background-color: var(--secondary-colour);
}

/* ==================================  */

/* login button */

.buttons p {
  margin: 20px 0; 
  font-size: 0.9rem; 
  color: gray; /* a subtle color */
}

.buttons button {
  display: block; 
  margin-bottom: 20px; 
  width: 150px; 
}

.buttons button.register {
  display: block; 
  margin-bottom: 20px; 
  padding: 20px 0;
  width: 250px; 
}

h2 {
  margin-bottom: 20px;
  text-align: center;
}

/*  link styles for login and register buttons */
.buttons p a {
  color: var(--main-colour); /* Match with your main theme color */
  text-decoration: none; /* Remove underline */
  font-weight: bold; /* Make the links stand out */
  transition: color 0.3s ease; /* Add smooth color transition */
}

/* Link hover state */
.buttons p a:hover {
  color: var(--secondary-colour); /* Change to a secondary color on hover */
  text-decoration: underline; /* Optional: underline on hover */
}

button i{
  margin-right: 8px; 
  vertical-align: middle; /* Align the icon with the text */
}

.button-text {
  display: inline-flex; 
  align-items: center;  /* Align icon and text vertically in the middle */
}

.button-text i {
  margin-right: 8px; 
  vertical-align: middle; 
}

#forgotPasswordForm p {
  color: gray; 
  font-weight: 400;
  text-align: justify;
  line-height: 1.6;
}

/* For toggle password */

/* For checking password strength */

.password-criteria {
  margin-top: 5px;
  padding-left: 0;
  list-style: none;
}

.password-criteria li {
  font-size: 14px;
  color: red;
  display: flex;
  align-items: center;
}

.password-criteria .valid {
  color: green;
}

.password-criteria .invalid {
  color: red;
}

/* Confirm password check */

.error-message {
  color: red;
  font-size: 14px;
  margin-top: 4px;
}

.error-border {
  border: 2px solid red;
}

.spinner {
  border: 3px solid #f3f3f3; /* Light grey */
  border-top: 3px solid #3498db; /* green */
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.6s linear infinite;

  display: inline-block;
}

/* Spinner Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Style for modal */
.modal {
  /* display: none;  Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: #fff;
  padding: 50px;
  border-radius: 5px;
  text-align: center;
  max-width: 300px;
  width: 80%;
}

.hidden {
  display: none;
}

.register {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 16px;
  position: relative;
  background-color: #007dbf;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

/* Media queries */

/* tablets and smaller laptops */
@media (max-width: 1200px) {
  .container {
    padding: 20px;
  }

  .form-container {
    padding: 15px;
  }

  .row-group {
    gap: 10px;
  }

  button {
    padding: 12px;
    font-size: 14px;
  }
}

/* large smartphones and small tablets */
@media (max-width: 900px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  .hero {
    padding: 1.5rem;
  }

  .cta-links {
    flex-direction: column;
    gap: 10px;
  }

  .row-group {
    flex-direction: column;
    gap: 15px;
  }

  .row-compact {
    width: 70%;
  }
}

/* smartphones */
@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  header img {
    width: 150px;
  }

  .hero {
    padding: 1rem;
  }

  .form-container {
    padding: 10px;
  }

  .row-compact {
    width: 90%;
  }

  .row-group {
    flex-direction: column;
    gap: 10px;
  }

  .form-group {
    margin: 10px 0;
  }

  input, select {
    font-size: 14px;
    padding: 8px;
  }

  button {
    padding: 10px;
    font-size: 14px;
  }

  .password-criteria li {
    font-size: 12px;
  }
}

/* very small smartphones */
@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .cta-links a {
    font-size: 0.9rem;
    padding: 0.8rem;
  }

  input, select {
    font-size: 12px;
    padding: 6px;
  }

  button {
    font-size: 12px;
    padding: 8px;
  }

  .form-group label {
    font-size: 12px;
  }
}


/* =========================================================
   LOGIN AND CREATE ACCOUNT FORMS
   ========================================================= */

#existingApplicantForm,
#newApplicantForm {
    width: calc(100% - 30px);
    max-width: 500px;
    margin: 30px auto;
    box-sizing: border-box;
}
