@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=Quicksand:wght@400;600;700&family=Fredoka:wght@400;600;700&display=swap");

body {
  font-family: "Quicksand", "Trebuchet MS", sans-serif;
}

/* Center container vertically + horizontally */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6fa;
  /* subtle background, optional */
}

/* === Global Reset & Box Sizing === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* === Base Container === */
.container {
  display: flex;
  flex-direction: row;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin: 2rem auto;
  max-width: 1100px;
  width: 95%;
  min-height: 520px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: white;
}

/* === Left Panel (Title Section) === */
.login-title {
  flex: 1 1 50%;
  background: url("../../images/3dlogo") no-repeat center center/contain;
  border-radius: 16px 16px 16px 16px;
  margin: 40px;
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 400px;
  text-align: center;
}

.login-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 16px 16px 16px 16px;
}

.login-title h1 {
  position: relative;
  z-index: 1;
}

.login-title h1 {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.4;
}

.actions{
    display: flex;
    width: 100%;
    justify-content: space-between;
    text-wrap: nowrap;
    font-size: 14px !important;
}

.switch{
    background: black;
    border: 1px solid transparent;
    color: white !important;
}

.switch:hover{
    background: white;
    color: black !important;
    border: 1px solid black;
}

.switch-link{
    text-decoration: none !important;
}

a{
    text-decoration: none !important;
}

#termsCondition{
    font-size: 14px;
}
/* === Right Panel (Forms Wrapper) === */
.form-sections {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  position: relative;
}

/* === Login & Signup Sections === */
#loginSection,
#signupSection {
  display: none;
  width: 100%;
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#loginSection.active,
#signupSection.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* === Form Styles === */
.login-form {
  width: 100%;
  background: none;
  padding: 2rem;
}

.login-form h4 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  text-align: center;
}

label {
  display: block;
  margin: 0.6rem 0 0.3rem;
  font-size: 0.9rem;
  color: #444;
  font-weight: 500;
}

.input-container {
  position: relative;
}

.input-container i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 1rem;
}

/* Inputs, Selects, Buttons */
input,
select,
button,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
  background: #fff;
  transition: border 0.2s, box-shadow 0.2s;
  display: block;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2a7cf7;
  box-shadow: 0 0 0 3px rgba(42, 124, 247, 0.15);
  outline: none;
}

/* Button */
button {
  border: none;
  font-weight: 600;
  background: #2a7cf7;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #1d63c7;
}

/* Links */
a {
  color: #2a7cf7;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  text-decoration: underline;
}

/* Extra text */
p {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}

/* File Upload Box */
.upload-box {
  width: 100%;
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s;
}

.upload-box:hover {
  border-color: #2a7cf7;
}

.upload-box i {
  font-size: 1.4rem;
  color: #2a7cf7;
  margin-bottom: 0.4rem;
}

/* === Multi-column Rows === */
.name-row,
.demographics,
.third-row,
.fourth-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.name-row .form-group,
.demographics .form-group,
.third-row .form-group,
.fourth-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-group {
  margin-bottom: 1rem;
}

/* Checkbox alignment */
.form-group.four {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#agreeTerms {
    width: 10%;
    margin: 10px;
}

#termsCondition {
    white-space: nowrap;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }

  .login-title {
    border-radius: 16px 16px 16px 16px;
    min-height: 200px;
  }

  .form-sections {
    flex: 1 1 100%;
    padding: 1.5rem;
  }

  /* Stack signup form fields */
  .name-row,
  .demographics,
  .third-row,
  .fourth-row {
    flex-direction: column;
  }

  .name-row .form-group,
  .demographics .form-group,
  .third-row .form-group,
  .fourth-row .form-group {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .container {
    margin: 1rem;
  }

  .login-form {
    padding: 1.2rem;
  }

  input,
  select,
  button {
    font-size: 0.9rem;
    padding: 0.7rem;
  }

  /* tighter spacing for stacked inputs */
  .name-row,
  .demographics,
  .third-row,
  .fourth-row {
    gap: 0.75rem;
  }
}

