<script>
document.addEventListener('DOMContentLoaded', function () {
if (window.innerWidth > 640) {
var popups = document.querySelectorAll('.t-popup');
popups.forEach(function (popup) {
var container = popup.querySelector('.t-popup__container');
var closeBtn = popup.querySelector('.t-popup__close');
if (container && closeBtn) {
container.insertBefore(closeBtn, container.firstChild);
}
});
}
});
</script>
<style>
@media (min-width: 641px) {
.t-popup__container .t-popup__close {
position: absolute !important;
top: 15px !important;
right: 15px !important;
z-index: 999 !important;
}
}
</style>