/*
 * Quotable single-product purchase row only.
 * BeTheme sets .column_product_cart_button .cart .button { width: 100% }.
 * That percentage is the wrap's width. After Add to Quote inserts View Quote
 * inside .drk-pdp-quote-wrap, the wrap's max-content becomes the button plus
 * the link, the button fills it, and form.cart wraps the quantity off the row.
 * The added label itself stays on the row. The resting Add to Quote state is
 * untouched (:has(.is-added)).
 */

body.drk-pdp.drk-quotable .mfn-product-add-to-cart form.cart .drk-pdp-quote-wrap:has(.is-added) {
	display: inline-grid;
	grid-template-columns: max-content;
	align-content: start;
	justify-items: start;
	width: max-content;
	max-width: 100%;
	flex: 0 0 auto;
}

body.drk-pdp.drk-quotable .mfn-product-add-to-cart form.cart .drk-add-to-quote-btn.is-added {
	width: auto;
	max-width: 100%;
	flex: 0 0 auto;
	grid-column: 1;
	grid-row: 1;
}

body.drk-pdp.drk-quotable .mfn-product-add-to-cart form.cart .drk-pdp-quote-wrap .drk-view-quote-link {
	grid-column: 1;
	grid-row: 2;
}

body.drk-pdp.drk-quotable .mfn-product-add-to-cart form.cart .drk-pdp-quote-wrap:has(.is-added) .drk-loop-quote-status:empty {
	display: none;
}

/*
 * At 390px the content-sized "✓ Added to Quote" button (20px side padding
 * from #Content .cart .button) is about 3px wider than the space beside the
 * quantity. Two pixels of side padding, added state only, keeps that label
 * on the quantity row. Text is not clipped. Desktop padding stays 20px.
 */
@media (max-width: 600px) {
	body.drk-pdp.drk-quotable .mfn-product-add-to-cart form.cart .drk-add-to-quote-btn.is-added {
		padding-left: 18px !important;
		padding-right: 18px !important;
	}
}
