/**
 * 注册步骤组件样式
 */

.register-step-container {
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

/* 左上角返回按钮 */
.back-button-top {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #344054;
  transition: all 0.2s ease;
  padding: 0;
  .login-lm-drawer-popover & {
    position: fixed;
    top: 12px;
    left: 12px;
  }
  .ant-modal-body & {
    position: absolute;
    left: -55px;
    top: -14px;
  }

  &:hover {
    color: #101828;
    background: #F9FAFB;
    border-radius: 8px;
  }

  &:active {
    color: #101828;
    background: #F2F4F7;
  }

  .anticon {
    font-size: 24px;
  }
}

.register-step-content {
  width: 100%;
  text-align: center;
}

.register-step-title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 32px;
  color: #101828;
  text-align: center;
}

.register-step-desc {
  margin: 0 0 24px 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  color: #475467;
  text-align: center;
}
.register-step-title-verify-email {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #101828;
  text-align: center;
}
.register-step-desc-verify-email {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 400;
  color: #475467;
  text-align: center;
}

/* 重发区域 */
.register-resend-section {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 20px;

  .resend-text {
    color: #475467;
    font-weight: 400;
  }

  .resend-link {
    color: var(--theme-color, #7F56D9);
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: all 0.2s ease;

    &:hover:not(:disabled) {
      opacity: 0.8;
      text-decoration: underline;
    }

    &:active:not(:disabled) {
      opacity: 0.6;
    }

    &:disabled {
      opacity: 0.4;
      cursor: not-allowed;
    }
  }
}

/* 登录提示 */
.register-login-prompt {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 20px;

  .prompt-text {
    color: #475467;
    font-weight: 400;
  }

  .login-link {
    color: var(--theme-color, #7F56D9);
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: all 0.2s ease;

    &:hover {
      opacity: 0.8;
      text-decoration: underline;
    }

    &:active {
      opacity: 0.6;
    }
  }
}

/* 邮箱已注册提示消息 */
.email-already-registered-message {
  margin: 0 0 32px 0;
  font-size: 16px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  line-height: 24px;
  color: #101828;
  text-align: center;
}

/* 验证码输入 */
.code-input-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0 24px 0;
}

.code-input-box {
  width: 80px;
  height: 80px;
  font-size: 40px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  text-align: center;
  color: var(--theme-color, #7F56D9);
  background: #FFFFFF;
  border: 2px solid #D0D5DD;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;

  &:focus {
    border-color: var(--theme-color, #7F56D9);
    box-shadow: 0px 0px 0px 4px rgba(127, 86, 217, 0.12);
  }

  &.has-value {
    border-color: var(--theme-color, #7F56D9);
  }

  &.has-error {
    border-color: #ff4d4f;
    box-shadow: 0px 0px 0px 4px rgba(255, 77, 79, 0.12);
  }

  &:disabled {
    background: #F9FAFB;
    cursor: not-allowed;
  }
}

.code-input-error {
  color: #ff4d4f;
  font-size: 14px;
  margin-top: -20px;
  margin-bottom: 24px;
  text-align: left;
  line-height: 22px;
  min-height: 22px;
}

/* 按钮样式 */
.register-submit-btn {
  height: 44px;
  margin-bottom: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  background: var(--theme-color, #7F56D9);
  border-color: var(--theme-color, #7F56D9);

  &:hover:not(:disabled) {
    background: var(--theme-color-hover, #6941C6);
    border-color: var(--theme-color-hover, #6941C6);
  }

  &:active:not(:disabled) {
    background: var(--theme-color-active, #53389E);
    border-color: var(--theme-color-active, #53389E);
  }
}

.register-back-btn {
  height: 44px;
  border-radius: 8px;
  font-size: 16px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  color: #344054;
  border: 1px solid #D0D5DD;
  background: #FFFFFF;

  &:hover {
    border-color: #98A2B3;
    background: #F9FAFB;
    color: #344054;
  }

  &:active {
    border-color: #667085;
    background: #F2F4F7;
    color: #344054;
  }
}

/* 成功图标 */
.success-icon-wrapper {
  margin: 0 auto 24px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 密码设置表单 */
.password-set-form {
  margin-top: 32px;

  .password-input {
    height: 44px;
    border-radius: 8px;
    font-size: 16px;

    input {
      font-size: 16px;
    }

    .ant-input-password-icon {
      color: #667085;
      font-size: 20px;
    }
  }

  .ant-form-item {
    margin-bottom: 16px;
  }

  .ant-form-item-explain-error {
    font-size: 14px;
    line-height: 20px;
    text-align: left;
  }
}

/* 邮箱显示区域 */
.register-email-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 32px 0;

  .email-text {
    line-height: 24px;
    color: #475467;
    font-size: 14px;
  }

  .edit-email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: all 0.2s ease;

    &:hover {
      background: #F9FAFB;
    }

    &:active {
      background: #F2F4F7;
    }
  }
}

/* 邮件链接验证页面 */
.verifying-email-link-page {
  .register-step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
  }

  .verifying-text {
    margin-top: 24px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: #101828;
    text-align: center;
  }
}

/* 邮件链接结果页面（过期、已使用） */
.email-link-expired-page,
.email-link-already-used-page {
  .email-link-result-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: #101828;
    text-align: center;
  }

  .email-link-result-desc {
    margin: 0 0 32px 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: #475467;
    text-align: center;
  }

  .register-footer-prompt {
    margin-top: 32px;
    text-align: center;
    font-size: 14px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 20px;
    color: #475467;

    .prompt-text {
      color: #475467;
    }

    .prompt-link {
      color: var(--theme-color, #7F56D9);
      font-weight: 600;
      cursor: pointer;
      background: transparent;
      border: none;
      padding: 0;
      text-decoration: none;
      transition: all 0.2s ease;

      &:hover {
        opacity: 0.8;
        text-decoration: underline;
      }

      &:active {
        opacity: 0.6;
      }
    }
  }
}

