/* Zdrowotka Nowa 1.9.73 — dyskretne reakcje interfejsu na prawdziwe działania. */

body.zdn-theme .add_to_cart_button.zdn-is-adding,
body.zdn-theme .add_to_cart_button.zdn-is-added {
    pointer-events: none;
}

body.zdn-theme .add_to_cart_button.zdn-is-adding {
    opacity: .78;
}

body.zdn-theme .add_to_cart_button.zdn-is-added {
    background: #1e6d35 !important;
    border-color: #1e6d35 !important;
    color: #fff !important;
}

body.zdn-theme .add_to_cart_button .zdn-button-check {
    display: inline-block;
    margin-right: .3em;
    font-weight: 800;
}

body.zdn-theme .zdn-product-image.zdn-img-pending {
    opacity: 0;
}

body.zdn-theme .zdn-product-image.zdn-img-ready {
    opacity: 1;
    transition: opacity var(--motion-panel) var(--ease-enter);
}

@media (hover: hover) and (pointer: fine) {
    body.zdn-theme :is(ul.products li.product, .zdh-product, .zd-related-card) {
        transition: border-color var(--motion-ui) var(--ease-state),
                    box-shadow var(--motion-ui) var(--ease-state),
                    background-color var(--motion-ui) var(--ease-state);
    }

    body.zdn-theme :is(ul.products li.product, .zdh-product, .zd-related-card):hover {
        border-color: #c9d8c4 !important;
        box-shadow: 0 5px 18px rgba(25, 68, 43, .09) !important;
    }
}

@media (prefers-reduced-motion: no-preference) {
    body.zdn-theme .zdn-badge-bump {
        animation: zdn-badge-bump 380ms var(--ease-enter);
    }

    body.zdn-theme .zd-cart-item.zdn-row-enter {
        animation: zdn-row-enter 260ms var(--ease-enter) both;
    }

    body.zdn-theme #zdFreeShippingBar.zdn-threshold-hit {
        animation: zdn-threshold-hit 850ms var(--ease-enter);
    }

    @keyframes zdn-badge-bump {
        0%, 100% { transform: scale(1); }
        42% { transform: scale(1.22); }
        68% { transform: scale(.94); }
    }

    @keyframes zdn-row-enter {
        from { opacity: 0; transform: translateY(9px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @keyframes zdn-threshold-hit {
        0%, 100% { background-color: transparent; box-shadow: none; }
        28% { background-color: #eef8e9; box-shadow: inset 0 0 0 1px #a9cb9f; }
    }
}

@media (prefers-reduced-motion: reduce) {
    body.zdn-theme .zdn-product-image.zdn-img-ready {
        transition: none !important;
    }
    body.zdn-theme .zdn-badge-bump,
    body.zdn-theme .zd-cart-item.zdn-row-enter,
    body.zdn-theme #zdFreeShippingBar.zdn-threshold-hit {
        animation: none !important;
    }
}


/* 1.9.82: stan glownego przycisku na karcie produktu */
body.zdn-theme button.zd-add-to-cart-btn.zdn-main-adding { opacity: .8; pointer-events: none; }
body.zdn-theme button.zd-add-to-cart-btn.zdn-main-added { background: #1e6d35 !important; pointer-events: none; }
body.zdn-theme button.zd-add-to-cart-btn .zdn-button-check { display: inline-block; margin-right: .35em; font-weight: 800; }

/* 1.9.82: "Ogranicz ruch" wylacza tez wysuwanie koszyka i toast (wczesniej przegrywaly specyficznoscia) */
@media (prefers-reduced-motion: reduce) {
    :root { --motion-panel: 0ms; }
    body.zdn-theme #zdCartSidebar .zd-cart-sidebar-content,
    body.zdn-theme #zdCartSidebar.open .zd-cart-sidebar-content,
    body.zdn-theme .zd-toast,
    body.zdn-theme .zd-toast.zd-toast-visible { transition: none !important; animation: none !important; }
}

/* 1.9.82: powiekszenie zdjecia w karcie tylko przy myszce (na telefonie "przyklejalo sie" po dotknieciu) */
@media (hover: none), (pointer: coarse) {
    body.zdn-theme.woocommerce ul.products li.product:hover .attachment-woocommerce_thumbnail,
    body.zdn-theme ul.products li.product:hover img,
    body.zdn-theme .zd-gallery-main:hover img,
    body.zdn-theme .zd-add-to-cart-btn:hover,
    body.zdn-theme .zd-sticky-cta-btn:hover { transform: none !important; }
}
/* 1.9.82: plynne pojawianie sie zdjec wygrywa ze stara regula transition (transform/box-shadow) z woocommerce-styles.css */
body.zdn-theme.woocommerce ul.products li.product .attachment-woocommerce_thumbnail.zdn-img-ready,
body.zdn-theme ul.products li.product img.zdn-img-ready { transition: opacity var(--motion-panel, 260ms) var(--ease-enter, ease), transform .4s !important; }
@media (prefers-reduced-motion: reduce) {
    body.zdn-theme ul.products li.product img.zdn-img-ready { transition: none !important; }
}

/* 1.9.82: adnotacja (uwaga do zamowienia) na potwierdzeniu - pod tabela, na pelna szerokosc, zamiast waskiego slupka w kolumnie kwot */
body.zdn-theme.woocommerce-checkout.woocommerce-order-received .zdn-order table.order_details tfoot tr.zdn-note-row { display: none !important; }
body.zdn-theme .zdn-order-note { margin: 12px 0 0; padding: 13px 16px; border: 1px solid #dce1d7; border-radius: 6px; background: #f7f8f4; }
body.zdn-theme .zdn-order-note strong { display: block; margin: 0 0 4px; font-weight: 600; }
body.zdn-theme .zdn-order-note p { margin: 0; overflow-wrap: anywhere; white-space: normal; }
