/*!
 * OmegAmino — Phase 5 WooCommerce glue styles.
 *
 * Scope is deliberately narrow: the bulk-discount table this phase introduces,
 * plus one defensive neutraliser for the cart drawer. Nothing here restyles the
 * shared product card, the drawer chrome, the shop grid or the PDP — those
 * belong to P1 / P3 / P4.
 */

/* -------------------------------------------------------------------------
 * 1. Cart-drawer wrapper neutraliser.
 *
 * parts/cart-drawer.php wraps parts/cart-drawer-inner.php in
 * <div class="oma-ch-body">, and the inner part opens with the SAME wrapper —
 * so the first render ships .oma-ch-body > .oma-ch-body (verified live: two
 * occurrences of class="oma-ch-body" on /). The woocommerce_add_to_cart_
 * fragments key is `div.oma-ch-body`, and jQuery's replaceWith on the outer
 * detaches the inner, so after the first AJAX add there is only one — i.e. the
 * drawer is nested before the first add and flat after it.
 *
 * .oma-ch-body is a flex column, so the nested copy is an extra flex level and
 * the two states can lay out differently. display:contents removes that extra
 * box, making the pre-add and post-add DOM render identically.
 *
 * This is a symptom fix in MY file because parts/cart-drawer.php is P1's. Once
 * P1 drops the duplicate wrapper the selector simply matches nothing.
 * ---------------------------------------------------------------------- */
.oma-ch-body > .oma-ch-body {
	display: contents;
}

/* -------------------------------------------------------------------------
 * 2. Bulk-discount (quantity-tier) table.
 *
 * Markup mirrors the source's Woo Discount Rules table. The source ships no
 * table-specific CSS for it (its plugin stylesheet only styles free-product
 * widgets), so it inherits BeTheme's generic table rules, measured from
 * source-cdp/merged.css and reproduced here:
 *
 *   table          width:100%; margin-bottom:15px; border-collapse:collapse;
 *   table td, th   padding:10px; text-align:center; border:1px solid;
 *                  vertical-align:middle
 *   table th       font-weight:700; background:#f9f9f9; color:#444;
 *                  box-shadow:none  (BeTheme's inset shadow is overridden by
 *                  the site's own custom CSS: `table th { box-shadow:none }`)
 *   table tr:nth-child(2n) td   background:rgba(0,0,0,.01)
 *   table tr:first-child td     box-shadow:none  (site override)
 *
 * P4 owns the PDP's final visual tuning; this is the source-measured baseline.
 * ---------------------------------------------------------------------- */
.oma-qty-tiers {
	margin: 0 0 15px;
}

.oma-qty-tiers table {
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 15px;
	border-collapse: collapse;
	border-spacing: 0;
	border-radius: 5px;
}

.oma-qty-tiers td,
.oma-qty-tiers th {
	padding: 10px;
	text-align: center;
	border-width: 1px;
	border-style: solid;
	border-color: rgba(0, 0, 0, 0.08);
	vertical-align: middle;
	font-size: 16px;
	line-height: 1.4;
}

.oma-qty-tiers th {
	font-weight: 700;
	background: #f9f9f9;
	color: #444;
	box-shadow: none;
}

.oma-qty-tiers tr:first-child td {
	box-shadow: none;
}

.oma-qty-tiers tr:nth-child(2n) td {
	background: rgba(0, 0, 0, 0.01);
}

/* The priced-out preview is present in the source markup but hidden by the
 * plugin (style="display:none") — the percentage is what shows. Keep it in the
 * DOM so the values are diffable against the harvest, and so a single filter
 * can reveal it. */
.oma-qty-tiers .wdr_table_discounted_price {
	display: none;
}

@media (max-width: 767px) {
	.oma-qty-tiers td,
	.oma-qty-tiers th {
		padding: 8px 6px;
		font-size: 14px;
	}
}
