Could anyone direct me to a good reference book(s) for quadratic integer rings? Ideally, the reference would begin with their elementary properties and then proceed through their ring-theoretic properties: for example, which quadratic integer rings are PIDs, which are UFDs, which are EDs, and which are multi-stage EDs. Also, if the reference could connect the subject material to elementary number theory that would be splendid. For example, connecting the primes of $\Bbb Z[i]$ with the primes of $\Bbb Z$ and solutions to Pell's Equation.
I've only read about these rings through books whose main purpose was to introduce the the fundamentals of abstract algebra, and I want a more specialized reference.
Any input is appreciated.