/*
Theme Name:   Xstore child
Theme URI:    https://xstore.8theme.com
Description:  XStore is a multi-purpose theme that offers the ultimate WordPress and WooCommerce synergy, providing a comprehensive, all-in-one solution.
Author:       8theme
Author URI:   https://www.8theme.com
Template:     xstore
Version:      1.0
Text Domain:  xstore-child
Tags: e-commerce, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, custom-logo, featured-images, full-width-template, threaded-comments, accessibility-ready, rtl-language-support, footer-widgets, sticky-post, theme-options, translation-ready, ecommerce, woocommerce, shop, elementor, business, corporate, blog, news, light, dark
*/

/* RewindByte: FunnelKit Minimalist checkout #2126 only.
 * Review draft. Keep Stripe wallet artwork, iframe sizing and eligibility intact.
 */
body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #fkwcs-expresscheckout-fieldset {
    min-height: 0;
}

body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #fkwcs-expresscheckout-fieldset > legend {
    padding-bottom: 8px;
    font-weight: 500;
}

body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #fkwcs-payment-request-separator {
    margin: 16px 0 20px;
}

/* Keep each method name and its logos inside the radio's label. */
body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #payment ul.payment_methods > li.wc_payment_method > label {
    display: inline-flex !important; /* FunnelKit forces display: initial !important. */
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    width: calc(100% - 30px);
    min-height: 36px;
    vertical-align: middle;
    line-height: 1.5;
}

body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #payment .fkwcs_stripe_icons {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 100%;
}

body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #payment .fkwcs_stripe_icons img {
    width: 32px;
    height: 20px;
    max-height: 20px;
    margin: 0 !important; /* The gateway also emits an inline margin-left. */
    position: static;
    object-fit: contain;
    vertical-align: middle;
}

body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #payment ul.payment_methods > li.wc_payment_method > label > img.stripe-icon {
    width: auto;
    height: 24px;
    max-width: 56px;
    max-height: 24px;
    margin: 0 !important;
    position: static;
    object-fit: contain;
}

/* Restore keyboard focus that the checkout reset removes. */
body.elementor-page-2126.woocommerce-checkout #wfacp-e-form :is(input, select, textarea, button, a, [tabindex="0"]):focus-visible {
    outline: 2px solid #222222;
    outline-offset: 3px;
}

@media (max-width: 767px) {
    /* Readable inputs; avoids the usual small-input zoom trigger on iOS. */
    body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #wfacp_checkout_form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select, textarea),
    body.elementor-page-2126.woocommerce-checkout #wfacp-e-form #wfacp_checkout_form .select2-selection__rendered {
        font-size: 16px !important;
    }
}

/* RewindByte: hide only the visible SKU line in XStore header mini-carts. */
.elementor-location-header .elementor-widget-theme-etheme_cart .woocommerce-mini-cart-item .product_meta > .sku_wrapper {
    display: none;
}

/* RewindByte: visible payment-processing feedback for FunnelKit checkout #2126.
 * Only styles the native WooCommerce blockUI overlay during order submission.
 * Never changes checkout state, disables buttons, or interferes with Stripe.
 */
body.elementor-page-2126.woocommerce-checkout #wfacp-e-form form.processing .blockUI.blockOverlay {
    background-color: rgba(255, 255, 255, 0.82) !important;
    opacity: 1 !important;
}

body.elementor-page-2126.woocommerce-checkout #wfacp-e-form form.processing .blockUI.blockOverlay::before {
    content: "" !important;
    display: block !important;
    position: fixed !important;
    top: calc(48vh - 54px) !important;
    left: calc(50vw - min(16vw, 270px) - 21px) !important;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    border: 3px solid #e3e3e7 !important;
    border-top-color: #e3182e !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    animation: rewindbyte-checkout-spin 0.85s linear infinite !important;
    pointer-events: none !important;
    z-index: 999 !important;
}

body.elementor-page-2126.woocommerce-checkout #wfacp-e-form form.processing .blockUI.blockOverlay::after {
    content: "Processing your payment securely...\A Please don't refresh or submit again." !important;
    position: fixed !important;
    display: block !important;
    top: calc(48vh + 8px) !important;
    left: calc(50vw - min(16vw, 270px)) !important;
    width: min(325px, calc(100vw - 32px)) !important;
    padding: 17px 18px !important;
    transform: translateX(-50%) !important;
    border: 1px solid #e7e7eb !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 26px rgba(20, 20, 30, 0.09) !important;
    color: #222222 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    font-weight: 500 !important;
    text-align: center !important;
    white-space: pre-line !important;
    pointer-events: none !important;
    z-index: 999 !important;
}

