
document.addEventListener("DOMContentLoaded", function() {
  const formBlock = document.querySelector("#rec2009045211");
  if (!formBlock) return;

  // Отслеживаем добавление successbox
  const observer = new MutationObserver(function(mutations) {
    mutations.forEach(function(mutation) {
      mutation.addedNodes.forEach(function(node) {
        if (node.classList && node.classList.contains("t-form__successbox")) {
          // Галочка
          const svgPath = node.querySelector("svg path");
          if (svgPath) svgPath.style.fill = "#124471";

          // Круг вокруг галочки
          const svgCircle = node.querySelector("svg circle");
          if (svgCircle) svgCircle.style.fill = "#CDDBE1";

          // Кнопка
          const btn = node.querySelector(".t-btn");
          if (btn) {
            btn.style.backgroundColor = "#124471";
            btn.style.color = "#F8F0E3";
            btn.style.borderRadius = "0px";
          }

          // Иконка успешной отправки
          const icon = node.querySelector(".t-form__success-icon");
          if (icon) icon.style.backgroundColor = "#F8F0E3";
        }
      });
    });
  });

  observer.observe(formBlock, { childList: true, subtree: true });
});