/* --------------------------------------------------------------------------
 * CIGSLT single-product integrations for YITH Dynamic Pricing and YITH Points
 * -------------------------------------------------------------------------- */

/* Dynamic Pricing: shared wrapper and labels. */
body.single-product .ywdpd-table-discounts-wrapper {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 16px 0 12px;
	color: var(--cigslt-product-ink);
	font-family: var(--cigslt-product-body);
}

body.single-product .ywdpd-table-discounts-wrapper:empty {
	display: none;
	margin: 0;
}

body.single-product .ywdpd-table-discounts-wrapper > .ywdpd-table-discounts-label {
	display: flex;
	box-sizing: border-box;
	width: fit-content;
	max-width: 100%;
	min-height: 34px;
	margin: 0 !important;
	padding: 7px 10px;
	align-items: center;
	color: var(--cigslt-product-lime);
	background: var(--cigslt-product-ink);
	border: 2px solid var(--cigslt-product-ink);
	font-family: var(--cigslt-product-mono);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: .08em;
	text-transform: uppercase;
	gap: 10px;
	flex-wrap: wrap;
}

body.single-product .ywdpd-table-discounts-wrapper > .ywdpd-table-discounts-label strong {
	color: inherit;
	font: inherit;
}

body.single-product .ywdpd-table-discounts-wrapper > .ywdpd-table-discounts-label span {
	color: var(--cigslt-product-paper);
	font-size: 9px;
}

body.single-product .ywdpd-table-discounts-wrapper > .ywdpd-table-discounts-note {
	box-sizing: border-box;
	margin: 12px 0 0 !important;
	padding: 5px 0 5px 10px;
	color: var(--cigslt-product-muted);
	border-left: 4px solid var(--cigslt-product-lime);
	font-family: var(--cigslt-product-mono);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .03em;
}

/* Dynamic Pricing: boxed quantity tiers used by the current product page. */
body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-boxed {
	display: grid !important;
	box-sizing: border-box;
	width: calc(100% - 5px) !important;
	max-width: calc(100% - 5px);
	height: auto !important;
	margin: 0 5px 5px 0 !important;
	padding: 2px;
	grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
	align-items: stretch;
	background: var(--cigslt-product-ink);
	border: 0;
	box-shadow: 5px 5px 0 var(--cigslt-product-lime);
	gap: 2px;
}

