{% sw_extends '@Storefront/storefront/base.html.twig' %} {% block base_body_inner %}
{# Runtime merchant-configured colors + border radii for the intercept page. Applied to `:root` so all descendants inherit; emitted here in (the standard HTML5 place for page-scoped stylesheets) so styles resolve on the first paint — no flash of unstyled content. Why an inline{% set bubbleTpl = bubbleTextTemplate %} {% if customerFirstName %} {% set bubbleTpl = bubbleTpl|replace({'{name}': '' ~ customerFirstName|sw_sanitize ~ ','}) %} {% else %} {% set bubbleTpl = bubbleTpl|replace({'{name},': ''})|replace({'{name}': ''}) %} {% endif %} {% if bannerPct > 0 %} {% set bubbleTpl = bubbleTpl|replace({'{discount}%': '' ~ bannerPct|round(0) ~ '% OFF'}) %} {% set bubbleTpl = bubbleTpl|replace({'{discount}': bannerPct|round(0) ~ '%'}) %} {% else %} {% set bubbleTpl = bubbleTpl|replace({'{discount}% OFF': ''})|replace({'{discount}%': ''})|replace({'{discount}': ''}) %} {% endif %} {% if countdownSeconds > 0 and expiresAt and '{countdown}' in bubbleTpl %} {% set parts = bubbleTpl|split('{countdown}') %} {{ parts[0]|sw_sanitize|raw }} {% set m = (countdownSeconds / 60)|round(0, 'floor') %}{% set s = (countdownSeconds % 60) %}{{ m }}:{{ '%02d'|format(s) }} {{ parts[1]|sw_sanitize|raw }} {% else %} {% set bubbleTpl = bubbleTpl|replace({'{countdown}': ''}) %} {{ bubbleTpl|sw_sanitize|raw }} {% endif %}