@keyframes rewindbyte-checkout-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
    body.elementor-page-2126.woocommerce-checkout #wfacp-e-form form.processing .blockUI.blockOverlay::before {
        left: calc(50vw - 21px) !important;
    }
    body.elementor-page-2126.woocommerce-checkout #wfacp-e-form form.processing .blockUI.blockOverlay::after {
        left: 50vw !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.elementor-page-2126.woocommerce-checkout #wfacp-e-form form.processing .blockUI.blockOverlay::before {
        animation: none !important;
    }
}

/* RewindByte: hide nested WooCommerce blockUI spinners ONLY while the
 * checkout payment form is processing. The form-level direct-child overlay
 * keeps the primary red spinner and processing message; all blockUI
 * overlays still block interaction as intended. Outside of payment
 * submission, shipping and tax calculation indicators remain visible.
 *
 * Important: exclude ONLY the form-level overlay, not all overlay
 * descendants of the form (which accidentally exempted the gray spinner).
 */
body.elementor-page-2126.woocommerce-checkout:has(#wfacp-e-form form.processing)
    .blockUI.blockOverlay:not(#wfacp-e-form form.processing > .blockUI.blockOverlay)::before {
    content: none !important;
    display: none !important;
    animation: none !important;
}

/* RewindByte: hide only the redundant AST-only Actions row on My Account > View Order. */
body.woocommerce-account.woocommerce-view-order .woocommerce-order-details > table.woocommerce-table--order-details > tfoot > tr:has(> th.order-actions--heading):has(> td > a.ast_track):not(:has(> td > :not(a.ast_track))) {
    display: none;
}



/* RewindByte storefront UI polish — 2026-11-09. */
/* Keep the icon-only header Wishlist accessible to screen readers. */
:is(.elementor-1277, .elementor-2475).elementor-location-header
.elementor-widget-theme-etheme_wishlist .button-text {
    display: inline !important;
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Match AST Track to the existing rounded WooCommerce View action only. */
body.woocommerce-account .woocommerce-orders-table__cell-order-actions a.ast_track {
    border-radius: 30px !important;
}




/* Even desktop icon spacing: keep count badges out of the icon's layout width. */
@media (min-width: 1025px) {
    :is(.elementor-1277, .elementor-2475).elementor-location-header
    :is(.elementor-widget-theme-etheme_wishlist, .elementor-widget-theme-etheme_cart)
    .elementor-button-icon-qty {
        position: absolute;
        top: -8px;
        right: -10px;
        left: auto;
        transform: none;
        margin: 0;
        width: 18px;
        height: 18px;
        font-size: 12px;
        line-height: 18px;
    }
}





/* Keep both Orders actions stable on hover/focus and show keyboard focus. */
body.woocommerce-account .woocommerce-orders-table__cell-order-actions
    a:is(.view, .ast_track):is(:hover, :focus) {
    border-width: 1px !important;
    border-style: solid !important;
}
body.woocommerce-account .woocommerce-orders-table__cell-order-actions
    a:is(.view, .ast_track):focus-visible {
    outline: 2px solid #222222 !important;
    outline-offset: 3px !important;
}






/* Preserve compact, matching View/Track buttons in the mobile Orders table. */
@media (max-width: 767px) {
    body.woocommerce-account .woocommerce-orders-table__cell-order-actions
        a:is(.view, .ast_track) {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        min-width: 70px;
        min-height: 35px;
        padding: 10.5px 14px !important;
        border: 1px solid #222222 !important;
        border-radius: 30px;
        background: #222222 !important;
        color: #ffffff !important;
        font-family: Inter, sans-serif;
        font-size: 11.9px;
        font-weight: 400;
        line-height: 11.9px;
        text-transform: uppercase;
        text-decoration: none !important;
        margin: 2px 0;
    }
    body.woocommerce-account .woocommerce-orders-table__cell-order-actions
        a:is(.view, .ast_track):hover {
        background: #4c4c4c !important;
        border-color: #4c4c4c !important;
    }
}







/* Reuse the existing RewindByte category-link component. */
.tax-product_cat.term-handheld-consoles .elementor-element-68f73cac .elementor-heading-title a { text-decoration: underline; text-underline-offset: .15em; }
