/* Online quote links on the Flex Face and TexSign product pages. */
.page-id-315 main .elementor-widget-text-editor a[href$="/contact/#form-field-name"],
.page-id-244 main .elementor-widget-text-editor a[href$="/contact/#form-field-name"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 6px 18px;
    border-radius: 5px;
    color: #fff;
    background-color: #2252a0;
    text-decoration: none;
}
.page-id-315 main .elementor-widget-text-editor a[href$="/contact/#form-field-name"]:hover,
.page-id-244 main .elementor-widget-text-editor a[href$="/contact/#form-field-name"]:hover {
    background-color: #1c244b;
}
.page-id-315 main a[href$="/contact/#form-field-name"]:focus-visible,
.page-id-244 main a[href$="/contact/#form-field-name"]:focus-visible,
.page-id-608 .elementor-form .elementor-field:focus-visible,
.page-id-608 .elementor-form button:focus-visible {
    outline: 3px solid #1c244b;
    outline-offset: 3px;
}
.page-id-608 #form-field-name {
    scroll-margin-top: 7rem;
}

/* Give the TexSign gallery dots a larger tap and keyboard-focus area. */
body.page-id-244 .elementor-widget-media-carousel .swiper-pagination .swiper-pagination-bullet {
    box-sizing: border-box;
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 10px solid transparent;
    background-clip: padding-box;
    vertical-align: middle;
    margin: 0 1px;
}
body.page-id-244 .elementor-widget-media-carousel .swiper-pagination-bullet:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

document.addEventListener('DOMContentLoaded', function() {
  // Listen for Search & Filter Ajax updates
  document.addEventListener('sf:ajaxComplete', function() {
    // Offset scroll to leave space for sticky header
    var headerHeight = 250; // change this to your header height
    var results = document.querySelector('.searchandfilter-results');
    if(results) {
      var offsetTop = results.getBoundingClientRect().top + window.pageYOffset - headerHeight;
      window.scrollTo({ top: offsetTop, behavior: 'smooth' });
    }
  });
});
