/* WEVAL Icon Pro — Replace emojis with gradient SVG icons */
(function(){
const M={
'✍️':'',
'🚀':'',
'⚡':'',
'🖥️':'',
'☁️':'',
'🔒':'',
'📊':'',
'⚙️':'',
'🧬':'',
'📈':'',
'🏆':'',
'🧠':'',
};
const S='width:28px;height:28px;display:inline-block;vertical-align:middle;';
function run(){
document.querySelectorAll('span').forEach(el=>{
const t=el.textContent.trim();
if(M[t]){
el.innerHTML=M[t];
el.style.cssText=S+(el.style.fontSize==='1.5rem'?'width:32px;height:32px;':'');
}
});
// Filter buttons: replace emoji prefix only
document.querySelectorAll('.wia-filter').forEach(el=>{
const html=el.innerHTML;
for(const[e,svg] of Object.entries(M)){
if(html.includes(e)){
el.innerHTML=html.replace(e,''+svg+'');
break;
}
}
});
}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',()=>setTimeout(run,500));
else setTimeout(run,500);
// Re-run on route changes (SPA)
new MutationObserver(()=>setTimeout(run,300)).observe(document.body,{childList:true,subtree:true});
})();