/* Upsell checkbox items on cart + checkout, and on a qualifying product's
 * own page (inside its add-to-cart form). */
.ds-upsell-boxes--single-product {
    margin-top: 20px;
}
.ds-upsell-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}
.ds-upsell-item__label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}
.ds-upsell-item__checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.ds-upsell-item__thumb {
    display: inline-block;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}
.ds-upsell-item__thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 3px;
}
/* The small square crop (WooCommerce "thumbnail" size) is what shows by
 * default. On hover it's swapped for a second, uncropped image at its own
 * aspect ratio - the square crop can't be "uncropped" via CSS since the
 * cropped-away pixels don't exist in that generated file. */
.ds-upsell-item__thumb-full {
    display: none;
}
.ds-upsell-item__thumb:hover img:not(.ds-upsell-item__thumb-full) {
    visibility: hidden;
}
.ds-upsell-item__thumb:hover .ds-upsell-item__thumb-full {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    max-width: 340px;
    height: auto;
    max-height: 260px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    z-index: 20;
}
.ds-upsell-item__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ds-upsell-item__title {
    font-weight: 600;
}
.ds-upsell-item__desc {
    font-size: 12px;
    color: #666;
}
/* Loading state uses WooCommerce's own blockUI overlay (see cart-upsell.js),
 * which is absolutely positioned and doesn't change this item's height.
 * Flatsome (flatsome-shop.css) only draws the spinner icon for blockUI
 * overlays inside specific containers - .cart_totals, .woocommerce-cart-form,
 * .woocommerce-checkout-review-order, .woocommerce-mini-cart-item. Our box
 * sits outside all of those on checkout (it's rendered by
 * woocommerce_checkout_before_order_review, which fires *before* the
 * .woocommerce-checkout-review-order wrapper opens), so that CSS never
 * matched it there and only the plain grey overlay showed. Re-declaring the
 * same rules scoped to .ds-upsell-item makes it use the exact same spinner
 * everywhere instead of a one-off custom one. */
.ds-upsell-item .blockUI.blockOverlay {
    background-color: transparent !important;
    opacity: .5 !important;
}
.ds-upsell-item .blockUI.blockOverlay:before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-top: -.5em;
    margin-left: -.5em;
    font-size: 2em;
    line-height: 1;
    text-align: center;
    pointer-events: none;
    border-radius: 50%;
    border-top: 3px solid rgba(0, 0, 0, .1) !important;
    border-right: 3px solid rgba(0, 0, 0, .1) !important;
    border-bottom: 3px solid rgba(0, 0, 0, .1) !important;
    border-left: 3px solid var(--fs-color-primary, #000);
    animation: ds-cart-upsell-spin .6s linear infinite;
}
.dark .ds-upsell-item .blockUI.blockOverlay:before {
    border: 3px solid rgba(0, 0, 0, .1) !important;
    border-left-color: #fff !important;
}
@keyframes ds-cart-upsell-spin {
    to { transform: rotate(360deg); }
}
