{#
GR1 — THE one branded footer for every external surface (track GROWTH).
Usage (screen): include with {'surface': 'proposal', 'app_id': appId|default(0)}
Usage (print): include with {'surface': 'pdf_voucher', 'variant': 'print'}
Vars: surface (required slug — becomes ?ref=), variant 'screen'|'print' (default screen),
app_id (optional; falls back to the logged-in session's appId; 0 = link without t).
Tenant kill switch: acc_setting `branding_removal_enabled` = '1' renders NOTHING (white-label).
RULES: quiet + functional, footer only, never inside legal content
(feedback_preserve_functionality_on_retheme). NOTE: twig comments do not nest — keep this
block free of literal tags.
#}
{% set _hb_app_id = 0 %}
{% if app_id is defined and app_id %}
{% set _hb_app_id = app_id %}
{% elseif app is defined and app.request is defined and app.request and app.session %}
{% set _hb_app_id = app.session.get('userAppId')|default(0) %}
{% endif %}
{% if hb_branding_enabled(_hb_app_id|default(0)) %}
{% set _hb_url = hb_backlink(surface|default('unknown'), _hb_app_id|default(0)) %}
{% if variant|default('screen') == 'print' %}
<div class="hb-powered-print" style="text-align:center; font-size:12px; color:#777; margin-top:8px;">
Powered by <a href="{{ _hb_url }}" style="color:#777; text-decoration:none;"><strong>HoneyBee</strong></a> — run your business on it · ourhoneybee.eu
</div>
{% else %}
<div class="hb-powered" style="text-align:center; font-size:12px; color:#8a8f8f; padding:14px 10px 10px; line-height:1.4;">
Powered by <a href="{{ _hb_url }}" target="_blank" rel="noopener" style="color:#b8860b; text-decoration:none; font-weight:600;">HoneyBee</a>
— run your business on it
</div>
{% endif %}
{% endif %}