// Trusted-by strip — now a Trustindex Google reviews carousel widget.
// Renders a slim section with the section heading and the live widget below.
// Pass a different `loaderUrl` if you've configured a dedicated carousel widget
// on Trustindex; otherwise it falls back to the main reviews loader URL.
function LogoCarousel({ loaderUrl }) {
  return (
    <section style={{ background: '#fff', borderTop: '1px solid #e6efee', borderBottom: '1px solid #e6efee', padding: '28px 32px 36px' }}>
      <div style={{
        fontSize: 13, fontWeight: 700, letterSpacing: '0.08em', textTransform: 'uppercase',
        color: '#163F34', textAlign: 'center', marginBottom: 18,
      }}>Trusted by service businesses nationwide</div>
      <div style={{ maxWidth: 1280, margin: '0 auto' }}>
        {loaderUrl
          ? <TrustindexEmbed loaderUrl={loaderUrl} minHeight={220} />
          : (
            <div style={{
              maxWidth: 640, margin: '0 auto',
              background: '#f5faf9', border: '1.5px dashed #cce0de', borderRadius: 14,
              padding: '20px 24px', textAlign: 'center',
              fontSize: 13.5, color: '#345048', lineHeight: 1.55,
            }}>
              Paste a Trustindex loader URL into <strong style={{ color: '#163F34' }}>Tweaks → Trustindex carousel URL</strong> to show a live Google reviews strip here.
            </div>
          )
        }
      </div>
    </section>
  );
}
Object.assign(window, { LogoCarousel });
