It is known that the ring of integer is a Dedekind domain which means that it is a UFD iff it is a PID. Since $-7\equiv1$ mod $4$, we have that $\mathscr{O}_{\mathbb{Q}(\sqrt{-7})}=\mathbb{Z}\left[\frac{1+\sqrt{-7}}{2}\right]$. Now I read something in the sense of: if $\alpha:=\frac{1+\sqrt{-7}}{2}$ has an irreducible minimal polynomial mod $2$ and mod $3$, then we have a PID; I don't know anything about that. I think I have stated that wrong since the minimal polynomial is $f_{\alpha}=x^2-x+2$ which is reducible mod $2$.
Dr. Math: We pick an arbitrary complex number $x + iy\in\mathbb{Z}[\alpha]$, and we must find a suitable lattice point:
$$z = r + s\alpha = (r+s/2) + i(s\sqrt{7})/2.$$
It is natural to try to have the real and imaginary parts of $(x + yi - z)$ as small as possible.
Let's start with the imaginary part $ y - s\sqrt{7}/2$. We take $s$ as the closest integer to $2y/\sqrt{7}$. This will give us the following: \begin{align*} | 2y/\sqrt{7} - s | &\leqslant 1/2\\ | y - s\sqrt{7}/2 | &\leqslant \sqrt{7}/4. \end{align*} Now, we turn to the real part $x - r - s/2$. If we select $r$ as the integer closest to $(x - s/2)$, we will have: \begin{align*} | x - r - s/2 | \leqslant 1/2. \end{align*} Putting both relations together, we get: $$ N(x + yi - z) = (x - r - s/2)^2 + (y - s\sqrt{7}/2)^2 \leqslant 1/4 + 7/16 < 1$$
as desired. Hence, Euclidean domain, so PID, so UFD.
Is this proof correct and can it be applied in all cases of showing that $\mathbb{Z}\left[\frac{1+\sqrt{d}}{2}\right]$, $\square\neq d\in\mathbb{N}$ is a Euclidean domain?