/* Vector UI symbols: use real SVG assets instead of font-dependent glyphs.
 * Preserve stored Gutenberg copy and accessible labels as graceful fallback. */
:is(.sm-primary-button, .sm-outline-button) > .wp-block-button__link > span[aria-hidden="true"] {
    display: inline-block;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    font-size: 0 !important;
    line-height: 0;
    background-color: currentColor;
    -webkit-mask: url(/wp-content/themes/northern-mechanics/assets/icons/arrow-right.svg) center / contain no-repeat;
    mask: url(/wp-content/themes/northern-mechanics/assets/icons/arrow-right.svg) center / contain no-repeat;
}

/* One crisp, centered SVG cross for the cart panel and mobile navigation.
   Absolute centering avoids the Gutenberg button's hidden text node shifting it. */
.sm-checkout-sidebar .sm-sidebar-header .sm-sidebar-action[data-panel-close],
.sm-lite-navigation .sm-lite-nav-close {
    position: relative;
    flex-shrink: 0;
}
.sm-checkout-sidebar .sm-sidebar-header .sm-sidebar-action[data-panel-close] {
    font-size: 0 !important;
}
/* Keep the mobile button's accessible label; replace only its decorative SVG. */
.sm-lite-navigation .sm-lite-nav-close > svg {
    display: none;
}
.sm-checkout-sidebar .sm-sidebar-header .sm-sidebar-action[data-panel-close]::before,
.sm-lite-navigation .sm-lite-nav-close::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    background-color: currentColor;
    -webkit-mask: url(/wp-content/themes/northern-mechanics/assets/icons/close-crisp.svg) center / contain no-repeat;
    mask: url(/wp-content/themes/northern-mechanics/assets/icons/close-crisp.svg) center / contain no-repeat;
    pointer-events: none;
}

@media (max-width: 480px) {
    :is(.sm-primary-button, .sm-outline-button) > .wp-block-button__link > span[aria-hidden="true"] {
        flex-basis: 24px;
        width: 24px;
        height: 24px;
    }
}
