document.addEventListener('DOMContentLoaded', function() {
    // Get all footer cells for our column
    const footerCells = document.querySelectorAll('tfoot td.mementor_tts');
    
    if (footerCells.length > 0) {
        // For each footer cell, attempt to apply the same structure as the header
        footerCells.forEach(function(cell) {
            // Check if the cell already has the intended structure to avoid redundant operations
            if (!cell.querySelector('.mementor-tts-logoicon-text')) { // Assuming this class exists in the header version
                // Get the corresponding header cell content if available
                const headerCell = document.querySelector('thead th#mementor_tts'); // More specific selector for header
                if (headerCell) {
                    // Clone the header content to avoid modifying the original
                    const headerContentClone = headerCell.cloneNode(true);
                    // Clear the current footer cell content
                    cell.innerHTML = ''; 
                    // Append the cloned header content
                    // We append children of the cloned header to avoid nesting th inside td
                    while (headerContentClone.firstChild) {
                         cell.appendChild(headerContentClone.firstChild);
                    }
                } else {
                     if (window.mementorTTSDebugSettings && window.mementorTTSDebugSettings.isDebug) { console.warn('Mementor TTS: Could not find header cell #mementor_tts to clone structure.'); }
                }
            } else {
            }
        });
    }
}); 