@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

body {
  font-family: "Poppins", sans-serif;
  background-color: #f0f2f5;
  background-image: url(./img/ssfo-background.png);
  background-size: cover;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.container {
  background: #fff;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 100%;
  box-sizing: border-box;
}

.container h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #e70022;
}

.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 2rem 0.75rem 2.5rem;
  border: 1px solid #e70022;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

.form-group .icon-left {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #e70022;
}

.form-group .error-message {
  color: red;
  font-size: 0.8rem;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  padding-top: 0.2rem;
  display: flex;
  align-items: center;
}

.form-group .error-message i {
  margin-right: 0.5rem;
}

.error-message i {
  display: none;
}

.error-message.show-icon i {
  display: inline;
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.actions a {
  color: #e70022;
  text-decoration: none;
  font-size: 0.9rem;
}

.actions a:hover {
  text-decoration: underline;
}

button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 5px;
  background-color: #e70022;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

.back-link {
  text-align: center;
  margin-top: 1.5rem;
}

.back-link a {
  color: #e70022;
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

.general-error-message,
.success-message {
  display: none;
  text-align: center;
  margin-top: 1rem;
  color: red;
  font-size: 0.9rem;
}

.success-message {
  color: green;
}

input:focus {
  outline: #e70022;
}

input:focus {
  border-color: #e70022;
}

/* Responsive Design */
@media screen and (max-width: 480px) {
  .container {
    padding: 1.5rem;
    max-width: 350px;
    margin-top: -6em;
  }

  .form-group input {
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
  }

  .form-group .icon-left {
    left: 0.75rem;
  }
}

@media screen and (max-width: 360px) and (max-height: 800px) {
  .container {
    padding: 1rem;
    max-width: 320px;
    height: auto;
    margin-top: -6em;
  }

  .container h2 {
    font-size: 25px;
  }

  .form-group input {
    font-size: 14px;
    padding: 10px 35px;
  }

  .form-group .icon-left {
    left: 0.75rem;
  }

  .actions a {
    font-size: 0.9rem;
  }

  button {
    padding: 0.7rem;
    border-radius: 10px;
    font-size: 15px;
  }

  .back-link a {
    font-size: 1rem;
  }

  .general-error-message,
  .success-message {
    font-size: 0.9rem;
  }
}

/* LOADING OVERLAY */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Darker semi-transparent background */
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* Ensure it appears above other content */
  font-family: "Poppins", sans-serif; /* Ensure font consistency with your application */
}

.loading-spinner {
  border: 8px solid rgb(255, 255, 255);
  border-radius: 50%;
  border-top: 8px solid #e70022;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

.loading-overlay p {
  margin-top: 15px; /* Space between the spinner and text */
  font-size: 18px; /* Larger font size for better visibility */
  font-weight: 500; /* Medium weight for a polished look */
  text-align: center; /* Center the text */
}

/* Spin animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
