/**
 * FoodMaster additions on WooCommerce pages.
 *
 * Only what the plugin itself injects into WooCommerce templates: the
 * comments field and quantity stepper on the single product form, the
 * extras list in order review, the delivery date line, and the block
 * checkout notes the plugin adds. Everything else on those pages belongs to
 * the active theme. Depends on css/foodmaster-tokens.css.
 */

/* Single product form: the plugin's comments field and stepper */
.woocommerce div.product form.cart .foodmaster_additional_comments {
	display: block;
	width: 100%;
	min-height: calc(var(--fm-m) * 9);
	margin: calc(var(--fm-m) * 2) 0;
	padding: calc(var(--fm-m) * 1.25) calc(var(--fm-m) * 1.5);
	background: var(--fm-paper);
	border: 1.5px solid var(--fm-black);
	border-radius: var(--fm-radius);
	color: var(--fm-black);
	font-family: var(--fm-font-body);
	font-size: 15px;
	line-height: 1.4;
	resize: vertical;
}

.woocommerce div.product form.cart .foodmaster_additional_comments:focus {
	outline: none;
	box-shadow: var(--fm-focus);
}

.woocommerce div.product form.cart .modern-quantity-wrapper {
	display: inline-grid;
	grid-template-columns: calc(var(--fm-m) * 6) calc(var(--fm-m) * 7) calc(var(--fm-m) * 6);
	height: calc(var(--fm-m) * 7);
	border: 1.5px solid var(--fm-black);
	border-radius: var(--fm-radius);
	overflow: hidden;
	background: var(--fm-paper);
}

.woocommerce div.product form.cart .modern-quantity-wrapper .qty-btn {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	color: var(--fm-black);
	font-size: 0;
	cursor: pointer;
}

.woocommerce div.product form.cart .modern-quantity-wrapper .qty-btn::before,
.woocommerce div.product form.cart .modern-quantity-wrapper .qty-btn.qty-plus::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 2px;
	background: currentColor;
	transform: translate(-50%, -50%);
}

.woocommerce div.product form.cart .modern-quantity-wrapper .qty-btn.qty-plus::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.woocommerce div.product form.cart .modern-quantity-wrapper .qty-btn:hover {
	background: var(--fm-black);
	color: var(--fm-paper);
}

.woocommerce div.product form.cart .modern-quantity-wrapper input.qty {
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-left: 1.5px solid var(--fm-black);
	border-right: 1.5px solid var(--fm-black);
	border-radius: 0;
	color: var(--fm-black);
	font-family: var(--fm-font-display);
	font-weight: var(--fm-display-weight);
	font-size: 18px;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.woocommerce div.product form.cart .modern-quantity-wrapper input.qty::-webkit-inner-spin-button,
.woocommerce div.product form.cart .modern-quantity-wrapper input.qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.woocommerce div.product form.cart .modern-quantity-wrapper + input.qty {
	display: none;
}

/* Extras under a line item in order review, cart and the thank-you page */
.woocommerce-checkout-review-order-table .variation,
.woocommerce table.shop_table .variation,
.woocommerce-order .variation,
.wc-block-components-product-details {
	margin: 4px 0 0;
	padding: 0;
	font-size: 13px;
	color: var(--fm-n6);
}

.woocommerce-checkout-review-order-table .variation dt,
.woocommerce table.shop_table .variation dt,
.woocommerce-order .variation dt {
	display: inline;
	margin: 0;
	font-weight: 600;
	color: var(--fm-n7);
}

.woocommerce-checkout-review-order-table .variation dd,
.woocommerce table.shop_table .variation dd,
.woocommerce-order .variation dd {
	display: inline;
	margin: 0 var(--fm-m) 0 0;
}

.woocommerce-checkout-review-order-table .variation dd p,
.woocommerce table.shop_table .variation dd p {
	display: inline;
	margin: 0;
}

/* Delivery date line */
.delivery_date_text,
span.delivery_date_text {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: calc(0.02em * var(--fm-tracking));
	color: var(--fm-n7);
}
