<style>
/* =========================
УБИРАЕМ ФОН AUTOFILL
========================= */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-background-clip: text !important;
background-clip: text !important;
background-color: transparent !important;
-webkit-text-fill-color: #d8d1c9 !important;
caret-color: #d8d1c9 !important;
-webkit-box-shadow: 0 0 0 1000px transparent inset !important;
box-shadow: 0 0 0 1000px transparent inset !important;
transition: background-color 9999s ease-out 0s !important;
}
</style>
<script>
(function () {
function init() {
const rec = document.querySelector('#rec4025153501');
if (!rec) {
setTimeout(init, 300);
return;
}
function clearAllErrors() {
/* убираем красные обводки со всех полей */
rec.querySelectorAll('.js-error-control-box').forEach(function(el) {
el.classList.remove('js-error-control-box');
});
/* убираем подписи ошибок */
rec.querySelectorAll('.t-input-error').forEach(function(el) {
el.style.display = 'none';
});
}
/*
Клик в любое поле формы —
сразу исчезают ВСЕ красные обводки
*/
rec.addEventListener('pointerdown', function(e) {
if (
e.target.closest(
'input, textarea, select, .t-checkbox, .t-checkbox__control, label'
)
) {
clearAllErrors();
}
}, true);
/*
Если человек попал в поле через Tab
*/
rec.addEventListener('focusin', function(e) {
if (
e.target.matches('input, textarea, select')
) {
clearAllErrors();
}
}, true);
}
init();
})();
</script>