<script>
    document.addEventListener("DOMContentLoaded", function() {
        const providerSelect = document.querySelector(".appointment-provider");
        if (providerSelect) {
            const firstOption = providerSelect.options[0];
            if (firstOption) {
                firstOption.textContent = "انتخاب پزشک";
                firstOption.value = "";
            }

            const observer = new MutationObserver((mutationsList) => {
                mutationsList.forEach(mutation => {
                    if (mutation.type === "childList") {
                        const firstOption = providerSelect.options[0];
                        if (firstOption && firstOption.textContent !== "انتخاب پزشک") {
                            firstOption.textContent = "انتخاب پزشک";
                            firstOption.value = "";
                        }
                    }
                });
            });

            observer.observe(providerSelect, { childList: true });
        }
    });
</script>
