/* Bulk Order Table: shared table look, used by the inline single-product table */
.wctbo-bulk-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.wctbo-bulk-table th, .wctbo-bulk-table td { border: 1px solid #e0e0e0; padding: 8px 10px; text-align: left; }
.wctbo-bulk-table thead th { background: #f7f7f7; }
.wctbo-row--unavailable { opacity: 0.5; }
.wctbo-bulk-actions { margin: 16px 0; display: flex; align-items: center; gap: 12px; }
.wctbo-login-for-price a, .wctbo-pending-approval, .wctbo-no-price { font-size: 0.9em; color: #757575; }

/* Bulk Order Table: single product page, inline (not a popup) */
.wctbo-single-bulk-table-wrap { margin: 20px 0; }
.wctbo-single-bulk-table-title { margin-bottom: 8px; }
.wctbo-bulk-table-scroll { overflow-x: auto; }
.wctbo-bulk-table-qty { width: 70px; }

/* Open Sizes: popup modal */
.wctbo-matrix-modal { display: none; position: fixed; inset: 0; z-index: 100000; }
.wctbo-matrix-modal.is-open { display: block; }
.wctbo-matrix-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.wctbo-matrix-modal-content {
	position: relative;
	background: #fff;
	max-width: 840px;
	width: 92%;
	margin: 5vh auto;
	max-height: 88vh;
	overflow-y: auto;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.wctbo-matrix-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #555;
}
body.wctbo-modal-open { overflow: hidden; }

.wctbo-matrix-table-scroll { overflow-x: auto; margin: 16px 0; }
.wctbo-matrix-table { border-collapse: collapse; width: 100%; }
.wctbo-matrix-table th, .wctbo-matrix-table td { border: 1px solid #e0e0e0; padding: 8px; text-align: center; white-space: nowrap; }
.wctbo-matrix-table thead th:nth-child(2), .wctbo-matrix-table tbody th { text-align: left; background: #f7f7f7; }
.wctbo-matrix-thumb-col { width: 56px; padding: 4px !important; }
.wctbo-matrix-thumb { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: 4px; margin: 0 auto; }
.wctbo-matrix-price-row td { background: #f7faf7; font-size: 0.88em; font-weight: 600; color: #2c6e2c; padding: 5px 8px; }
.wctbo-matrix-price-row .wctbo-matrix-price-label { text-align: left; color: #555; font-weight: 600; }
.wctbo-matrix-price-row .woocommerce-Price-amount { color: #2c6e2c; }
.wctbo-upcharge-badge { display: inline-block; margin-left: 4px; background: #fff3cd; color: #856404; font-size: 0.72em; font-weight: 700; padding: 1px 6px; border-radius: 10px; vertical-align: middle; white-space: nowrap; }
.wctbo-matrix-qty { width: 60px; }
.wctbo-matrix-na { color: #bbb; }
.wctbo-matrix-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }

/* Open Sizes: single product page trigger */
.wctbo-single-matrix-trigger { margin: 16px 0; }
.wctbo-single-matrix-note { font-size: 0.85em; color: #666; margin-top: 6px; }

/* Open Sizes: hide only the native "pick one variation, add one qty"
   controls — the quantity input, add-to-cart/quote button, and the
   dynamic single-variation info box. Color swatches, short description,
   spec tables, and any other custom content that a theme places inside
   form.variations_form are left alone. The size-attribute selector row
   itself is hidden per-product via JS (bulk-order.js), since its
   attribute name/slug varies by product and can't be targeted reliably
   with a single static CSS rule. */
.wctbo-open-matrix-product .woocommerce-variation-add-to-cart,
.wctbo-open-matrix-product .woocommerce-variation.single_variation {
	display: none !important;
}

/* ---- Prepack colour popup ---- */
.wctbo-prepack-popup-product .woocommerce-variation-add-to-cart,
.wctbo-prepack-popup-product .woocommerce-variation.single_variation {
	display: none !important;
}
.wctbo-prepack-note { font-size: 0.9em; color: #555; margin: 0 0 14px; }
.wctbo-prepack-table .wctbo-prepack-qty { width: 80px; }
.wctbo-prepack-table .wctbo-prepack-price { font-weight: 600; color: #2c6e2c; }
.wctbo-prepack-packs-label { font-size: 0.85em; color: #888; margin-left: 6px; }

/* SKU above product name in cart, checkout, orders, emails */
.wctbo-item-sku { display: block; font-size: 0.78em; font-weight: 600; color: #888; letter-spacing: 0.3px; text-transform: uppercase; line-height: 1.4; }

/* Clear cart button (cart page actions area) */
.wctbo-clear-cart { margin-left: 8px; }

/* Live stock counter under quantity inputs.
   Rendered as a circular badge: fixed width/height with a matching
   line-height keeps it a true circle regardless of whether the figure is
   1 or 4 digits, and min-width lets larger numbers stretch it into a
   pill rather than overflow. */
.wctbo-stock-note {
	display: inline-block;
	font-size: 0.95em;
	font-weight: 600;
	margin-top: 5px;
	min-width: 30px;
	height: 30px;
	line-height: 30px;
	padding: 0 8px;
	border-radius: 999px;
	text-align: center;
	white-space: nowrap;
	box-sizing: border-box;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.wctbo-stock-note--high { background: #d4edda; color: #17692a; }
.wctbo-stock-note--low  { background: #fdf3cf; color: #8a6d1a; }
.wctbo-stock-note--none { background: #f8d7da; color: #a1232d; }
.wctbo-qty-capped {
	border-color: #a5711c !important;
	background: #fdf3e0 !important;
	transition: background 0.3s ease, border-color 0.3s ease;
}

/* Sections inside the popup on mixed products.
   The divider sits on the second section only, so a product with just
   one section doesn't get a stray rule above its heading. */
.wctbo-prepack-section,
.wctbo-open-sizes-section { margin-bottom: 8px; }

.wctbo-prepack-section + .wctbo-open-sizes-section,
.wctbo-open-sizes-section + .wctbo-prepack-section {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 2px solid #e0e0e0;
}

.wctbo-prepack-section h3,
.wctbo-open-sizes-section h3 { margin: 0 0 6px; }

.wctbo-prepack-section-note,
.wctbo-section-note { font-size: 0.9em; color: #666; margin: 0 0 14px; }
