function togglePasswordVisibility() {
    const passwordInput = document.getElementById("password");
    const eyeOpenIcon = document.querySelector(
        ".lqd-show-password svg:nth-child(1)"
    );
    const eyeClosedIcon = document.querySelector(
        ".lqd-show-password svg:nth-child(2)"
    );

    if (passwordInput.type === "password") {
        passwordInput.type = "text";
        eyeOpenIcon.classList.add("hidden");
        eyeClosedIcon.classList.remove("hidden");
    } else {
        passwordInput.type = "password";
        eyeOpenIcon.classList.remove("hidden");
        eyeClosedIcon.classList.add("hidden");
    }
}

document.addEventListener("DOMContentLoaded", () => {
    const toggleButton = document.querySelector(".lqd-show-password");
    if (toggleButton) {
        toggleButton.addEventListener("click", togglePasswordVisibility);
    }
});
