
// Применяем стили ко всему документу
document.addEventListener('DOMContentLoaded', function() {
    // Создаем и добавляем глобальные стили
    const globalStyles = `
        /* Отключаем выделение при тапе на всем сайте */
        * {
            -webkit-tap-highlight-color: transparent !important;
            -moz-tap-highlight-color: transparent !important;
            -ms-tap-highlight-color: transparent !important;
            -o-tap-highlight-color: transparent !important;
            tap-highlight-color: transparent !important;
        }
        
        /* Убираем outline */
        *:focus {
            outline: none !important;
            box-shadow: none !important;
        }
        
        /* Специально для интерактивных элементов */
        .t-btn, a, button, input, textarea, select, .t-link {
            -webkit-tap-highlight-color: transparent !important;
        }
        
        /* Для мобильных устройств */
        @media (max-width: 768px) {
            * {
                -webkit-tap-highlight-color: transparent !important;
            }
        }
    `;
    
    // Добавляем стили в head
    const style = document.createElement('style');
    style.innerHTML = globalStyles;
    document.head.appendChild(style);
    
    // Дополнительно через JS для старых браузеров
    document.addEventListener('touchstart', function() {}, {passive: true});
    
    // Отключаем выделение для всех элементов при клике
    document.addEventListener('mousedown', function(e) {
        e.target.style.webkitTapHighlightColor = 'transparent';
        e.target.style.tapHighlightColor = 'transparent';
    });
});
