/* ==========================================================================
   ELC Bulk Discount – storefront styles (v1.0.1)
   Change the colours below to match your brand. Everything else follows them.
   ========================================================================== */
.elcbd-wrap,
.elcbd-badge,
.elcbd-cart-label,
.elcbd-savings {
	--elcbd-accent: #0a7d45;          /* savings / active tier */
	--elcbd-accent-soft: #e9f6ef;     /* active row background */
	--elcbd-accent-line: rgba(10, 125, 69, 0.3); /* badge border */
	--elcbd-line: #e2e6ea;            /* borders */
	--elcbd-head: #f5f7f9;            /* header background */
	--elcbd-muted: #5f6b76;           /* secondary text */
	--elcbd-radius: 10px;
}

/* ---------- Tier card ---------- */
.elcbd-wrap {
	margin: 1.25em 0 1.5em;
	max-width: 100%;
	border: 1px solid var(--elcbd-line);
	border-radius: var(--elcbd-radius);
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.elcbd-table {
	width: 100%;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse;
	font-size: 0.95em;
	line-height: 1.4;
	font-variant-numeric: tabular-nums;
}

/* Heading band */
.elcbd-caption {
	caption-side: top;
	padding: 0.8em 1em;
	border-bottom: 1px solid var(--elcbd-line);
	background: var(--elcbd-head);
	text-align: left;
	font-size: 1em;
	font-weight: 700;
}
.elcbd-caption::before {
	content: "";
	display: inline-block;
	width: 0.55em;
	height: 0.55em;
	margin-right: 0.55em;
	border-radius: 50%;
	background: var(--elcbd-accent);
	vertical-align: 0.1em;
}

/* Cells */
.elcbd-table th,
.elcbd-table td {
	padding: 0.7em 1em !important;
	border: 0 !important;
	border-bottom: 1px solid var(--elcbd-line) !important;
	background: transparent;
	text-align: left;
	vertical-align: middle;
}
.elcbd-table thead th {
	color: var(--elcbd-muted);
	font-size: 0.82em;
	font-weight: 600;
	letter-spacing: 0.01em;
}
.elcbd-table tbody tr:last-child td {
	border-bottom: 0 !important;
}

/* Quantity column */
.elcbd-table tbody td:first-child {
	font-weight: 600;
	white-space: nowrap;
}

/* Discount column: green pill (not for the "Regular price" row) */
.elcbd-table tbody tr:not([data-min="1"]) td:nth-child(2) {
	color: var(--elcbd-accent);
	font-weight: 600;
}

/* Price column: right aligned, easy to compare */
.elcbd-table th:last-child,
.elcbd-table td.elcbd-unit {
	text-align: right;
	white-space: nowrap;
}
.elcbd-table td.elcbd-unit {
	font-weight: 700;
}
.elcbd-table td.elcbd-unit .woocommerce-Price-amount {
	font-weight: inherit;
}

/* Regular price row is quieter */
.elcbd-table tbody tr[data-min="1"] td {
	color: var(--elcbd-muted);
}

/* Current tier (updates as the customer changes quantity) */
.elcbd-table tbody tr td {
	transition: background-color 0.2s ease;
}
.elcbd-table tbody tr.is-active td {
	background: var(--elcbd-accent-soft);
	color: inherit;
}
.elcbd-table tbody tr.is-active td:first-child {
	box-shadow: inset 4px 0 0 var(--elcbd-accent);
}
.elcbd-table tbody tr.is-active td:first-child::after {
	content: "\2713";
	margin-left: 0.45em;
	color: var(--elcbd-accent);
	font-weight: 700;
}

/* Hint for variable products */
.elcbd-note {
	margin: 0 !important;
	padding: 0.7em 1em;
	border-top: 1px solid var(--elcbd-line);
	color: var(--elcbd-muted);
	font-size: 0.88em;
}
.elcbd-note[hidden] {
	display: none;
}

/* Live "You pay / You save" message */
.elcbd-live {
	margin: 0 !important;
	padding: 0.8em 1em;
	border-top: 1px solid var(--elcbd-line);
	background: var(--elcbd-accent-soft);
	color: var(--elcbd-accent);
	font-size: 0.92em;
	font-weight: 600;
	line-height: 1.5;
}
.elcbd-live:empty {
	display: none;
}

/* ---------- Shop / category label ---------- */
.elcbd-badge {
	display: inline-block;
	margin: 0.35em 0;
	padding: 0.2em 0.65em;
	border: 1px solid var(--elcbd-accent-line);
	border-radius: 999px;
	background: var(--elcbd-accent-soft);
	color: var(--elcbd-accent);
	font-size: 0.78em;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

/* ---------- Cart ---------- */
.woocommerce-cart-form del .woocommerce-Price-amount,
.woocommerce-mini-cart del .woocommerce-Price-amount {
	opacity: 0.6;
	font-weight: 400;
}
.elcbd-cart-label {
	display: table;
	margin-top: 0.3em;
	padding: 0.1em 0.55em;
	border-radius: 999px;
	background: var(--elcbd-accent-soft);
	color: var(--elcbd-accent);
	font-size: 0.75em;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}
.elcbd-savings th,
.elcbd-savings td {
	color: var(--elcbd-accent);
}
.elcbd-savings td {
	font-weight: 700;
}

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
	.elcbd-table {
		font-size: 0.9em;
	}
	.elcbd-caption,
	.elcbd-table th,
	.elcbd-table td,
	.elcbd-note,
	.elcbd-live {
		padding-left: 0.75em !important;
		padding-right: 0.75em !important;
	}
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
	.elcbd-table tbody tr td {
		transition: none;
	}
}
