/**
 * Skeuomorphic control treatment — cart, checkout, thank-you pages.
 *
 * Every plugin's admin settings screen ships the same 3D "rocker toggle"
 * component (see admin-rocker-toggles.css in each plugin): a raised
 * gradient face with a drop-shadow "lip" that flattens into the surface on
 * press. That's the one visual signature shared across the whole product
 * line. This extends the same language — raised face, directional light, a
 * lip that disappears on press — to the WooCommerce purchase flow (cart,
 * multi-step checkout, order confirmation) so the storefront reads as part
 * of the same family instead of a generic flat dark theme.
 *
 * Scoped to body.woocommerce-page (the class WooCommerce adds on cart,
 * checkout, order-received, account and shop/product pages) so it can't
 * leak onto unrelated pages like the homepage.
 *
 * @author Inder Kochar
 * @link https://inderkochar.in
 */

body.woocommerce-page .btn-primary {
    background: linear-gradient(180deg, #f7d15c 0%, #e6b800 55%, #c99600 100%) !important;
    color: #2b2200 !important;
    border: 1px solid #a67c00;
    border-bottom: 3px solid #7d5f00;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.08s ease, box-shadow 0.08s ease, border-bottom-width 0.08s ease, background 0.2s ease;
}

body.woocommerce-page .btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #f9dc7d 0%, #f0c000 55%, #d1a300 100%) !important;
}

body.woocommerce-page .btn-primary:active:not(:disabled),
body.woocommerce-page .btn-primary.is-pressed {
    transform: translateY(3px);
    border-bottom-width: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.woocommerce-page .btn-primary:disabled {
    filter: grayscale(0.4);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

body.woocommerce-page .btn-outline {
    background: linear-gradient(180deg, #454b58 0%, #333844 100%) !important;
    /* Deliberately cool-gray, not the warm --color-cream-200 token, to match
       this button's cool slate-blue gradient. --color-cream-200 now resolves
       to a real (warm) value, so a var() fallback here would never trigger. */
    color: #e5e7eb !important;
    border: 1px solid #20232b;
    border-bottom: 3px solid #16181d;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2), 0 6px 10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.08s ease, box-shadow 0.08s ease, border-bottom-width 0.08s ease, background 0.2s ease;
}

body.woocommerce-page .btn-outline:hover:not(:disabled) {
    background: linear-gradient(180deg, #4e5563 0%, #3a3f4c 100%) !important;
}

body.woocommerce-page .btn-outline:active:not(:disabled) {
    transform: translateY(3px);
    border-bottom-width: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15), inset 0 2px 5px rgba(0, 0, 0, 0.25);
}

/* .btn-secondary (cart's red "Back to Shop") gets the same lip treatment
   in its own color instead of the amber used for primary actions. */
body.woocommerce-page .btn-secondary {
    background: linear-gradient(180deg, #f47171 0%, #ef4444 55%, #c62626 100%) !important;
    color: #fff !important;
    border: 1px solid #a31f1f;
    border-bottom: 3px solid #7f1717;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.08s ease, box-shadow 0.08s ease, border-bottom-width 0.08s ease, background 0.2s ease;
}

body.woocommerce-page .btn-secondary:hover:not(:disabled) {
    background: linear-gradient(180deg, #f68b8b 0%, #f15c5c 55%, #d13333 100%) !important;
}

body.woocommerce-page .btn-secondary:active:not(:disabled) {
    transform: translateY(3px);
    border-bottom-width: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Checkout step markers: raised discs instead of flat filled circles */
body.woocommerce-page .step-item .step-number {
    border-width: 1px !important;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3), 0 5px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.woocommerce-page .step-item.active .step-number {
    background: linear-gradient(180deg, #f7d15c 0%, #e6b800 60%, #c99600 100%) !important;
    border-color: #a67c00 !important;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3), 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.woocommerce-page .step-item.completed .step-number {
    background: linear-gradient(180deg, #34d399 0%, #059669 60%, #047857 100%) !important;
    border-color: #04543f !important;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 5px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Service type + payment method choices: raised card, pressed-in when selected */
body.woocommerce-page .order-service-type,
body.woocommerce-page input[name="payment_method"] {
    accent-color: #e6b800;
}

body.woocommerce-page label:has(> .order-service-type) {
    border-radius: 0.5rem;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

body.woocommerce-page label:has(> .order-service-type:checked) {
    background: linear-gradient(180deg, rgba(230, 184, 0, 0.16) 0%, rgba(230, 184, 0, 0.05) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(230, 184, 0, 0.5);
}

body.woocommerce-page .wc_payment_method {
    border-radius: 0.5rem;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

body.woocommerce-page .wc_payment_method:has(input:checked) {
    background: linear-gradient(180deg, rgba(230, 184, 0, 0.14) 0%, rgba(230, 184, 0, 0.04) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(230, 184, 0, 0.45);
}

body.woocommerce-page .payment_box {
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35) !important;
}

/* Coupon "Apply" buttons — the custom checkout one (#manjits-apply-coupon-btn)
   and WooCommerce core's own cart-page coupon button (.apply-coupon-button)
   both pick up the same raised/pressed treatment as the primary buttons. */
body.woocommerce-page #manjits-apply-coupon-btn,
body.woocommerce-page .apply-coupon-button {
    background: linear-gradient(180deg, #f7d15c 0%, #e6b800 55%, #c99600 100%) !important;
    color: #2b2200 !important;
    border: 1px solid #a67c00;
    border-bottom: 3px solid #7d5f00;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 4px 8px rgba(0, 0, 0, 0.25);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.08s ease, box-shadow 0.08s ease, border-bottom-width 0.08s ease;
}

body.woocommerce-page #manjits-apply-coupon-btn:active:not(:disabled),
body.woocommerce-page .apply-coupon-button:active:not(:disabled) {
    transform: translateY(2px);
    border-bottom-width: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* "Update cart" submit button on the cart page uses the same outline
   treatment defined above (.btn-outline), no extra rule needed here. */

/* The site's actual "cart" UI is the header slide-out drawer
   (woocommerce/cart/sidebar.php), not the disabled /cart/ page — its
   Checkout CTA is a plain Tailwind-utility link, not .btn-primary, and
   the drawer is reachable from every page (not just woocommerce-page
   ones), so this rule isn't scoped to body.woocommerce-page. */
.cart-sidebar .manjits-checkout-cta {
    background: linear-gradient(180deg, #f7d15c 0%, #e6b800 55%, #c99600 100%) !important;
    color: #2b2200 !important;
    border: 1px solid #a67c00;
    border-bottom: 3px solid #7d5f00;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.08s ease, box-shadow 0.08s ease, border-bottom-width 0.08s ease, background 0.2s ease;
}

.cart-sidebar .manjits-checkout-cta:hover {
    background: linear-gradient(180deg, #f9dc7d 0%, #f0c000 55%, #d1a300 100%) !important;
}

.cart-sidebar .manjits-checkout-cta:active {
    transform: translateY(3px);
    border-bottom-width: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    body.woocommerce-page .btn-primary,
    body.woocommerce-page .btn-outline,
    body.woocommerce-page .btn-secondary,
    body.woocommerce-page #manjits-apply-coupon-btn,
    body.woocommerce-page .apply-coupon-button,
    body.woocommerce-page label:has(> .order-service-type),
    body.woocommerce-page .wc_payment_method {
        transition: none;
    }
}
