document.addEventListener("DOMContentLoaded",function(){const t=document.getElementById("rswpbs-review-form");if(!t)return;const e=t.querySelector(".awt-star-rating-select"),a=t.querySelector('input[name="rating"]');if(e&&a){const t=e.querySelectorAll(".awt-star-icon");t.forEach(e=>{e.addEventListener("click",function(){const e=this.getAttribute("data-rating");a.value=e,t.forEach(t=>{parseInt(t.getAttribute("data-rating"))<=parseInt(e)?(t.classList.remove("text-gray-300"),t.classList.add("text-yellow-400")):(t.classList.remove("text-yellow-400"),t.classList.add("text-gray-300"))})}),e.addEventListener("mouseenter",function(){const e=this.getAttribute("data-rating");t.forEach(t=>{parseInt(t.getAttribute("data-rating"))<=parseInt(e)&&(t.classList.remove("text-gray-300"),t.classList.add("text-yellow-400","opacity-70"))})}),e.addEventListener("mouseleave",function(){const e=a.value||0;t.forEach(t=>{t.classList.remove("opacity-70"),parseInt(t.getAttribute("data-rating"))<=parseInt(e)?(t.classList.remove("text-gray-300"),t.classList.add("text-yellow-400")):(t.classList.remove("text-yellow-400"),t.classList.add("text-gray-300"))})})})}});