/** * AKSRT Download Status * * Handles download center page interactions: * - Resource type filter animation * - Price badge hover effects * - Status bar refresh on download completion * * @package AKSRT */ (function () { 'use strict'; var DownloadStatus = { init: function () { if (document.documentElement.dataset.aksrtDownloadStatusBound === '1') return; document.documentElement.dataset.aksrtDownloadStatusBound = '1'; this.initFilterHighlight(); this.initCardHover(); }, /** * Animate filter button active state */ initFilterHighlight: function () { var filters = document.querySelectorAll('.aksrt-download-hero__filter'); if (filters.length === 0) return; filters.forEach(function (btn) { btn.addEventListener('mouseenter', function () { btn.style.transform = 'translateY(-1px)'; }); btn.addEventListener('mouseleave', function () { btn.style.transform = ''; }); }); }, /** * Card hover depth effect */ initCardHover: function () { var cards = document.querySelectorAll('.aksrt-download-card'); if (cards.length === 0) return; cards.forEach(function (card) { card.addEventListener('mouseenter', function () { card.style.transform = 'translateY(-2px)'; }); card.addEventListener('mouseleave', function () { card.style.transform = ''; }); }); }, }; jQuery(document).off('auto_fun.aksrt-download-status').on('auto_fun.aksrt-download-status', function () { DownloadStatus.init(); }); })();