document.addEventListener('DOMContentLoaded', function () {

    document.querySelectorAll(".social-icon[data-share='copy_link']").forEach(function (btn) {
        btn.addEventListener("click", function (e) {
            e.preventDefault();
            navigator.clipboard.writeText(window.location.href).then(() => {
                alert(aurora_lite_share_texts.copyLink);
            }).catch(() => {
                const el = document.createElement('textarea');
                el.value = window.location.href;
                document.body.appendChild(el);
                el.select();
                document.execCommand('copy');
                document.body.removeChild(el);
                alert(aurora_lite_share_texts.copyLink);
            });
        });
    });

    const dropcapStyles = ['dropcase-pretty', 'dropcase-bold', 'dropcase-casual'];
    if (dropcapStyles.some(cls => document.body.classList.contains(cls))) {
        const firstP = document.querySelector('.post-content p');
        if (firstP) firstP.classList.add('aurora-lite-dropcap');
    }

});