document.getElementById("tagSearch").addEventListener("input", function() {
const searchQuery = this.value.toLowerCase(); // Get the user's input and convert it to lowercase
const items = document.querySelectorAll(".summary-item"); // Select all items in the Summary Block
items.forEach(item => {
// Find the tags associated with the item
const tags = item.querySelectorAll(".tag-label"); // Adjust the selector if your tags have a different class
let matches = false;
// Check if the item's tags include the search query
tags.forEach(tag => {
if (tag.textContent.toLowerCase().includes(searchQuery)) {
matches = true;
}
});
// Show or hide the item based on whether it matches the search
item.style.display = matches ? "block" : "none";
});
});