/* ===================================
   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;
}

.registration-form-grid .form-field-full {
  grid-column: 1 / -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 textarea,
.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 textarea {
  min-height: 100px;
  height: auto;
  resize: vertical;
  line-height: 1.45;
}

.partner-terms-label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.partner-terms-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.partner-login-action {
  margin-top: 12px;
}

.partner-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 4px;
  background: #04111d;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.partner-login-button:hover {
  background: #132638;
  color: #fff !important;
  text-decoration: none;
}

.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 textarea: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: var(--color-primary, #aaff80) !important;
  color: #000000 !important;
  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: #94e66b !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(148, 230, 107, 0.35);
}

/* Força a cor primária caso outros estilos tenham prioridade */
body .registration-form .registration-submit-btn,
body .login-form .registration-submit-btn {
  background-color: var(--color-primary, #aaff80) !important;
  border-color: var(--color-primary, #aaff80) !important;
  color: #000000 !important;
}

body .registration-form .registration-submit-btn:hover,
body .login-form .registration-submit-btn:hover {
  background-color: #94e66b !important;
  border-color: #94e66b !important;
}

.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;
}

/* Lost password (WooCommerce endpoint) */
.lost-password-wrapper {
  max-width: 600px;
  margin: 40px auto;
  padding: 0 20px;
}

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

.lost-password-title {
  font-family: var(--font-heading, "Montserrat", Arial, sans-serif);
  font-size: 22px;
  margin: 0 0 15px;
  color: var(--color-text, #212326);
}

.lost-password-form .woocommerce-form-row,
.lost-password-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.lost-password-form label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.lost-password-form input[type="text"],
.lost-password-form input[type="email"],
.lost-password-form input[type="password"] {
  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;
}

.lost-password-form input:focus {
  border-color: #04111d;
}

.lost-password-form .woocommerce-Button,
.lost-password-form button,
.lost-password-form .button {
  width: 100%;
  padding: 14px;
  background-color: var(--color-primary, #aaff80) !important;
  color: #000000 !important;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: none;
}

.lost-password-form .woocommerce-Button:hover,
.lost-password-form button:hover,
.lost-password-form .button:hover {
  background-color: #94e66b !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(148, 230, 107, 0.35);
}

.lost-password-back {
  text-align: center;
  margin-top: 14px;
}

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

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

.lost-password-notice {
  margin-bottom: 15px;
  padding: 12px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
}

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

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

/* 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 textarea,
  .form-field select {
    font-size: 13px;
    padding: 7px 10px;
    height: 36px;
  }

  .form-field textarea {
    min-height: 96px;
    height: auto;
  }

  .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;
}

/* ===================================
   Password Reset Custom Form
   =================================== */

.password-reset-step {
  animation: fadeIn 0.3s ease;
}

.password-reset-form {
  position: relative;
}

.lost-password-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}

#reset-email-display {
  font-weight: 600;
  color: #333;
}

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

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

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

/* Token input */
.token-input {
  font-family: monospace;
  font-size: 24px !important;
  letter-spacing: 8px;
  text-align: center;
  height: 52px !important;
  padding: 10px 15px !important;
}

.token-input::placeholder {
  letter-spacing: 8px;
  opacity: 0.4;
}

/* Password reset actions */
.password-reset-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.password-reset-actions .separator {
  color: #ccc;
}

.resend-code-link {
  background: none;
  border: none;
  color: #04111d;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 5px;
  transition: opacity 0.3s;
}

.resend-code-link:hover {
  opacity: 0.7;
}

.resend-code-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.resend-code-link i {
  margin-right: 4px;
}

.back-to-email-link {
  color: #666;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
}

.back-to-email-link:hover {
  color: #04111d;
  text-decoration: underline;
}

/* Success state */
.password-reset-success {
  text-align: center;
  padding: 30px 20px;
}

.password-reset-success i {
  font-size: 64px;
  color: #28a745;
  margin-bottom: 20px;
}

.password-reset-success h2 {
  margin-bottom: 10px;
}

.password-reset-success p {
  color: #666;
  font-size: 14px;
}

/* Form fields in password reset */
.password-reset-form .form-field {
  margin-bottom: 20px;
  position: relative;
}

.password-reset-form .form-field:last-of-type {
  margin-bottom: 25px;
}

/* Password show/hide button in reset form */
.password-reset-form .password-show-hide-btn {
  position: absolute;
  right: 8px;
  top: auto;
  bottom: 3px;
  transform: none;
  margin-top: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #666;
  font-size: 16px;
  padding: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.password-reset-form .password-show-hide-btn:hover {
  color: #04111d;
}

/* Ajustar padding do input para não sobrepor o botão */
.password-reset-form .form-field input[type="password"],
.password-reset-form .form-field input[type="text"] {
  padding-right: 45px;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .token-input {
    font-size: 20px !important;
    letter-spacing: 6px;
    height: 48px !important;
  }

  .token-input::placeholder {
    letter-spacing: 6px;
  }

  .password-reset-actions {
    flex-direction: column;
    gap: 8px;
  }

  .password-reset-actions .separator {
    display: none;
  }

  .password-reset-success i {
    font-size: 48px;
  }
}
