/**
 * Lens — AI Visibility Monitor.
 * Crawler activity table filter.
 */
(function () {
	'use strict';

	var input = document.getElementById('lens-crawler-filter');
	var rows  = document.querySelectorAll('#lens-crawler-table tbody tr');
	if (!input || !rows.length) { return; }

	input.addEventListener('input', function () {
		var q = input.value.toLowerCase().trim();
		rows.forEach(function (row) {
			row.style.display = !q || row.textContent.toLowerCase().indexOf(q) !== -1 ? '' : 'none';
		});
	});
})();
