/* BDA EDITORIAL CTA SYSTEM */
body.bda-storefront .bda-editorial-cta,
body.bda-storefront :where(
    .bda-editorial-cta,
    .single_add_to_cart_button,
    .bda-side-cart-checkout,
    .wc-proceed-to-checkout .checkout-button,
    #place_order,
    .bda-content-button,
    .bda-content-body .wp-block-button__link,
    .bda-search-form__button,
    .bda-product-search-button,
    .woocommerce-account .woocommerce .button
) {
    --bda-cta-body: #f8f8f7;
    --bda-cta-ink: #0d4037;
    --bda-cta-border: #0d4037;
    --bda-cta-tile: #0d4037;
    --bda-cta-tile-ink: #f8f8f7;
    --bda-cta-flair: #0d4037;
    --bda-cta-active-ink: #ffffff;
    --bda-cta-active-tile: #ffffff;
    --bda-cta-active-tile-ink: #0d4037;
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 8px 0 20px;
    border: 1px solid var(--bda-cta-border);
    border-radius: 2px;
    background: var(--bda-cta-body);
    color: var(--bda-cta-ink);
    box-shadow: none;
    font-family: var(--bda-font-sans, Inter, sans-serif);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: color 180ms cubic-bezier(0.23, 1, 0.32, 1), background-color 180ms cubic-bezier(0.23, 1, 0.32, 1), border-color 180ms cubic-bezier(0.23, 1, 0.32, 1), transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

body.bda-storefront.woocommerce-page .bda-editorial-cta.button {
    box-sizing: border-box;
    display: inline-flex;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 8px 0 20px;
    border: 1px solid var(--bda-cta-border);
    border-radius: 2px;
    background: var(--bda-cta-body);
    color: var(--bda-cta-ink);
    box-shadow: none;
    font-family: var(--bda-font-sans, Inter, sans-serif);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
}

body.bda-storefront.woocommerce-page .bda-plp-card-actions .bda-editorial-cta.button {
    display: inline-flex;
    margin: 0;
}

body.bda-storefront .bda-editorial-cta__label {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

body.bda-storefront .bda-product-search-button {
    flex: 0 0 auto;
}

body.bda-storefront .bda-product-search-button .bda-editorial-cta__label {
    white-space: nowrap;
    overflow-wrap: normal;
}

body.bda-storefront .bda-editorial-cta__icon {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    background: var(--bda-cta-tile);
    color: var(--bda-cta-tile-ink);
    font-size: 18px;
    line-height: 1;
    transition: color 180ms cubic-bezier(0.23, 1, 0.32, 1), background-color 180ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms ease, transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.bda-storefront .bda-editorial-cta__flair {
    position: absolute;
    z-index: 0;
    display: block;
    border-radius: 50%;
    background: var(--bda-cta-flair);
    transform: scale(0);
    transform-origin: 50% 50%;
    pointer-events: none;
    will-change: transform;
}

body.bda-storefront.woocommerce-page .bda-editorial-cta.button.bda-editorial-cta--compact,
body.bda-storefront .bda-editorial-cta--compact {
    min-height: 46px;
    gap: 16px;
    padding: 0 6px 0 14px;
    font-size: 11px;
}

body.bda-storefront .bda-editorial-cta--compact .bda-editorial-cta__icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 15px;
}

body.bda-storefront .bda-editorial-cta--full { width: 100%; }

body.bda-storefront .bda-editorial-cta--light {
    --bda-cta-body: #f8f8f7;
    --bda-cta-ink: #0d4037;
    --bda-cta-border: #0d4037;
    --bda-cta-tile: #0d4037;
    --bda-cta-tile-ink: #f8f8f7;
    --bda-cta-flair: #0d4037;
    --bda-cta-active-ink: #ffffff;
    --bda-cta-active-tile: #ffffff;
    --bda-cta-active-tile-ink: #0d4037;
}

body.bda-storefront .bda-editorial-cta--dark {
    --bda-cta-body: transparent;
    --bda-cta-ink: #ffffff;
    --bda-cta-border: #ffffff;
    --bda-cta-tile: #ffffff;
    --bda-cta-tile-ink: #0d4037;
    --bda-cta-flair: #ffffff;
    --bda-cta-active-ink: #0d4037;
    --bda-cta-active-tile: #0d4037;
    --bda-cta-active-tile-ink: #ffffff;
}

body.bda-storefront :where(
    .bda-editorial-cta,
    .single_add_to_cart_button,
    .bda-side-cart-checkout,
    .wc-proceed-to-checkout .checkout-button,
    #place_order,
    .bda-content-button,
    .bda-content-body .wp-block-button__link,
    .bda-search-form__button,
    .bda-product-search-button,
    .woocommerce-account .woocommerce .button
):focus-visible {
    outline: 3px solid rgba(199, 154, 74, 0.72);
    outline-offset: 3px;
}

body.bda-storefront .bda-editorial-cta:focus-visible {
    outline: 3px solid rgba(199, 154, 74, 0.72);
    outline-offset: 3px;
}

body.bda-storefront :where(
    .bda-editorial-cta,
    .single_add_to_cart_button,
    .bda-side-cart-checkout,
    .wc-proceed-to-checkout .checkout-button,
    #place_order,
    .bda-content-button,
    .bda-content-body .wp-block-button__link,
    .bda-search-form__button,
    .bda-product-search-button,
    .woocommerce-account .woocommerce .button
):active { transform: scale(0.97); }

body.bda-storefront .bda-editorial-cta:active { transform: scale(0.97); }

body.bda-storefront .bda-editorial-cta.loading,
body.bda-storefront .bda-editorial-cta.is-loading {
    cursor: progress;
}

body.bda-storefront .bda-editorial-cta.loading .bda-editorial-cta__icon,
body.bda-storefront .bda-editorial-cta.is-loading .bda-editorial-cta__icon {
    opacity: 0.72;
}

body.bda-storefront .bda-editorial-cta:is(:disabled, .disabled, [aria-disabled="true"], .loading, .is-loading, .added, .is-success, .wc-variation-selection-needed) .bda-editorial-cta__flair {
    opacity: 0;
    transform: scale(0) !important;
    transition: none !important;
}

.bda-plp-card-actions .added_to_cart.wc-forward {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (hover: hover) and (pointer: fine) {
    html:not(.bda-editorial-buttons-motion-ready) body.bda-storefront :where(
        .bda-editorial-cta,
        .single_add_to_cart_button,
        .bda-side-cart-checkout,
        .wc-proceed-to-checkout .checkout-button,
        #place_order,
        .bda-content-button,
        .bda-content-body .wp-block-button__link,
        .bda-search-form__button,
        .bda-product-search-button,
        .woocommerce-account .woocommerce .button
    ):hover {
        --bda-cta-body: #0d4037;
        --bda-cta-ink: #ffffff;
        --bda-cta-tile: #ffffff;
        --bda-cta-tile-ink: #0d4037;
    }

    html:not(.bda-editorial-buttons-motion-ready) body.bda-storefront .bda-editorial-cta:hover {
        --bda-cta-body: #0d4037;
        --bda-cta-ink: #ffffff;
        --bda-cta-tile: #ffffff;
        --bda-cta-tile-ink: #0d4037;
    }

    html:not(.bda-editorial-buttons-motion-ready) body.bda-storefront .bda-editorial-cta--dark:hover {
        --bda-cta-body: #ffffff;
        --bda-cta-ink: #0d4037;
        --bda-cta-tile: #0d4037;
        --bda-cta-tile-ink: #ffffff;
    }
}

html.bda-editorial-buttons-motion-ready body.bda-storefront .bda-editorial-cta.is-editorial-active:not(:disabled):not(.disabled):not([aria-disabled="true"]):not(.loading):not(.is-loading):not(.added):not(.is-success):not(.wc-variation-selection-needed) {
    color: var(--bda-cta-active-ink);
}

html.bda-editorial-buttons-motion-ready body.bda-storefront .bda-editorial-cta.is-editorial-active:not(:disabled):not(.disabled):not([aria-disabled="true"]):not(.loading):not(.is-loading):not(.added):not(.is-success):not(.wc-variation-selection-needed) .bda-editorial-cta__icon {
    color: var(--bda-cta-active-tile-ink);
    background: var(--bda-cta-active-tile);
}

body.bda-storefront .bda-editorial-cta.added,
body.bda-storefront .bda-editorial-cta.is-success {
    --bda-cta-body: #0d4037;
    --bda-cta-ink: #ffffff;
    --bda-cta-tile: #ffffff;
    --bda-cta-tile-ink: #0d4037;
}

body.bda-storefront .bda-editorial-cta:disabled,
body.bda-storefront .bda-editorial-cta.disabled,
body.bda-storefront .bda-editorial-cta[aria-disabled="true"] {
    cursor: not-allowed;
}

body.bda-storefront .bda-editorial-cta:disabled:not(.is-success):not(.added),
body.bda-storefront .bda-editorial-cta.disabled:not(.is-success):not(.added),
body.bda-storefront .bda-editorial-cta[aria-disabled="true"]:not(.is-success):not(.added) {
    opacity: 0.58;
}

body.bda-storefront .bda-editorial-cta[aria-disabled="true"] {
    pointer-events: none;
}

body.bda-storefront .bda-editorial-cta.wc-variation-selection-needed {
    --bda-cta-border: #a65348;
}

body.bda-storefront .bda-editorial-cta:is(.loading, .added)::after {
    content: none;
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    body.bda-storefront .bda-editorial-cta,
    body.bda-storefront .bda-editorial-cta__icon,
    body.bda-storefront .bda-editorial-cta__flair {
        transition-duration: 0.01ms;
    }

    body.bda-storefront .bda-editorial-cta:active { transform: none; }
    body.bda-storefront .bda-editorial-cta__flair { display: none; }
}
