/**
 * Order Table Columns — structural layout for the injected Qty and Code columns.
 *
 * Design (colours, fonts, borders, cell padding) is handled by Avada — we only set
 * structural layout here: column widths and alignment.
 *
 * The checkout-review and order-details tables share one layout: Product absorbs the
 * remaining width while Code, Quantity and Total share the rest equally, so the small
 * data columns line up instead of Product/Total greedily grabbing the slack (that
 * greediness is what made padding on one column shrink the others). Widths — unlike
 * padding — are NOT locked by Avada's "WooCommerce Order Table" element, so a scoped
 * rule wins normally.
 *
 * Scope note: the equal-width rules are scoped to the checkout-review and order-details
 * tables (never the generic .shop_table), so they never touch the cart's own layout or
 * its native quantity input, even though these assets also load on the cart for the Code
 * column. Cart Code styling is inherited from the Price column by the script instead.
 *
 * @package DesireCustom
 */

/* Product column — absorbs the remaining width (all shop_table contexts, incl. cart). */
.shop_table th.product-name,
.shop_table td.product-name {
	width: auto;
}

/* Code, Quantity and Total — equal width, right-aligned (checkout + order only).
   - width is !important because Avada gives checkout's Total a fixed 40%; these tables
     never stack responsively, so a fixed percentage is safe.
   - text-align is !important because Avada centres .product-quantity by default. */
.shop_table.order_details th.product-code,
.shop_table.order_details td.product-code,
.shop_table.order_details th.product-quantity,
.shop_table.order_details td.product-quantity,
.shop_table.order_details th.product-total,
.shop_table.order_details td.product-total,
.woocommerce-checkout-review-order-table th.product-code,
.woocommerce-checkout-review-order-table td.product-code,
.woocommerce-checkout-review-order-table th.product-quantity,
.woocommerce-checkout-review-order-table td.product-quantity,
.woocommerce-checkout-review-order-table th.product-total,
.woocommerce-checkout-review-order-table td.product-total {
	width: 16% !important;
	text-align: right !important;
	white-space: nowrap;
}

/* Cart only: the Code column here has no width of its own (it inherits the Price column's
   look), so it shrinks to the bare SKU and reads as cramped. Give it some room. Scoped to
   the cart table so it never affects the balanced order/checkout layout above. */
.woocommerce-cart-form__contents th.product-code,
.woocommerce-cart-form__contents td.product-code {
	width: 10%;
	white-space: nowrap;
}

/* Fallback: hide data spans if JS fails to run */
.desire-qty-data,
.desire-sku-data {
	display: none;
}