body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-boxed.vertical {
	width: min(360px, calc(100% - 5px)) !important;
	max-width: calc(100% - 5px);
	grid-template-columns: minmax(0, 1fr);
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item {
	display: flex;
	box-sizing: border-box;
	min-width: 0 !important;
	min-height: 40px;
	margin: 0;
	padding: 13px 10px;
	align-items: stretch;
	justify-content: center;
	color: var(--cigslt-product-ink);
	background: var(--cigslt-product-white);
	border: 0 !important;
	border-radius: 0;
	cursor: pointer;
	transition: color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpp-boxed-content {
	display: flex;
	width: 100%;
	height: auto;
	min-width: 0;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 3px;
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-units {
	color: inherit !important;
	font-family: var(--cigslt-product-body);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-price {
	color: var(--cigslt-product-muted);
	font-family: var(--cigslt-product-body);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item .ywdpd-price :is(.amount, bdi, .woocommerce-Price-currencySymbol) {
	color: inherit !important;
	font: inherit !important;
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-discount {
	margin-top: 4px;
	padding: 3px 6px;
	color: var(--cigslt-product-lime) !important;
	background: var(--cigslt-product-ink);
	font-family: var(--cigslt-product-mono);
	font-size: 8px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .06em;
	text-transform: uppercase;
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item:hover,
body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item:focus-within {
	background: var(--cigslt-product-lime);
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item:hover .ywdpd-price,
body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item:focus-within .ywdpd-price {
	color: var(--cigslt-product-ink);
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item.ywdpd_active {
	color: var(--cigslt-product-lime);
	background: var(--cigslt-product-ink);
	box-shadow: inset 0 0 0 2px var(--cigslt-product-lime);
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item.ywdpd_active .ywdpd-price {
	color: var(--cigslt-product-paper) !important;
}

body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item.ywdpd_active .ywdpd-discount {
	color: var(--cigslt-product-ink) !important;
	background: var(--cigslt-product-lime);
}

/* Dynamic Pricing: classic table fallback. */
body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-table {
	box-sizing: border-box;
	width: calc(100% - 5px) !important;
	margin: 0 5px 5px 0;
	color: var(--cigslt-product-ink);
	background: var(--cigslt-product-white);
	border: 2px solid var(--cigslt-product-ink);
	border-collapse: collapse !important;
	border-spacing: 0;
	box-shadow: 5px 5px 0 var(--cigslt-product-lime);
	font-family: var(--cigslt-product-body);
	table-layout: fixed;
}

body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-table :is(th, td) {
	box-sizing: border-box;
	padding: 9px 7px !important;
	color: var(--cigslt-product-ink);
	background: var(--cigslt-product-white);
	border: 1px solid var(--cigslt-product-ink) !important;
	font-size: 11px;
	line-height: 1.35;
	text-align: center;
	vertical-align: middle;
	overflow-wrap: anywhere;
}

body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-table th {
	color: var(--cigslt-product-lime);
	background: var(--cigslt-product-ink);
	font-family: var(--cigslt-product-mono);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
}

body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-table tr td:hover,
body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-table tr td.qty-price-info:hover span {
	color: var(--cigslt-product-ink) !important;
	background: var(--cigslt-product-lime) !important;
}

body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-table tr td.ywdpd_active {
	color: var(--cigslt-product-lime) !important;
	background: var(--cigslt-product-ink) !important;
	border-color: var(--cigslt-product-lime) !important;
}

body.single-product .summary.entry-summary :is(.show_note_on_apply_products, .show_note_on_adjustment_products) {
	box-sizing: border-box;
	margin: 14px 0;
	padding: 10px 12px;
	color: var(--cigslt-product-ink);
	background: var(--cigslt-product-soft);
	border: 2px dashed var(--cigslt-product-ink);
	font-family: var(--cigslt-product-mono);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.5;
}

/* Points and Rewards: product and live variation messages. */
body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) {
	position: relative;
	display: inline-block;
	box-sizing: border-box;
	width: auto;
	max-width: calc(100% - 5px);
	margin: 10px 5px 12px 0 !important;
	padding: 8px 12px !important;
	color: var(--cigslt-product-ink) !important;
	background: var(--cigslt-product-white) !important;
	border: 2px solid var(--cigslt-product-ink);
	border-radius: 0 !important;
	box-shadow: 4px 4px 0 var(--cigslt-product-lime);
	font-family: var(--cigslt-product-body);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation):has(> img, > svg) {
	min-height: 0;
	padding-left: 42px !important;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) > img {
	position: absolute;
	top: 50%;
	left: 12px;
	display: block;
	float: none;
	width: 17px !important;
	max-width: 17px !important;
	height: 24px;
	margin: 0 !important;
	object-fit: contain;
	transform: translateY(-50%);
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) > svg {
	position: absolute;
	top: 50%;
	left: 10px;
	display: block;
	width: 22px;
	height: 22px;
	margin: 0;
	transform: translateY(-50%);
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) > svg path {
	fill: var(--cigslt-product-ink) !important;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) .yith-par-message-inner-content {
	display: flex;
	width: auto;
	min-height: 24px;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	flex-wrap: wrap;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) .yith-par-message-inner-content :is(img, svg) {
	display: block;
	width: 17px !important;
	max-width: 17px !important;
	height: 24px !important;
	margin: 0 !important;
	object-fit: contain;
	flex: 0 0 auto;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) .yith-par-message-inner-content svg path {
	fill: var(--cigslt-product-ink) !important;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) strong {
	margin: 0 2px;
	color: var(--cigslt-product-ink);
	font-weight: 700;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) :is(.product_point, .product-point-conversion) {
	display: inline-block;
	padding: 1px 4px;
	color: var(--cigslt-product-ink);
	background: var(--cigslt-product-lime);
	font-family: var(--cigslt-product-mono);
	font-size: .92em;
	font-weight: 700;
	line-height: 1.4;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) .product-point-conversion :is(.amount, bdi, .woocommerce-Price-currencySymbol) {
	color: inherit !important;
	font: inherit;
}

body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation).hide {
	display: none !important;
}

body.single-product .summary.entry-summary:has(:is(.yith-par-message.yith-par-message-product, .yith-par-message-variation):not(.hide)) form.cart {
	margin-top: 10px;
}

@media (max-width: 991px) {
	body.single-product .ywdpd-table-discounts-wrapper {
		margin: 14px 0 10px;
	}

	body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation):not(.hide) {
		margin: 6px 4px 10px 0 !important;
	}
}

@media (max-width: 767px) {
	body.single-product .ywdpd-table-discounts-wrapper {
		margin: 12px 0 8px;
	}

	body.single-product .ywdpd-table-discounts-wrapper > .ywdpd-table-discounts-label {
		width: 100%;
		padding: 7px 9px;
	}

	body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-boxed {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-boxed.vertical {
		width: calc(100% - 5px) !important;
		grid-template-columns: minmax(0, 1fr);
	}

	body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item {
		min-height: 40px;
		padding: 8px 6px;
	}

	body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-units {
		font-size: 12px;
	}

	body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-price {
		font-size: 12px;
	}

	body.single-product .ywdpd-table-discounts-wrapper:has(> #ywdpd-quantity-table) {
		padding: 0 6px 7px 0;
		overflow-x: auto;
		overscroll-behavior-inline: contain;
		-webkit-overflow-scrolling: touch;
	}

	body.single-product .ywdpd-table-discounts-wrapper > #ywdpd-quantity-table {
		min-width: 480px;
	}

	body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) {
		display: block;
		width: calc(100% - 4px);
		max-width: calc(100% - 4px);
		margin: 4px 4px 8px 0 !important;
		padding: 8px 10px !important;
		font-size: 12px;
		line-height: 1.4;
	}

	body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation):has(> img, > svg) {
		min-height: 0;
		padding-left: 38px !important;
	}

	body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) > img {
		left: 10px;
		width: 15px !important;
		max-width: 15px !important;
		height: 20px;
	}

	body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) > svg {
		left: 10px;
		width: 18px;
		height: 18px;
	}

	body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) .yith-par-message-inner-content {
		min-height: 20px;
		gap: 7px;
	}

	body.single-product .type-product.product :is(.yith-par-message.yith-par-message-product, .yith-par-message-variation) .yith-par-message-inner-content :is(img, svg) {
		width: 15px !important;
		max-width: 15px !important;
		height: 20px !important;
	}

	body.single-product .summary.entry-summary:has(:is(.yith-par-message.yith-par-message-product, .yith-par-message-variation):not(.hide)) form.cart {
		margin-top: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.single-product .ywdpd-table-discounts-wrapper #ywdpd-quantity-boxed .ywdpd-boxed-item {
		transition: none !important;
	}
}
