/*
 * GENERAL STYLES & LAYOUT
 */
:root {
  --new-green: #00df82;
  --grey-light: #f5f5f5;
  --text-color: #333;
  --border-color: #ddd;
  --shadow-color: rgba(0, 0, 0, 0.05);
}

body {
  font-family: 'DM Sans', sans-serif;
  display: flex;
  margin: 0;
  padding: 0;
  height: 100vh;
  color: var(--text-color);
}

/*
 * LEFT PANEL STYLING (The huge green section)
 */
.login-left-panel {
  width: 50%;
  background: var(--new-green);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
}

.login-left-panel h1 {
  color: #fff;
  font-size: 4rem;
  text-align: left;
  line-height: 1.2;
  max-width: 80%;
}
h2 {
  color: white;
}

/*
 * RIGHT PANEL STYLING (The login form section)
 */
.login-right-panel {
  width: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
}

/*
 * LOGIN CARD STYLING - SCALED UP
 */
.login-card {
  height: 50vh;
  border-radius: 20px;
  padding: 40px;
  margin-top: 30px;
  box-shadow: 10px 10px 0 0 rgba(0, 0, 0, 0.06);
  width: 30vw;
  max-width: 600px;
  box-sizing: border-box;
  background: #f7f7f7;
}

/*
 * LANGUAGE SELECT & FORM
 */
.logo-and-language {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 2rem;
}

.custom-select-wrapper {
  position: relative;
}

.language-select select {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--grey-light);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.language-select select:focus {
  outline: none;
  border-color: var(--new-green);
}

.custom-select-wrapper svg {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-color);
  pointer-events: none;
}

.input-label {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

#otpForm {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

#username {
  font-family: 'DM Sans', sans-serif;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1.5rem;
  transition: border-color 0.3s ease;
}
p {
  font-size: 36px;
  font-weight: 400;
}

#username:focus {
  outline: none;
  border-color: var(--new-green);
}

.submit {
  background: var(--new-green);
  color: #fff;
  padding: 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'DM Sans';
}

.submit:hover {
  filter: brightness(0.9);
}

/*
 * ERROR POPUP STYLING
 */
#error-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #e57373;
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  font-weight: bold;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/*
 * MOBILE RESPONSIVENESS
 */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: auto; /* Allow body to grow */
  }

  .login-left-panel,
  .login-right-panel {
    width: 100%;
    height: auto;
    padding: 2rem;
  }

  .login-left-panel h1 {
    font-size: 2.5rem; /* Smaller font for better fit */
    text-align: center; /* Center align text on mobile */
    max-width: 100%; /* Use full width */
  }

  .login-left-panel h2 {
    font-size: 1.25rem; /* Adjust heading size */
    text-align: center; /* Center align heading on mobile */
  }

  .login-right-panel {
    min-height: 50vh;
    padding-top: 0; /* Adjust padding to reduce vertical space */
  }

  .login-card {
    width: 100%; /* Make card fill the container */
    max-width: none; /* Remove max-width constraint */
    height: auto; /* Remove fixed height */
    padding: 2rem 1.5rem; /* Adjust padding for mobile */
    margin-top: 1.5rem; /* Adjust top margin */
  }

  .logo-and-language {
    justify-content: center; /* Center the language selector on mobile */
    margin-bottom: 1.5rem; /* Adjust margin */
  }

  .language-select select {
    font-size: 1rem; /* Smaller font for select box */
    padding: 0.5rem 2rem 0.5rem 0.5rem; /* Adjust padding */
  }

  .input-label {
    font-size: 1rem; /* Smaller font for labels */
  }

  #username {
    font-size: 1.25rem; /* Adjust font size for input */
    padding: 1rem; /* Adjust padding for input */
  }

  .submit {
    font-size: 1.5rem; /* Adjust font size for button */
    padding: 1rem; /* Adjust padding for button */
  }

  p {
    font-size: 1.5rem; /* Reduce large font size for mobile */
  }
}

