/* Lightweight press feedback for links and mobile controls. */

/* Pointer feedback shared by mouse, pen and touch. */
.cf-link-feedback{
    -webkit-user-drag:none;
    -webkit-user-select:none;
    user-select:none;
}

.cf-link-feedback :where(img, picture, video){
    -webkit-user-drag:none;
}

.cf-link-feedback--block{
    transform-origin:center;
    translate:0 0;
    scale:1;
    transition:
        translate .1s cubic-bezier(.23, 1, .32, 1),
        scale .1s cubic-bezier(.23, 1, .32, 1),
        filter .1s ease-out;
    will-change:translate, scale, filter;
}

.cf-link-feedback--block.cf-link-feedback-active{
    translate:0 1px;
    scale:.985;
    filter:brightness(.92) saturate(.98);
    text-decoration:none !important;
}

.cf-link-feedback--block.cf-link-feedback--large.cf-link-feedback-active{
    scale:.992;
}

.cf-link-feedback--text{
    position:relative;
    top:0;
    opacity:1;
    transition:
        color .08s ease-out,
        opacity .08s ease-out;
}

.cf-link-feedback--text.cf-link-feedback-active{
    top:1px;
    color:var(--e-global-color-primary, #2A2A2A) !important;
    opacity:.56;
    text-decoration:none !important;
}

@media (hover:none) and (pointer:coarse){
    /* Remove the browser flash only where a real interaction is expected. */
    :where(
        a,
        button,
        summary,
        [role="button"],
        [role="link"],
        [role="tab"],
        input[type="button"],
        input[type="submit"],
        input[type="reset"]
    ){
        -webkit-tap-highlight-color:transparent;
        touch-action:manipulation;
    }

    /* Button-like controls respond through contrast, not a global scale. */
    :where(
        button,
        summary,
        .button,
        .elementor-button,
        [role="button"],
        [role="tab"],
        input[type="button"],
        input[type="submit"],
        input[type="reset"]
    ):not(.add_to_cart_button):not(.single_add_to_cart_button):not(.cf-qty-button):not(:disabled):not([aria-disabled="true"]):active{
        opacity:.86 !important;
        transition-duration:0s !important;
    }

    /* Icon controls are used site-wide: header, footer, menus and contacts. */
    :where(
        .cf-header-icon-hit-area,
        a.elementor-icon,
        .elementor-icon-wrapper a,
        .elementor-social-icon,
        .elementor-menu-toggle,
        .elementor-menu-cart__toggle a
    ){
        transition:opacity .14s ease-out, transform .14s ease-out;
    }

    :where(
        .cf-header-icon-hit-area,
        a.elementor-icon,
        .elementor-icon-wrapper a,
        .elementor-social-icon,
        .elementor-menu-toggle,
        .elementor-menu-cart__toggle a
    ):active{
        opacity:.82 !important;
        transform:scale(.96);
        text-decoration:none !important;
        transition-duration:0s !important;
    }

    /* Large linked media stays stable and responds without shifting layout. */
    :where(
        .woocommerce-loop-product__link,
        .elementor-widget-image a
    ){
        transform-origin:center;
        translate:0 0;
        scale:1;
    }

    :where(
        .woocommerce-loop-product__link,
        .elementor-widget-image a
    ):active{
        translate:0 1px;
        scale:.985;
        filter:brightness(.92) saturate(.98);
        text-decoration:none !important;
    }

    /* Compact category cards can use a smaller physical press response. */
    .cf-menu-category-card{
        transition:
            opacity .14s ease-out,
            translate .14s cubic-bezier(.23, 1, .32, 1),
            scale .14s cubic-bezier(.23, 1, .32, 1),
            filter .14s ease-out;
    }

    .cf-menu-category-card:active{
        opacity:1 !important;
        translate:0 1px;
        scale:.985;
        filter:brightness(.92) saturate(.98);
        text-decoration:none !important;
        transition-duration:0s !important;
    }

    .cf-menu-category-card :where(a):active{
        text-decoration:none !important;
    }
}

@media (hover:none) and (pointer:coarse) and (prefers-reduced-motion:reduce){
    :where(
        .cf-header-icon-hit-area,
        a.elementor-icon,
        .elementor-icon-wrapper a,
        .elementor-social-icon,
        .elementor-menu-toggle,
        .elementor-menu-cart__toggle a,
        .cf-menu-category-card,
        .woocommerce-loop-product__link,
        .elementor-widget-image a
    ){
        transition:none;
    }

    :where(
        .cf-header-icon-hit-area,
        a.elementor-icon,
        .elementor-icon-wrapper a,
        .elementor-social-icon,
        .elementor-menu-toggle,
        .elementor-menu-cart__toggle a,
        .cf-menu-category-card
    ):active{
        transform:none;
    }

    :where(
        .cf-menu-category-card,
        .woocommerce-loop-product__link,
        .elementor-widget-image a
    ):active{
        translate:0 0;
        scale:1;
        filter:brightness(.88);
    }
}

@media (prefers-reduced-motion:reduce){
    .cf-link-feedback--block{
        transition:filter .1s ease-out;
    }

    .cf-link-feedback--block.cf-link-feedback-active{
        translate:0 0;
        scale:1;
        filter:brightness(.88);
    }

    .cf-link-feedback--text{
        transition:none;
    }

    .cf-link-feedback--text.cf-link-feedback-active{
        top:0;
    }
}
