/**
 * Volume-pricing (quantity price breaks) — product page.
 * Bound to the child theme's M3 tokens (with safe fallbacks) so it inherits the
 * site's colour / shape / spacing system. Loaded only on single product pages
 * for Protocentral-branded products with an active break schedule.
 */

.pc-bulk-pricing {
	margin: var(--space-3, 12px) 0;
	padding: 12px;
	background: var(--md-sys-color-surface-container-low, #f3f6f7);
	border: 1px solid var(--md-sys-color-outline-variant, #d5dee0);
	border-radius: var(--radius-medium, 12px);
}

.pc-bulk-pricing__head {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
	color: var(--md-sys-color-primary, #125e7a);
}

.pc-bulk-pricing__head .material-symbols-outlined {
	font-size: 18px;
	line-height: 1;
}

.pc-bulk-pricing__title {
	font-weight: 600;
	font-size: var(--type-label-large-size, 0.875rem);
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.pc-bulk-pricing__table {
	width: 100%;
	margin: 0; /* reset Shoptimizer/WooCommerce's default table bottom-margin
	              (~1.618em) which otherwise leaves a gap below the last row */
	border-collapse: collapse;
	font-size: var(--type-body-medium-size, 0.9rem);
}

.pc-bulk-pricing__table th,
.pc-bulk-pricing__table td {
	text-align: left;
	padding: 5px 8px;
	border-bottom: 1px solid var(--md-sys-color-outline-variant, #e2e8ea);
}

.pc-bulk-pricing__table th {
	font-weight: 600;
	color: var(--md-sys-color-on-surface-variant, #41484b);
	font-size: var(--type-label-medium-size, 0.78rem);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding-top: 0;
}

/* First column flush-left, last column flush-right with the box padding so the
   table content aligns to the box edges (equal interior gutters all round). */
.pc-bulk-pricing__table th:first-child,
.pc-bulk-pricing__table td:first-child { padding-left: 0; }
.pc-bulk-pricing__table th:last-child,
.pc-bulk-pricing__table td:last-child { padding-right: 0; }

/* Last row sits flush to the box's bottom padding — no extra trailing gap. */
.pc-bulk-pricing__table tbody tr:last-child td { padding-bottom: 0; }

.pc-bulk-pricing__table td:nth-child(2) { font-variant-numeric: tabular-nums; font-weight: 600; }
.pc-bulk-pricing__table td:nth-child(3) { color: var(--md-sys-color-primary, #125e7a); font-weight: 600; }

.pc-bulk-pricing__table tbody tr:last-child td { border-bottom: 0; }

/* Active tier (the break the current quantity qualifies for) */
.pc-bulk-pricing__table tr.is-active {
	background: var(--md-sys-color-primary-container, #cfe7f0);
	border-radius: var(--radius-small, 8px);
}
.pc-bulk-pricing__table tr.is-active td {
	color: var(--md-sys-color-on-primary-container, #06384a);
}

/* Defensive: ensure the hidden readout reserves no vertical space even if a
   theme resets [hidden]. It only contributes height once JS reveals it. */
.pc-bulk-pricing__readout[hidden] { display: none !important; }
.pc-bulk-pricing__readout {
	margin: 8px 0 0;
	font-size: var(--type-body-small-size, 0.82rem);
	color: var(--md-sys-color-on-surface, #1a1c1d);
}
.pc-bulk-pricing__readout strong { color: var(--md-sys-color-primary, #125e7a); }

.pc-bulk-pricing__rfq {
	margin: var(--space-3, 12px) 0 0;
	font-size: var(--type-body-small-size, 0.8rem);
	color: var(--md-sys-color-on-surface-variant, #41484b);
}
.pc-bulk-pricing__rfq a {
	color: var(--md-sys-color-primary, #125e7a);
	text-decoration: none;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 2px;
}
.pc-bulk-pricing__rfq a:hover { text-decoration: underline; }
.pc-bulk-pricing__rfq .material-symbols-outlined { font-size: 16px; }

/* Cart line annotation */
.pc-bulk-cart-note {
	display: inline-block;
	margin-left: 4px;
	color: var(--md-sys-color-primary, #125e7a);
	font-weight: 600;
}
