// Range Slider Pro — sync the live value bubble + paint the gradient fill via custom property
document.querySelectorAll("[data-if-range]").forEach(function (input) {
var bubble = input.closest(".if-range").querySelector("[data-if-bubble]");
function update() {
var min = Number(input.min) || 0;
var max = Number(input.max) || 100;
var pct = ((Number(input.value) - min) / (max - min)) * 100;
input.style.setProperty("--if-range-fill", pct + "%");
if (bubble) bubble.textContent = String(input.value);
}
input.addEventListener("input", update);
update();
});