/* ===================================
   User Registration Form Styles
   =================================== */

.user-registration-wrapper {
  max-width: 600px;
  margin: 40px auto;
  padding: 0 20px;
}

.registration-form {
  background: #ffffff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Messages */
.registration-messages {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.registration-messages.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.registration-messages.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Form Grid */
.registration-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}

/* Garantir que todos os campos ocupem 1 coluna por padrão */
.registration-form-grid .form-field {
  grid-column: span 1;
}

/* Form Fields */
.form-field {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-field label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
  display: block;
}

.form-field .required-mark {
  color: #e74c3c;
  font-weight: 600;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  background-color: #fff;
  color: #333;
  box-sizing: border-box;
  height: 38px;
}

/* Inputs com botão de show/hide */
.form-field:has(.password-show-hide-btn) input,
.form-field:has(.email-show-hide-btn) input {
  padding-right: 45px;
}

.form-field input:focus,
.form-field select:focus {
  border-color: #04111d;
}

.form-field input::placeholder {
  color: #999;
  font-size: 13px;
}

/* Select styling */
.form-field select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 22px;
  height: auto;
  min-height: 38px;
}

.form-field select option {
  padding: 8px 12px;
  background: #fff;
  color: #333;
  line-height: normal;
}

/* Show/Hide Password Button */
.password-show-hide-btn,
.email-show-hide-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 11px; /* Ajuste para compensar o label - reduzido 2px */
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 16px;
  transition: color 0.3s;
  padding: 6px;
  line-height: 1;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.password-show-hide-btn:hover,
.email-show-hide-btn:hover {
  color: #04111d;
}

.password-show-hide-btn i,
.email-show-hide-btn i {
  pointer-events: none;
}

/* Submit Button */
.registration-submit-btn {
  width: 100%;
  padding: 14px;
  background-color: #004F6B;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.registration-submit-btn:hover {
  background-color: #003d54;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 79, 107, 0.3);
}

.registration-submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.registration-submit-btn .btn-loading i {
  margin-right: 5px;
}

/* Login Link / Toggle */
.registration-login-link {
  text-align: center;
  font-size: 14px;
  color: #666;
}

.registration-login-link a {
  color: #04111d;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s;
  cursor: pointer;
}

.registration-login-link a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* Form Toggle - Hide/Show */
.registration-form-container {
  display: block;
}

.registration-form-container.hidden {
  display: none;
}

.login-form-container {
  display: none;
}

.login-form-container.active {
  display: block;
}

/* Login Form Styles */
.login-form {
  background: #ffffff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-messages {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.login-messages.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.login-messages.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.login-form-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 25px;
}

.login-register-link {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 15px;
}

.login-register-link a {
  color: #04111d;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s;
  cursor: pointer;
}

.login-register-link a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.login-forgot-password {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 20px;
}

.login-forgot-password a {
  font-size: 13px;
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
}

.login-forgot-password a:hover {
  color: #04111d;
  text-decoration: underline;
}

/* Validation States */
.form-field input.error,
.form-field select.error {
  border-color: #e74c3c;
}

.form-field .error-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Tablet Responsive */
@media (max-width: 768px) {
  .registration-form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .registration-form {
    padding: 25px 20px;
  }

  .user-registration-wrapper {
    margin: 30px auto;
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .user-registration-wrapper {
    padding: 0 15px;
    margin: 20px auto;
  }

  .registration-form {
    padding: 20px 15px;
  }

  .form-field label {
    font-size: 13px;
  }

  .form-field input[type="text"],
  .form-field input[type="email"],
  .form-field input[type="password"],
  .form-field input[type="tel"],
  .form-field input[type="date"],
  .form-field select {
    font-size: 13px;
    padding: 7px 10px;
    height: 36px;
  }

  .form-field:has(.password-show-hide-btn) input,
  .form-field:has(.email-show-hide-btn) input {
    padding-right: 40px;
  }

  .password-show-hide-btn,
  .email-show-hide-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
    right: 5px;
  }

  .registration-submit-btn {
    padding: 12px;
    font-size: 15px;
  }
}

/* Loading State */
.registration-form.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Success Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.registration-messages {
  animation: fadeIn 0.3s ease;
}

/* ===================================
   Forgot Password Form Styles
   =================================== */

.forgot-password-form-container {
  display: none;
}

.forgot-password-form-container.active {
  display: block;
}

.forgot-password-form {
  background: #ffffff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.forgot-password-messages {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

.forgot-password-messages.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.forgot-password-messages.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.forgot-password-step {
  margin-bottom: 20px;
}

.forgot-password-step .form-field {
  margin-bottom: 20px;
}

.token-info {
  background-color: #e8f4fd;
  border: 1px solid #b8daff;
  color: #004085;
  padding: 15px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.forgot-password-back-link {
  text-align: center;
  font-size: 14px;
  margin-top: 15px;
}

.forgot-password-back-link a {
  color: #04111d;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s;
  cursor: pointer;
}

.forgot-password-back-link a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.resend-token-link {
  text-align: center;
  font-size: 13px;
  color: #666;
  margin-top: 15px;
}

.resend-token-link a {
  color: #04111d;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.resend-token-link a:hover {
  text-decoration: underline;
}

/* Token Input Styling */
#reset_token {
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
}
