/* Authentication specific styles */

.auth-message
{
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
  animation: slideIn 0.3s ease-out;
}

.auth-message-error
{
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.auth-message-success
{
  background-color: #efe;
  color: #363;
  border: 1px solid #cfc;
}

@keyframes slideIn
{
  from
  {
    opacity: 0;
    transform: translateY(-10px);
  }
  to
  {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced captcha styles */
#captchaCanvas
{
  border: 2px solid var(--border);
  border-radius: 4px;
  background-color: #f0f0f0;
  cursor: pointer;
}

#captchaCanvas:hover
{
  border-color: var(--accent);
}

.captcha-container
{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

#refreshCaptcha
{
  padding: 10px 15px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
  min-width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#refreshCaptcha:hover
{
  background-color: var(--accent-secondary);
  transform: rotate(180deg);
}

#refreshCaptcha:active
{
  transform: rotate(180deg) scale(0.95);
}

/* Verification form styles */
.verification-form
{
  text-align: center;
  padding: 30px 20px;
}

.verification-form h3
{
  color: var(--accent-primary);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.verification-form p
{
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.countdown
{
  font-size: 2rem;
  color: var(--accent);
  margin: 25px 0;
  font-weight: bold;
  font-family: "Courier New", monospace;
  text-shadow: 0 2px 4px var(--shadow);
  animation: pulse 2s infinite;
}

@keyframes pulse
{
  0%,
  100%
  {
    opacity: 1;
  }
  50%
  {
    opacity: 0.7;
  }
}

#verificationCode
{
  width: 100%;
  max-width: 200px;
  padding: 15px;
  margin: 20px auto;
  border: 2px solid var(--border);
  border-radius: 8px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 18px;
  text-align: center;
  letter-spacing: 2px;
  font-weight: bold;
  transition: all 0.3s ease;
}

#verificationCode:focus
{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(77, 171, 247, 0.3);
}

#verifyCode
{
  width: 100%;
  max-width: 200px;
  padding: 12px 24px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

#verifyCode:hover
{
  background-color: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

#verifyCode:active
{
  transform: translateY(0);
}

#verifyCode:disabled
{
  background-color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* User info styles */
.user-info
{
  background-color: var(--accent-primary) !important;
  color: white !important;
  border-radius: 20px;
  padding: 8px 16px !important;
}

.user-info:hover
{
  background-color: var(--accent-secondary) !important;
}

/* Loading states */
.form-loading
{
  opacity: 0.7;
  pointer-events: none;
}

.form-loading button
{
  position: relative;
}

.form-loading button::after
{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Added styles for forgot password link as button */
.forgot-password-link
{
  display: inline-block;
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  margin-top: -10px;
  margin-bottom: 15px;
  padding: 0;
  cursor: pointer;
  transition: color 0.3s ease;
  font-family: inherit;
  text-align: left;
}

.forgot-password-link:hover
{
  color: var(--accent-secondary);
  text-decoration: underline;
}

.forgot-password-link:focus
{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Added password reset modal styles */
#forgotPasswordModal .modal-body,
#resetPasswordModal .modal-body
{
  padding: 30px;
}

#forgotPasswordModal .modal-body p,
#resetPasswordModal .modal-body p
{
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.6;
}

#forgotPasswordForm .form-group,
#resetPasswordForm .form-group
{
  margin-bottom: 20px;
}

#forgotPasswordForm label,
#resetPasswordForm label
{
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 500;
}

#forgotPasswordForm input,
#resetPasswordForm input
{
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.3s ease;
}

#forgotPasswordForm input:focus,
#resetPasswordForm input:focus
{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(77, 171, 247, 0.2);
}

#forgotPasswordForm button[type="submit"],
#resetPasswordForm button[type="submit"]
{
  width: 100%;
  padding: 14px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

#forgotPasswordForm button[type="submit"]:hover,
#resetPasswordForm button[type="submit"]:hover
{
  background-color: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

#forgotPasswordForm button[type="submit"]:active,
#resetPasswordForm button[type="submit"]:active
{
  transform: translateY(0);
}

#forgotPasswordForm button[type="submit"]:disabled,
#resetPasswordForm button[type="submit"]:disabled
{
  background-color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Mobile responsiveness */
@media (max-width: 480px)
{
  .captcha-container
  {
    flex-direction: column;
    align-items: stretch;
  }

  #captchaCanvas
  {
    align-self: center;
  }

  #refreshCaptcha
  {
    align-self: center;
    width: 150px;
  }

  .countdown
  {
    font-size: 1.5rem;
  }

  #verificationCode
  {
    max-width: 100%;
  }

  #verifyCode
  {
    max-width: 100%;
  }
  /* Added mobile styles for password reset modals */
  #forgotPasswordModal .modal-body,
  #resetPasswordModal .modal-body
  {
    padding: 20px;
  }
}

/* Added password input wrapper and toggle button styles */
.password-input-wrapper
{
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input
{
  padding-right: 45px;
  flex: 1;
}

/* Enhanced password toggle button visibility with stronger colors and border */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 45px;
  flex: 1;
}

.password-toggle
{
  position: absolute;
  right: 10px;
  background: #f0f0f0;
  border: 2px solid #ccc;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: all 0.2s ease;
  z-index: 10;
  border-radius: 4px;
  min-width: 32px;
  min-height: 32px;
}

.password-toggle:hover
{
  color: #000;
  background: #e0e0e0;
  border-color: #999;
  transform: scale(1.05);
}

.password-toggle:active
{
  transform: scale(0.95);
}

.password-toggle:focus
{
  outline: 2px solid var(--accent, #4dabf7);
  outline-offset: 2px;
}

.password-toggle svg
{
  width: 18px;
  height: 18px;
  pointer-events: none;
  display: block;
}
