/* --- MAIN AUTH MODAL STYLES --- */

#authModal .form-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 39.06px;
  color: #1a629e;
  text-align: center;
  margin: 30px 0;
}

#authModal .modal-dialog {
  max-width: 35%;
}

#authModal .modal-content {
  background: #dcecf9;
  box-shadow: 0px 4px 4px 0px #00000040;
}

#authModal .form-container {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 4px 4px 100px 10px #00000026;
  padding: 30px;
  position: relative;
  min-height: 600px;
  margin: 10px auto 40px;
  width: 100%;
  max-width: 550px; /* Moved from .container to prevent Bootstrap conflicts */
}

#authModal .form-logo {
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto 20px;
  cursor: pointer;
}

#authModal .form-subtitle {
  text-align: center;
  margin-bottom: 20px;
  color: #044c4e;
  font-size: 30px;
  font-weight: 700;
  line-height: 39.06px;
}

#authModal .login-text {
  text-align: center;
  margin-bottom: 30px;
  font-size: 20px;
  font-weight: 700;
  line-height: 26.04px;
  color: #044c4e;
}

#authModal .login-text a {
  color: #1a629e;
  text-decoration: underline;
}

#authModal .form-group {
  position: relative;
  margin-bottom: 15px;
}

#authModal .form-group input {
  width: 100%;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 5px;
  outline: none;
  background: transparent;
  transition: border 0.3s ease-in-out;
}

#authModal .form-group input:focus {
  border-color: #004d66;
}

#authModal .form-group label {
  position: absolute;
  top: 50%;
  left: 2.5rem;
  transform: translateY(-50%);
  background: white;
  padding: 0 4px;
  color: #666;
  transition: all 0.3s ease-in-out;
  pointer-events: none;
}

#authModal .form-group input:focus + label,
#authModal .form-group input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 0.85em;
  color: #004d66;
}

#authModal .form-group .icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
}

#authModal .form-content {
  display: none;
}

#authModal .form-content.active {
  display: block;
  animation: formFadeIn 0.4s ease-out forwards;
}

@keyframes formFadeIn {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* State Autocomplete */
#authModal .state-autocomplete-wrapper {
  position: relative;
  margin-bottom: 15px;
}

#authModal .state-autocomplete-wrapper .form-group {
  margin-bottom: 0;
}

#authModal #state-suggestions-container {
  margin-top: 5px;
  border-radius: 5px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  border: 1px solid #1a629e;
  position: relative;
  z-index: 10;
  padding: 10px;
  background: #f6fbff;
  box-shadow: 0px 4px 4px 0px #00000040;
}

#authModal .suggestion-item {
  color: #152850;
  font-size: 16px;
  font-weight: 600;
  line-height: 18px;
  margin-bottom: 5px;
  cursor: pointer;
}

#authModal .suggestion-item:last-child {
  margin-bottom: 0;
}

#authModal .suggestion-item:hover {
  background-color: #eef6fc;
}

/* Buttons and Links */
#authModal .log-in-btn,
#authModal .get-started {
  display: flex;
  justify-content: center;
  width: 55%;
  padding: 12px;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 0 auto;
  background: linear-gradient(270deg, #1d9097 0%, rgba(9, 47, 49, 0.8) 100%);
  transition: background-color 0.3s;
  font-size: 25px;
  font-weight: 700;
  line-height: 39.06px;
}

#authModal .log-in-btn:hover,
#authModal .get-started:hover {
  background-color: #00384d;
}

#authModal .forgot-password {
  display: block;
  text-align: center;
  margin: 20px 0;
  color: #1a629e;
  text-decoration: none;
}

/* Errors */
#authModal .form-group.has-error input {
  border-color: #dc3545;
}

#authModal .form-group.has-error label {
  color: #dc3545;
}

#authModal .error-message-container {
  margin-top: 5px;
  padding-left: 2.15rem;
}

#authModal .error-message {
  color: #dc3545;
  font-size: 0.85em;
  display: none;
  margin-bottom: 3px;
}

#authModal .error-message::before {
  content: "•";
  margin-right: 5px;
}

#authModal #login-form-error-container {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 4px;
}

#authModal #login-form-error-container .error-message {
  padding-left: 0;
  text-align: center;
}

#authModal #login-form-error-container .error-message::before {
  content: none;
}

/* --- OVERLAY & LOADER STYLES --- */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
}

.loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  display: none;
}

.loader .overlay-text {
  color: white;
}

.loader .loader-icon {
  font-size: 2em;
  vertical-align: middle;
  margin-right: 0.5em;
}

/* --- OTP MODAL STYLES --- */
#otpVerificationModal .otp-modal-content h1 {
  font-size: 24px;
  color: #1a629e;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.3;
}

#otpVerificationModal .otp-modal-content p {
  margin: 10px;
}

#otpVerificationModal .otp-username-display {
  margin-bottom: 16px;
}

#otpVerificationModal .otp-username-display span {
  font-weight: 600;
  color: #00695c;
}

#otpVerificationModal .otp-instruction-text {
  color: #067577;
  font-weight: bold;
}

#otpVerificationModal .otp-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

#otpVerificationModal .otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #4db6ac;
  color: #00796b;
  transition: all 0.2s ease;
}

#otpVerificationModal .otp-input:focus {
  outline: none;
  border: 3px solid #1a629e;
  box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.2);
}

#otpVerificationModal .otp-input::-webkit-outer-spin-button,
#otpVerificationModal .otp-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#otpVerificationModal .otp-input[type="number"] {
  -moz-appearance: textfield;
}

#otpVerificationModal .otp-validity-note {
  font-size: 14px;
  color: #e53935;
  margin-bottom: 24px;
}

#otpVerificationModal .otp-resend-code {
  font-size: 14px;
  color: #067577;
}

#otpVerificationModal .otp-resend-code a {
  font-weight: 600;
  transition: color 0.2s;
}

#otpVerificationModal .otp-resend-code a:hover {
  color: #004d40;
}

#otpVerificationModal .otp-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  justify-content: center;
}

#otpVerificationModal .otp-modal-btn {
  width: 30%;
  padding: 14px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

#otpVerificationModal .otp-btn-verify {
  color: white;
  background-image: linear-gradient(to right, #26a69a, #00897b);
}

#otpVerificationModal .otp-btn-verify:hover {
  opacity: 0.9;
}

#otpVerificationModal .otp-btn-close {
  color: #37474f;
  background-color: white;
  border: 1px solid #b0bec5;
}

#otpVerificationModal .otp-btn-close:hover {
  background-color: #f5f5f5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #authModal .form-container {
    padding: 20px;
  }

  #authModal .get-started,
  #authModal .log-in-btn {
    width: 80%;
  }
}
