/* Homepage reference: Inter 16/24.8, weight 750, 48px height, 4px corners.
 * Explicit CTA allowlist: quantity controls, password eyes, close buttons,
 * payment widgets, navigation and loading/hidden states retain their behaviour.
 * Specificity intentionally beats legacy Avada/Woo !important declarations.
 */
body.kfk-run-site :is(#wrapper #main, #pum-4559) :is(
    .woocommerce .kfk-loyalty button, .woocommerce button.button,
    .woocommerce a.button, .woocommerce input.button, .woocommerce-info button.button,
    .kfk-home-button, .kfk-button, .kfk-about-button, .fusion-button,
    .single_add_to_cart_button, .kfk-cart-checkout-button,
    .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button,
    .wc-block-components-totals-coupon__button, .wp-block-button__link,
    .wpcf7-submit, .wpc-filters-submit-button, .wpc-filters-reset-button
) {
    --kfk-control-bg: var(--kfk-ink, #181b18);
    --kfk-control-fg: var(--kfk-white, #fff);
    --kfk-control-border: var(--kfk-ink, #181b18);
    --kfk-control-hover: #000;
    --kfk-control-hover-fg: #fff;
    box-sizing: border-box !important;
    min-height: 48px !important;
    height: auto !important;
    max-width: 100%;
    padding: 10px 22px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    border: 1px solid var(--kfk-control-border) !important;
    border-radius: var(--kfk-radius-small, 4px) !important;
    background: var(--kfk-control-bg) !important;
    color: var(--kfk-control-fg) !important;
    font-family: var(--kfk-font-sans, Inter, "Helvetica Neue", Arial, sans-serif) !important;
    font-size: 16px !important;
    font-weight: 750 !important;
    line-height: 1.55 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    white-space: normal !important;
    overflow-wrap: normal;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease !important;
    /* Nesting keeps every interaction on the exact same CTA allowlist. */
    &:is(.kfk-home-button, .kfk-button--light) {
        --kfk-control-bg: #fff;
        --kfk-control-fg: var(--kfk-ink, #181b18);
        --kfk-control-border: #fff;
        --kfk-control-hover: var(--kfk-surface, #f6f7f3);
        --kfk-control-hover-fg: var(--kfk-ink, #181b18);
    }
    &:is(.kfk-home-button--ghost) {
        --kfk-control-bg: transparent;
        --kfk-control-fg: #fff;
        --kfk-control-border: #fff;
        --kfk-control-hover: #fff;
        --kfk-control-hover-fg: var(--kfk-ink, #181b18);
    }
    &:is(.wpc-filters-reset-button, .kfk-about-button:not(.kfk-about-button--dark)) {
        --kfk-control-bg: #fff;
        --kfk-control-fg: var(--kfk-ink, #181b18);
        --kfk-control-border: var(--kfk-line, #d9ddd7);
        --kfk-control-hover: var(--kfk-surface, #f6f7f3);
        --kfk-control-hover-fg: var(--kfk-ink, #181b18);
    }
    &:hover:not(:disabled):not([aria-disabled="true"]) {
        background: var(--kfk-control-hover) !important;
        color: var(--kfk-control-hover-fg) !important;
        border-color: var(--kfk-control-hover) !important;
    }
    &:focus-visible {
        outline: 2px solid var(--kfk-accent, #f27a1a) !important;
        outline-offset: 3px !important;
    }
    &:is(:disabled, [aria-disabled="true"]) {
        background: var(--kfk-surface-strong, #ecefe8) !important;
        border-color: var(--kfk-line, #d9ddd7) !important;
        color: var(--kfk-muted, #6c746d) !important;
        cursor: not-allowed !important;
    }
    & :is(.fusion-button-text, .wc-block-components-button__text) {
        font: inherit !important;
        color: inherit !important;
    }
}
/* Remove the checkout-only decorative circle/arrow; never hide loading icons. */
body.kfk-run-site #wrapper #main :is(.kfk-cart-checkout-button, .wc-block-components-checkout-place-order-button)::after {
    content: none !important;
    display: none !important;
}
body.kfk-run-site #wrapper #main .kfk-cart-checkout-host { min-height: 48px !important; }
/* Loyalty fields, tabs and focus follow the homepage's existing brand tokens. */
body.kfk-run-site #wrapper #main .kfk-loyalty input {
    height: 48px !important;
    font-family: var(--kfk-font-sans, Inter, "Helvetica Neue", Arial, sans-serif) !important;
    border-radius: var(--kfk-radius-small, 4px) !important;
    border: 1px solid var(--kfk-line, #d9ddd7) !important;
    color: var(--kfk-ink, #181b18) !important;
    background-color: var(--kfk-white, #fff) !important;
}
body.kfk-run-site #wrapper #main .kfk-loyalty input:focus-visible {
    outline: 2px solid var(--kfk-accent, #f27a1a) !important;
    outline-offset: 3px !important;
}
body.kfk-run-site #wrapper #main .kfk-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 16px;
    font-weight: 650;
}
@media (prefers-reduced-motion: reduce) {
    body.kfk-run-site #wrapper #main :is(.kfk-home-button, .kfk-loyalty button, .button, .kfk-cart-checkout-button, .wc-block-components-button) { transition: none !important; }
}
/* Account reference explicitly chosen by the client: category-card labels,
 * .kfk-home-category span (not the homepage hero CTA).
 * Preserve their exact desktop typography, square corners and hover treatment.
 */
body.kfk-run-site.woocommerce-account #wrapper #main :is(
    .woocommerce .kfk-loyalty button, .woocommerce button.button,
    .woocommerce a.button, .woocommerce input.button, .kfk-tabs a
) {
    --kfk-control-bg: var(--kfk-white, #fff);
    --kfk-control-fg: var(--kfk-ink, #181b18);
    --kfk-control-border: transparent;
    --kfk-control-hover: var(--kfk-accent, #f27a1a);
    --kfk-control-hover-fg: var(--kfk-white, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box !important;
    min-height: 46.4px !important;
    height: auto !important;
    max-width: 100%;
    padding: 14px 24px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--kfk-control-bg) !important;
    color: var(--kfk-control-fg) !important;
    font-family: var(--kfk-font-sans, Inter, "Helvetica Neue", Arial, sans-serif) !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    white-space: normal !important;
    box-shadow: none !important;
    transition: color 260ms ease, background-color 260ms ease, transform 260ms ease !important;
    &:hover:not(:disabled):not([aria-disabled="true"]) {
        color: var(--kfk-white, #fff) !important;
        background: var(--kfk-accent, #f27a1a) !important;
        transform: translateY(-5px);
    }
    &:focus-visible {
        outline: 3px solid var(--kfk-accent, #f27a1a) !important;
        outline-offset: 4px !important;
    }
    &:is(:disabled, [aria-disabled="true"]) {
        background: var(--kfk-surface-strong, #ecefe8) !important;
        color: var(--kfk-muted, #6c746d) !important;
        transform: none;
    }
    @media (prefers-reduced-motion: reduce) { transition: none !important; transform: none !important; }
}
