/* Anivation Dynamic Pricing & Tiers — bulk pricing table
   BEM block: product-single__pricing-table */

.product-single__pricing-table {
	margin: 1em 0 1.5em;
	font-size: 0.95em;
}

.product-single__pricing-table__grid {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.product-single__pricing-table__heading,
.product-single__pricing-table__cell {
	padding: 0.5em 0.85em;
	border: 1px solid rgba( 0, 0, 0, 0.1 );
	text-align: left;
}

.product-single__pricing-table__heading {
	background: rgba( 0, 0, 0, 0.04 );
	font-weight: 600;
}

.product-single__pricing-table__body .product-single__pricing-table__row:nth-child( even ) {
	background: rgba( 0, 0, 0, 0.02 );
}

.product-single__pricing-table__cell--price {
	font-weight: 600;
	white-space: nowrap;
}

/* Rows are clickable — clicking one fills the quantity field */
.product-single__pricing-table__body .product-single__pricing-table__row {
	cursor: pointer;
}

/* Maatwerk (custom quote) notice shown below the table */
.product-single__pricing-table__maatwerk-notice {
	margin: 0.5em 0 1.5em;
	font-size: 0.9em;
	font-style: italic;
	color: #555;
}

/* Unit suffix (e.g. "per kg") in the price header and after prices */
.product-single__pricing-table__unit,
.product-single__price-unit,
.aniv-adp-price-unit {
	font-size: 0.85em;
	font-weight: 400;
	color: #666;
	margin-left: 0.25em;
}

/* Discount badge (e.g. "-15%") */
.product-single__pricing-table__badge {
	display: inline-block;
	margin-left: 0.5em;
	padding: 0.1em 0.5em;
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.5;
	color: #fff;
	background: #2e8b57;
	border-radius: 999px;
	white-space: nowrap;
}

.product-single__pricing-table__badge .woocommerce-Price-amount {
	color: inherit;
}

/* Active (selected) tier highlight — no left border; the radio marks selection */
.product-single__pricing-table__row--active {
	background: rgba( 70, 180, 90, 0.14 ) !important;
}

/* Radio indicator in front of each quantity range */
.product-single__pricing-table__radio {
	display: inline-block;
	box-sizing: border-box;
	width: 1.05em;
	height: 1.05em;
	margin-right: 0.55em;
	border: 2px solid rgba( 0, 0, 0, 0.35 );
	border-radius: 50%;
	vertical-align: -0.18em;
	position: relative;
	transition: border-color 0.15s ease;
}

.product-single__pricing-table__row--active .product-single__pricing-table__radio {
	border-color: #2e8b57;
}

.product-single__pricing-table__row--active .product-single__pricing-table__radio::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.55em;
	height: 0.55em;
	border-radius: 50%;
	background: #2e8b57;
	transform: translate( -50%, -50% );
}

/* Vertical modifier: render rows as a horizontal strip of cards */
.product-single__pricing-table--vertical {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.product-single__pricing-table--vertical .product-single__pricing-table__grid,
.product-single__pricing-table--vertical .product-single__pricing-table__body {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	width: 100%;
}

.product-single__pricing-table--vertical .product-single__pricing-table__head {
	display: none;
}

.product-single__pricing-table--vertical .product-single__pricing-table__row {
	display: block;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 6px;
	padding: 0.6em 0.9em;
	min-width: 90px;
	text-align: center;
}

.product-single__pricing-table--vertical .product-single__pricing-table__cell {
	display: block;
	border: 0;
	padding: 0.15em 0;
}

/* ------------------------------------------------------------------ */
/* Quantity-driven widget: live savings notice + maatwerk button       */
/* ------------------------------------------------------------------ */

.aniv-adp-qty-widget {
	display: block;
	flex-basis: 100%;
	width: 100%;
}

/* The savings notice — a small callout under the add-to-cart button */
.aniv-adp-savings {
	margin: 0.85em 0 0;
	padding: 0.7em 1em;
	border-radius: 8px;
	font-size: 0.95em;
	line-height: 1.4;
	animation: aniv-adp-pop 0.25s ease-out;
}

.aniv-adp-savings[hidden] {
	display: none;
}

.aniv-adp-savings--discount {
	background: #e8f5e9;
	border: 1px solid #b6dfba;
	color: #1b5e20;
}

.aniv-adp-savings--maatwerk {
	background: #eef4f7;
	border: 1px solid #bcd6e2;
	color: #1c3d4c;
}

.aniv-adp-savings .woocommerce-Price-amount,
.aniv-adp-savings strong {
	color: inherit;
	font-weight: 700;
	white-space: nowrap;
}

@keyframes aniv-adp-pop {
	from {
		opacity: 0;
		transform: translateY( 4px );
	}
	to {
		opacity: 1;
		transform: translateY( 0 );
	}
}

/* The maatwerk button mirrors the theme's add-to-cart button width */
.aniv-adp-maatwerk-button {
	display: inline-block;
	margin-top: 0;
}

.aniv-adp-maatwerk-button[hidden] {
	display: none;
}

/* Selectable simple-product attributes (rendered before the add-to-cart button) */
.aniv-adp-attr-fields {
	margin: 0 0 1.25em;
}

.aniv-adp-attr-field {
	margin: 0 0 0.85em;
}

.aniv-adp-attr-label {
	display: block;
	margin: 0 0 0.35em;
	font-weight: 600;
}

.aniv-adp-attr-select {
	display: block;
	width: 100%;
	max-width: 320px;
}
