/* KS 20261112.1 — shared presentation for CZ, EN and every virtual language.
   Native forms, gateway elements, iframes and their events are not moved/rebuilt. */
html body #page-view :is(#ks-product-detail, .kss-product) .single_add_to_cart_button.button {
    background-color: #17663d !important;
    background-image: linear-gradient(112deg, transparent 42%, #ffffff22 49%, transparent 56%),
        linear-gradient(135deg, #216c43, #155e39) !important;
    background-repeat: no-repeat !important;
    background-size: 240% 100%, 100% 100% !important;
    background-position: 170% 0, 0 0;
    color: #fff !important;
    border-color: #17663d !important;
    box-shadow: 0 5px 16px #133e251c !important;
    animation: ks-purchase-sheen-20261112 7s ease-in-out infinite;
}
html body #page-view :is(#ks-product-detail, .kss-product) .single_add_to_cart_button.button:hover {
    background-image: linear-gradient(112deg, transparent 42%, #ffffff22 49%, transparent 56%),
        linear-gradient(135deg, #216e43, #104e2e) !important;
}
html body #page-view :is(#ks-product-detail, .kss-product) .single_add_to_cart_button.button:focus-visible {
    outline: 3px solid var(--ksd-ink, var(--kss-ink, #25231f));
    outline-offset: 4px;
}
/* Do not use :before (basket icon) or :after (WooCommerce spinner/checkmark). */
html body #page-view :is(#ks-product-detail, .kss-product) .single_add_to_cart_button.button:is(:disabled, .disabled, [aria-disabled="true"]) {
    background: #647c6c !important;
    box-shadow: none !important;
    animation: none;
    transform: none;
    cursor: not-allowed;
}
html body #page-view :is(#ks-product-detail, .kss-product) .single_add_to_cart_button.button.loading {
    animation: none;
}
@keyframes ks-purchase-sheen-20261112 {
    0%, 70% { background-position: 170% 0, 0 0; }
    91%, 100% { background-position: -70% 0, 0 0; }
}
html.motion-paused body #page-view :is(#ks-product-detail, .kss-product) .single_add_to_cart_button.button {
    animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
    html body #page-view :is(#ks-product-detail, .kss-product) .single_add_to_cart_button.button {
        animation: none;
        background-position: 170% 0, 0 0;
    }
}

/* The date keeps the real WPify calculation, but uses the ordinary fact style. */
html body #page-view #ks-product-detail .ksd-facts .wpify-woo-delivery-date .date,
html body #page-view .kss-product .kss-facts .wpify-woo-delivery-date .date {
    color: var(--ksd-ink, var(--kss-ink, #25231f)) !important;
    background: none !important;
    border: 0 !important;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    vertical-align: baseline;
    overflow: visible;
}
html body #page-view #ks-product-detail .ksd-facts .wpify-woo-delivery-date .date::after,
html body #page-view .kss-product .kss-facts .wpify-woo-delivery-date .date::after {
    content: none !important;
    display: none !important;
    animation: none !important;
}

/* Default alignment is also correct for gateways with an unknown wrapper. */
html body #page-view #ks-product-detail .ksd-actions { align-items: start; }
html body #page-view #ks-product-detail .ksd-actions > .ksd-try { align-self: start; }

/* WooPayments appends its express wrapper AFTER the native cart form.
   Only the non-semantic commerce div loses its box; form and iframe keep theirs.
   Main cart + room buttons share row 1. Native express checkout spans row 2. */
@supports selector(:has(*)) {
    html body #page-view #ks-product-detail .ksd-actions:has(.wcpay-express-checkout-wrapper) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
    }
    html body #page-view #ks-product-detail .ksd-actions > .ksd-commerce:has(> .wcpay-express-checkout-wrapper) {
        display: contents;
    }
    html body #page-view #ks-product-detail .ksd-commerce:has(> .wcpay-express-checkout-wrapper) > * {
        grid-column: 1 / -1;
        min-width: 0;
    }
    html body #page-view #ks-product-detail .ksd-commerce:has(> .wcpay-express-checkout-wrapper) > form.cart {
        grid-column: 1;
        grid-row: 1;
        align-self: start;
    }
    html body #page-view #ks-product-detail .ksd-actions:has(.wcpay-express-checkout-wrapper) > .ksd-try {
        grid-column: 2;
        grid-row: 1;
    }
}
html body #page-view :is(#ks-product-detail, .kss-product) .wcpay-express-checkout-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html body #page-view :is(#ks-product-detail, .kss-product) #wcpay-express-checkout-element {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
/* Wallet/voucher pages have no room button: leave their native form intact. */
html body #page-view .kss-product .kss-commerce > .wcpay-express-checkout-wrapper { margin-top: 12px; }

@media (max-width: 600px) {
    html body #page-view #ks-product-detail .ksd-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    /* One full-width column; source/keyboard order stays cart, payments, room. */
    html body #page-view #ks-product-detail .ksd-actions:has(.wcpay-express-checkout-wrapper) {
        grid-template-columns: minmax(0, 1fr);
    }
    html body #page-view #ks-product-detail .ksd-actions:has(.wcpay-express-checkout-wrapper) > .ksd-try {
        grid-column: 1;
        grid-row: auto;
    }
    html body #page-view #ks-product-detail :is(.ksd-commerce, .ksd-try, form.cart) { min-width: 0; }
    html body #page-view #ks-product-detail :is(.single_add_to_cart_button.button, .ksd-try) {
        width: 100%;
        box-sizing: border-box;
    }
}
