/**
 * Tiered pricing — horizontal qty / unit-price board (site palette).
 */

.cx-tier-hint {
	margin: 0 0 10px;
	font-size: 11px;
	line-height: 1.45;
	color: var(--global-palette5, #4A5568);
	text-align: center;
}

.cx-tier-hint__sep {
	opacity: 0.55;
}

.cx-channel-wholesale .cx-shop-sidebar__kicker::after {
	content: " · Wholesale";
	font-weight: 700;
}

.cx-tier-table {
	--cx-tier-head-bg: var(--global-palette3, #1A202C);
	--cx-tier-head-text: var(--global-palette9, #fff);
	--cx-tier-price-bg: var(--global-palette1, #f05a24);
	--cx-tier-price-text: var(--global-palette9, #fff);
	--cx-tier-divider: rgba(255, 255, 255, 0.22);
	--cx-tier-radius: 10px;

	margin: 1rem 0 1.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	max-width: 100%;
}

.cx-tier-table__min {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--global-palette5, #4A5568);
}

.cx-tier-table__grid {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	font-size: 14px;
	border-radius: var(--cx-tier-radius);
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(26, 32, 44, 0.08);
}

.cx-tier-table__qty-row th {
	padding: 12px 8px;
	background: var(--cx-tier-head-bg);
	color: var(--cx-tier-head-text);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.02em;
	text-align: center;
	vertical-align: middle;
	border: 0;
	border-right: 1px solid var(--cx-tier-divider);
	line-height: 1.2;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.cx-tier-table__qty-row th:last-child {
	border-right: 0;
}

.cx-tier-table__price-row td {
	padding: 12px 8px 14px;
	background: var(--cx-tier-price-bg);
	color: var(--cx-tier-price-text);
	text-align: center;
	vertical-align: middle;
	border: 0;
	border-right: 1px solid var(--cx-tier-divider);
	line-height: 1.15;
	transition: background 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.cx-tier-table__price-row td:last-child {
	border-right: 0;
}

.cx-tier-table__amount {
	display: block;
	font-weight: 800;
	font-size: clamp(13px, 2.4vw, 18px);
	color: inherit;
}

.cx-tier-table__amount .woocommerce-Price-amount,
.cx-tier-table__amount .amount,
.cx-tier-table__amount bdi {
	font-weight: inherit;
	color: inherit;
}

.cx-tier-table__unit {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	opacity: 0.92;
	text-transform: uppercase;
}

/* Active column follows current qty */
.cx-tier-table__qty-row th.is-active {
	background: var(--global-palette4, #2D3748);
	box-shadow: inset 0 -3px 0 var(--global-palette9, #fff);
}

.cx-tier-table__price-row td.is-active {
	filter: brightness(1.08);
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.cx-shop-card__price[data-cx-live-price],
.cx-el-pcard__price[data-cx-live-price],
.summary .price[data-cx-live-price] {
	transition: opacity 0.15s ease;
}

@media (max-width: 640px) {
	.cx-tier-table__grid {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.cx-tier-table__qty-row th,
	.cx-tier-table__price-row td {
		min-width: 72px;
		padding: 10px 6px;
	}

	.cx-tier-table__amount {
		font-size: 13px;
	}

	.cx-tier-table__unit {
		font-size: 11px;
	}
}
