/*
 * Customer promises — the visual language the legacy `.cart-bubbles` had.
 *
 * The bubble appearance never lived in this repository. The legacy cart and
 * checkout snippets printed `<div class="cart-bubbles">` and the styling came
 * from two Header Footer Code Manager entries stored in `wp_hfcm_scripts`
 * (HFCM 19 "CSS + JS on checkout", HFCM 22 "CSS on Cart page (top)").
 *
 * Renaming the classes was a deliberate Phase A decision, so that a page with
 * both renderers active would look visibly doubled instead of silently mixed.
 * Once the legacy blocks were switched off, that CSS matched nothing and the
 * promises rendered as bare text. The appearance therefore moves in here, under
 * the current class names, where a package controls it and a test can see it.
 *
 * Cart and checkout keep different backgrounds on purpose: each sits on a
 * different surface, so one shared colour would make the bubble disappear on
 * one of them. The renderer already emits `data-zas-promise-surface`.
 */

.zas-customer-promises {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.zas-customer-promises__item {
    display: inline-flex;
    width: fit-content;
    min-width: 0;
    padding: 7px 10px;
    align-items: flex-start;
    gap: 8px;
    border-radius: 10px;
    background: #eff9fc;
    color: #192d59;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
}

.zas-customer-promises[data-zas-promise-surface="cart"] .zas-customer-promises__item {
    background: #eff9fc;
}

.zas-customer-promises[data-zas-promise-surface="checkout"] .zas-customer-promises__item {
    background: #fff;
}

.zas-customer-promises__icon {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

/* Stroked with currentColor, so the icon follows the text on every surface.
 * The legacy icons were filled and needed an explicit white override on the
 * dark mobile cart bubble. */
.zas-customer-promises__icon svg {
    display: block;
    width: 16px;
    height: 16px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 768px) {
    .zas-customer-promises {
        flex-direction: column;
        align-items: flex-start;
    }

    .zas-customer-promises[data-zas-promise-surface="cart"] .zas-customer-promises__item {
        background: #192c59;
        color: #fff;
    }

    .zas-customer-promises[data-zas-promise-surface="checkout"] .zas-customer-promises__item {
        background: #daeff8;
    }
}
