/* Atlantis Pack Price: "was / now" price of multi-pack variations. */
/* Size and weight of del are left to the theme, which often sets them for every struck-through price. */
.woocommerce-variation-price .price del {
	color: var(--atlpp-was-color, #8c8c8c);
	margin-right: 0.4em;
	opacity: 1;
	text-decoration: line-through;
}

.woocommerce-variation-price .price ins {
	background: none;
	text-decoration: none;
}

.woocommerce-variation-price .atlpp-saving {
	color: var(--atlpp-saving-color, inherit);
	display: block;
	font-weight: 700;
	margin-top: 0.25em;
}

/* Pack options. The options explain themselves, so the attribute label goes in both layouts. */
table.variations:has(.atlpp-pack-options) {
	width: 100%;
}

table.variations tr:has(.atlpp-pack-options) > th.label {
	display: none;
}

/* Default layout, "pills": swatches show the pack label only, the price block below shows now, then was. */
.atlpp-pack-options .atlpp-opt-unit,
.atlpp-pack-options .atlpp-opt-total {
	display: none;
}

.variations_form:has(.atlpp-pack-options) .woocommerce-variation-price .price {
	align-items: baseline;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0 0.5em;
}

.variations_form:has(.atlpp-pack-options) .woocommerce-variation-price .price ins {
	order: -1;
}

.variations_form:has(.atlpp-pack-options) .woocommerce-variation-price .price del {
	margin-right: 0;
}

.variations_form:has(.atlpp-pack-options) .woocommerce-variation-price .atlpp-saving {
	display: none;
}

/* "Rows" layout, enabled by the atlpp-rows class on an ancestor: quantity, unit price and total per row. */
/* The rows carry the total, so the separate price block goes. */
.atlpp-rows .variations_form:has(.atlpp-pack-options) .woocommerce-variation-price {
	display: none;
}

.atlpp-rows .bricks-variation-swatches.atlpp-pack-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
}

.atlpp-rows .atlpp-pack-options li {
	width: 100%;
}

.atlpp-rows .atlpp-pack-options .bricks-swatch-button {
	align-items: center;
	display: flex;
	gap: 12px;
	text-align: left;
	width: 100%;
}

.atlpp-rows .atlpp-pack-options .atlpp-opt-qty {
	flex: 0 0 auto;
	min-width: 4em;
}

.atlpp-rows .atlpp-pack-options .atlpp-opt-unit {
	display: block;
	flex: 1 1 auto;
	font-weight: 400;
	opacity: 0.8;
	text-transform: none;
}

.atlpp-rows .atlpp-pack-options .atlpp-opt-total {
	align-items: flex-end;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-left: auto;
	text-transform: none;
	white-space: nowrap;
}

.atlpp-rows .atlpp-pack-options .atlpp-opt-total del {
	font-size: 0.8em;
	font-weight: 400;
	opacity: 0.6;
}
