/* Only the native add-to-basket success message gets this marker.
 * Keep Woo's alert semantics and other success/error notices unchanged. */
html body .woocommerce-message:has(> .cie-added-to-basket-notice) {
    --cie-notice-ink: #465961;
    --cie-notice-accent: #a6ce39;
    --cie-notice-action-ink: #263238;
    --cie-notice-surface: #f6f7f6;
    box-sizing: border-box;
    padding: 12px 20px;
    border: 1px solid #e3e7e5;
    border-inline-start: 3px solid var(--cie-notice-accent);
    border-radius: 12px;
    background: var(--cie-notice-surface);
    color: var(--cie-notice-ink);
    box-shadow: none;
    font-size: 16px;
    line-height: 1.5;
}

/* Woo focuses its alert after adding an item; keep that focus visible in CIE colours. */
html body .woocommerce-message:has(> .cie-added-to-basket-notice):focus {
    outline: 2px solid var(--cie-notice-ink);
    outline-offset: 2px;
}

/* Replace the offset Woo icon/clearfix with a quiet CIE accent edge. */
html body .woocommerce-message:has(> .cie-added-to-basket-notice)::before,
html body .woocommerce-message:has(> .cie-added-to-basket-notice)::after {
    display: none;
}

html body .woocommerce-message > .cie-added-to-basket-notice {
    display: flex;
    align-items: center;
    gap: 12px 24px;
    min-inline-size: 0;
    min-block-size: 44px;
    overflow-wrap: anywhere;
}

/* Native text forms an anonymous flex item; preserve it without parsing HTML. */
html body .woocommerce-message > .cie-added-to-basket-notice > a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    order: 1;
    float: none;
    box-sizing: border-box;
    min-block-size: 44px;
    max-inline-size: 100%;
    margin: 0 0 0 auto;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--cie-notice-accent);
    color: var(--cie-notice-action-ink);
    box-shadow: none;
    font: inherit;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

html body .woocommerce-message > .cie-added-to-basket-notice > a.button:hover {
    background: var(--cie-notice-ink);
    color: #fff;
}

html body .woocommerce-message > .cie-added-to-basket-notice > a.button:focus-visible {
    outline: 2px solid var(--cie-notice-ink);
    outline-offset: 3px;
}

@media (max-width: 600px) {
    html body .woocommerce-message:has(> .cie-added-to-basket-notice) {
        padding: 14px 16px;
    }

    html body .woocommerce-message > .cie-added-to-basket-notice {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    html body .woocommerce-message > .cie-added-to-basket-notice > a.button {
        align-self: flex-start;
        margin: 0;
    }
}
