/**
 * Module: WooCommerceButtons - Base Material 3 Styles
 * Scoped strictly to WooCommerce button block styles (.is-style-woo-*)
 */

:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) .added_to_cart,
:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) a.added_to_cart,
:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) .wc-block-components-product-button__button + span:not([data-wp-text]) {
    position: absolute !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Base styles for buttons with any woo block style */
:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) :is(.wc-block-components-product-button__button, .wc-block-components-button),
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-general,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-glow,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-glow-inverse,
:is(.wc-block-components-product-button__button, .wc-block-components-button).is-style-woo-animated {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    padding: 10px 16px !important;
    border: 1.5px solid var(--md-sys-color-primary) !important;
    border-radius: var(--md-sys-shape-corner-medium, 12px) !important;
    background-color: transparent !important;
    color: var(--md-sys-color-primary) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.1px !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-decoration: none !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-drag: none;
    box-sizing: border-box !important;
    transition: transform var(--md-sys-motion-duration-short4, 200ms) var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1)),
                background-color var(--md-sys-motion-duration-short4, 200ms) ease,
                border-color var(--md-sys-motion-duration-short4, 200ms) ease,
                box-shadow var(--md-sys-motion-duration-short4, 200ms) ease,
                color var(--md-sys-motion-duration-short4, 200ms) ease !important;
}

/* Product-card buttons keep their natural width but never exceed their container. */
:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) .wc-block-components-product-button,
.wc-block-components-product-button:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated),
:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) .wc-block-components-product-button__button,
.wc-block-components-product-button__button:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) {
    max-width: 100% !important;
    min-width: 0 !important;
}

:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) :is(.wc-block-components-product-button__button, .wc-block-components-button) > span {
    min-width: 0 !important;
    max-width: 100% !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) :is(.wc-block-components-product-button__button, .wc-block-components-button):not(.vortex-state-loading):not(.vortex-state-success):hover,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-general:not(.vortex-state-loading):not(.vortex-state-success):hover,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-glow:not(.vortex-state-loading):not(.vortex-state-success):hover,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-glow-inverse:not(.vortex-state-loading):not(.vortex-state-success):hover,
:is(.wc-block-components-product-button__button, .wc-block-components-button).is-style-woo-animated:not(.vortex-state-loading):not(.vortex-state-success):hover {
    transform: scale(1.02) !important;
    background-color: color-mix(in srgb, var(--md-sys-color-primary) 14%, transparent) !important;
    border-color: var(--md-sys-color-primary) !important;
    box-shadow: 0 0 16px color-mix(in srgb, var(--md-sys-color-primary) 50%, transparent) !important;
    color: var(--md-sys-color-on-surface) !important;
}

:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) :is(.wc-block-components-product-button__button, .wc-block-components-button):active,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-general:active,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-glow:active,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-glow-inverse:active,
:is(.wc-block-components-product-button__button, .wc-block-components-button).is-style-woo-animated:active {
    transform: scale(0.96) !important;
    background-color: color-mix(in srgb, var(--md-sys-color-primary) 22%, transparent) !important;
}

:is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) :is(.wc-block-components-product-button__button, .wc-block-components-button):focus-visible,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-general:focus-visible,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-glow:focus-visible,
:is(.wc-block-components-product-button__button, .wc-block-components-button, .wc-block-mini-cart__footer-checkout).is-style-woo-glow-inverse:focus-visible,
:is(.wc-block-components-product-button__button, .wc-block-components-button).is-style-woo-animated:focus-visible {
    outline: 2px solid var(--md-sys-color-primary) !important;
    outline-offset: 3px !important;
}

@media (prefers-reduced-motion: reduce) {
    :is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) :is(.wc-block-components-product-button__button, .wc-block-components-button) {
        transition: none !important;
    }

    :is(.is-style-woo-general, .is-style-woo-glow, .is-style-woo-glow-inverse, .is-style-woo-animated) :is(.wc-block-components-product-button__button, .wc-block-components-button):is(:hover, :active) {
        transform: none !important;
    }
}
