// Load any mixin methods used in our wooCommerce design.
@import "woocommerce/mixins";

.palette-primary {
	&.woocommerce,
	&.woocommerce-page {

		/* Product Archive Styles */
		@import "woocommerce/products";

		/* Quantity Inputs */
		div.product form.cart,
		div.product p.cart {
			margin: 2em 0;
			display: flex;
			flex-wrap: wrap;
			align-items: center;
		}
		.input-group {
			&.quantity {
				display: flex;
				flex: 1 0;
				.qty.text {
					width: 50px;
					text-align: center;
					-moz-appearance:textfield; /* FireFox textfield appearence for number input */
					&::-webkit-inner-spin-button,
					&::-webkit-outer-spin-button {
						-webkit-appearance: none; /* Chrome textfield appearence for number input */
						-moz-appearance: none;
						appearance: none;
						margin: 0;
					}
				}
			}
		}
		.input-group-btn {
			width: auto;
			& > .btn {
				border: 1px solid transparent;
				padding: 11px;
				font-size: 14px;
				line-height: 1;
				height: 34px;
			}
		}
		/* Grouped Products */
		div.product.product-type-grouped {
			form.cart {
				display: block;
				.group_table > tbody {
					float: left;
				}
			}
		}
		/* Checkout */
		&.woocommerce-checkout {
			.btn.button-primary {
				margin: 0;
			}
		}
		/* Cart */
		.cart {
			@media only screen and ( max-width: 768px ) {
				&.shop_table.shop_table_responsive {
					.input-group.quantity {
						display: flex;
						justify-content: flex-end;
					}
				}
				tr.cart_item td.product-quantity {
					display: flex;
					align-items: center;
				}
			}
			.input-group.quantity {
				display: flex;
				float: none;
			}
			.coupon.form-inline {
				display: flex;
				align-items: center;
				input.form-control {
					margin-right: 8px;
					@media only screen and ( max-width: 768px ) {
						margin-right: 14px;
					}
				}
			}
		}
		@media only screen and ( max-width: 768px ) {
			#add_payment_method,
			&.woocommerce-cart,
			&.woocommerce-checkout {
				input[name="update_cart"] {
					width: 100%;
				}
			}
		}
		&.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
			display: flex;
			justify-content: center;
			align-items: center;
			height: auto;
			padding: calc( 1.25em / 2 ); /* Based on font-size increase in wooCommerce styles */
		}
		/* PayPal Link Alignment */
		#payment .payment_method_paypal .about_paypal {
			margin-left: 1em;
		}
		/* WooCommerce Widgets */

		/**
		 * Layered nav seems to be off, so the close icon is cut off.  Adjusting
		 * padding by 1px seems to get everything looking right.
		 */
		.widget_layered_nav_filters ul {
			padding: 1px;
		}

		/* Shopping Cart Widgets */
		.widget_shopping_cart {
			.button-primary {
				display: inline-block;
			}
		}

		/* Product Search */
		@media only screen and ( min-width: 768px ) {
			#searchform.woocommerce-product-search .form-group {
				display: inline-block;
			}
		}
	}
}

.palette-primary {
	#add_payment_method,
	.woocommerce-cart,
	.woocommerce-checkout {
		#payment {
			background: transparent;
			border-radius: 0;
			ul.payment_methods {
				border-bottom: 0;
			}
		}
	}
	.widget_layered_nav_filters ul {
		padding: 1px;
	}
	@import "woocommerce/titles";
	@import "woocommerce/pagination";
	@import "woocommerce/buttons";
	@import "woocommerce/dashboard-navigation";
	@import "woocommerce/edit-account";
	@import "woocommerce/breadcrumbs";
	@import "woocommerce/payment-methods";
	@import "woocommerce/tables";
	@import "woocommerce/login";
	@import "woocommerce/forms";
	@import "woocommerce/alerts";
	@import "woocommerce/coupons";
	@import "woocommerce/terms-and-conditions";
	@import "woocommerce/checkout-login-toggle";
}