/* === Signup Mode === */
.container.signup-mode .login-title {
  display: none;
}

.container.signup-mode {
  justify-content: center;
}

.container.signup-mode .form-sections {
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Expanded Signup Form on Desktop */
.container.signup-mode #signupSection {
  max-width: 850px;
  /* expanded width */
  width: 100%;
  margin: 0 auto;
}

.container.signup-mode .login-form {
  max-width: 100%;
  /* allow expansion */
}

/* replace your .errorMsg rule with this */
.errorMsg {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
  display: block;
  /* make it block so it can appear under inputs */
}

.errorMsg:empty {
  display: none;
  /* auto-hide when no message text */
}

/* optional: red outline for invalid fields */
/*.is-invalid {*/
/*  border-color: #dc2626 !important;*/
/*  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);*/
/*}*/
.is-valid {
  border-color: green !important;
}

.is-invalid {
  border-color: red !important;
}

.upload-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
}

.upload-box.has-image {
  border: none;
  padding: 0;
}

.upload-box img {
  max-width: 100%;
  max-height: 250px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 18px;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.remove-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.logo-container {
  display: flex;
  gap: 15px;
  /* space between logos */
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  position: relative;
  /* above overlay */
  z-index: 1;
  flex-wrap: wrap;
  /* wrap on smaller screens */
}

.logo-container img {
  width: 60px;
  /* force same width */
  height: 60px;
  /* force same height */
  object-fit: cover;
  /* crop proportionally */
  border-radius: 50%;
  /* perfectly round */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  /* subtle shadow */
  transition: transform 0.3s;
}

.logo-container img:hover {
  transform: scale(1.1);
  /* slight zoom on hover */
}

/* optional: smaller screens spacing */
@media (max-width: 480px) {
  .logo-container {
    gap: 10px;
    /* reduce spacing between logos */
  }

  .login-title h1 {
    font-size: 16px !important;
  }

  .login-title {
    margin: 10px;
  }
}

/* === Logo Media Queries === */
@media (max-width: 1024px) {
  .logo-container img {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 768px) {
  .logo-container img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .logo-container img {
    width: 40px;
    height: 40px;
  }

  .logo-container {
    gap: 10px;
    /* reduce spacing between logos */
  }
}

.pwReset_overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.pwReset_modal {
  background-color: #ffffff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  width: 320px;
  text-align: center;
  position: relative;
}

.pwReset_modal h2 {
  margin-top: 0;
  font-size: 20px;
}

.pwReset_modal input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.pwReset_inputWrapper {
  position: relative;
}

.pwReset_toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}

.pwReset_hint {
  font-size: 13px;
  margin: -5px 0 10px 0;
  text-align: left;
}

.pwReset_button {
  padding: 10px;
  width: 100%;
  margin-top: 5px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}

.pwReset_button.submit {
  background-color: #007bff;
  color: white;
}

.pwReset_button.close {
  background-color: #cccccc;
  color: black;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border: 2px dotted #004085;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

.spinner-text {
  color: #004085;
  display: inline-block;
  animation: fade 1.6s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

.reset-success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.reset-success-modal {
  background-color: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  text-align: center;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  animation: scaleUp 0.3s ease-in-out;
  font-family: Arial, sans-serif;
}

.reset-success-icon {
  font-size: 50px;
  color: #4BB543;
  /* green check */
  margin-bottom: 20px;
}

.reset-success-modal h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #333;
}

.reset-success-modal p {
  margin: 0 0 20px;
  color: #555;
}

.reset-success-modal button {
  padding: 10px 25px;
  border: none;
  border-radius: 6px;
  background-color: #4BB543;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.reset-success-modal button:hover {
  background-color: #3da236;
}

@keyframes scaleUp {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}
#loginMsg{
    font-size: 0.9em;
}