@mixin cfw-payment-request-button() {
    border: none !important;
    max-width: 140px; // removed important because it conflicts with Payment Plugins Stripe when multiple buttons are displaying
    min-width: 140px;
    overflow: hidden;
    border-radius: 5px;
    max-height: 42px;
    min-height: 42px;
    margin-top: 0;
}

@mixin apply-cfw-payment-request-button-styles-with-exclusions($base-selectors, $excluded-parents) {
    @each $base-selector in $base-selectors {
        $full-selector: $base-selector;

        @each $excluded-parent in $excluded-parents {
            $full-selector: unquote("#{$full-selector}:not(#{$excluded-parent}, #{$excluded-parent} *)");

            #{$excluded-parent} {
                // Copied from #cfw-payment-request-buttons rule -  must be kept in sync
                display: flex;
                align-items: flex-start;
                flex-wrap: wrap;
                gap: 0.5em;
            }
        }

        // Apply the styles to the constructed selector
        #{$full-selector} {
            @include cfw-payment-request-button();
        }
    }
}

@mixin clearfix() {
    *zoom: 1;

    &::before,
    &::after {
        content: ' ';
        display: table;
    }

    &::after {
        clear: both;
    }
}