// Product Add To Cart.
.elementor-widget-woocommerce-product-add-to-cart {
	// Base Theme Widget Styles.
	&.vamtam-has-theme-widget-styles {
		form.cart {
			margin: 0;

			.reset_variations {
				padding-top: 0;
			}
			.variations {
				margin-bottom: 0;

				td.label {
					padding: 0;
					line-height: initial;
					width: 120px;
				}

				select {
					min-width: 60px;
					box-sizing: border-box;
					padding: 6px 20px;
					min-height: 47px;
					margin-right: 15px;
					position: relative;
					outline: 0;
					appearance: none;
					background: url(data:image/svg+xml,%3Csvg%20aria-hidden%3D%22true%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20320%20512%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M31.3%20192h257.3c17.8%200%2026.7%2021.5%2014.1%2034.1L174.1%20354.8c-7.8%207.8-20.5%207.8-28.3%200L17.2%20226.1C4.6%20213.5%2013.5%20192%2031.3%20192z%22%2F%3E%3C%2Fsvg%3E) no-repeat right 20px top 50%/12px!important;
				}
			}
			.vamtam-count-wrap {
				max-width: 100px;
			}
			#quantity {
				input.qty {
					max-width: 100%;
				}
			}
			div.quantity {
				margin: 0;
				input.qty {
					outline: none !important;
					width:100px;
					height:100%;
				}
			}
			.single_add_to_cart_button {

				&.loading:after {
					display: inline-block; // To clear inherited text-decoration (underline).
					position: relative;
					top: unset;
					right: unset;
					margin-left: 10px;
				}

				&.disabled,
				&.disabled:hover,
				&:disabled,
				&:disabled:hover,
				&:disabled[disabled],
				&:disabled[disabled]:hover {
					background-color: var( --vamtam-accent-color-1 );
					color: var( --vamtam-accent-color-1-hc );
					opacity: .5;
					pointer-events: none !important;
				}
			}
		}
		form.variations_form {
			table.variations {
				tr {
					border: 0;
				}
			}
			.woocommerce-variation-price {
				&:not(:first-child) {
					margin-top: 10px;
				}
			}
		}

		.elementor-editor-active & {
			.product form.variations_form {
				.single_variation {
					display: none;
				}
			}
		}

		.woocommerce-variation-price {
			font-family: var(--vamtam-h5-font-family); /* This is a good option to be able to align with the Product Price widget without the code.  https://www.dropbox.com/s/vvco4bq5c7ldl1q/Screenshot%202021-05-28%20at%2020.41.19.png?dl=0 */
			.price {
				color: inherit;
				font-family: var( --e-global-typography-750dc32-font-family), Sans-serif;
				font-size: var( --e-global-typography-750dc32-font-size);
				font-weight: var( --e-global-typography-750dc32-font-weight);
				line-height: var( --e-global-typography-750dc32-line-height);
				letter-spacing: var( --e-global-typography-750dc32-letter-spacing);
				word-spacing: var( --e-global-typography-750dc32-word-spacing);

				ins .woocommerce-Price-amount.amount {
					font-family: var( --e-global-typography-750dc32-font-family), Sans-serif;
					font-size: var( --e-global-typography-750dc32-font-size);
					font-weight: var( --e-global-typography-750dc32-font-weight);
					line-height: var( --e-global-typography-750dc32-line-height);
					letter-spacing: var( --e-global-typography-750dc32-letter-spacing);
					word-spacing: var( --e-global-typography-750dc32-word-spacing);
				}
			}
		}

		:is(
			.price .woocommerce-Price-amount.amount,
			div.product p.price ins
		) {
			color: var(--vamtam-accent-color-1);
		}

		.added_to_cart {
			text-align: center;
		}
		&.elementor-add-to-cart--align-justify {
			.added_to_cart {
				flex-basis: 100%;
			}
		}

		// Variation styles for radio buttons.
		table.variations {
			td.label {
				display: none;
			}
			td.value {
				display: flex;
				align-items: center;
				gap: 10px;
				flex-wrap: wrap;
				margin-bottom: 10px;

				> div {
					@rwidth: 16px;
					display: flex;
					align-items: center;
					justify-content: center;
					padding: 10px 15px 10px calc(@rwidth + 15px);
					border: 1px solid var(--vamtam-accent-color-1);
					white-space: nowrap;

					label {
						padding-left: 6px;
					}

					// Radio button.
					input[type="radio"] {
						&:checked,
						&:not(:checked) {
							position: absolute;
							opacity: 0;
						}
						&:checked + label,
						&:not(:checked) + label {
							cursor: pointer;
							position: relative;
							display: inline-block;
							color: var(--vamtam-accent-color-1);
						}
						&:checked + label,
						&:not(:checked) + label {
							&::before, &::after {
								content: '';
								position: absolute;
								left: -@rwidth;
								top: calc(50% - calc(@rwidth / 2));
								width: @rwidth;
								height: @rwidth;
								border-radius: 50%;
							}
							&::before {
								border: 1px solid var(--vamtam-accent-color-1);
								background: white;
							}
							&::after {
								transform-origin: center;
								background: var(--vamtam-accent-color-1);
								transition: all 0.2s ease;
							}
						}
						&:not(:checked) + label:after {
							opacity: 0;
							transform: scale(0);
						}
						&:checked + label:after {
							opacity: 1;
							transform: scale(.5);
						}
					}
				}
			}
			.reset_variations {
				display: none !important;
			}
		}
		.vamtam-variation-price {
			margin-bottom: 15px;
		}
		.single_variation_wrap {
			.woocommerce-variation-price {
				display: none;
			}
		}

		.elementor-add-to-cart.elementor-product-simple {
			position: relative;
			width: calc(100% - 90px);
		}

		.woocommerce-variation-add-to-cart {
			position: relative;
			width: calc(100% - 90px);
		}

		.cart {
			.added_to_cart.wc-forward {
				display: none;
			}
		}

		.single-product .sold-individually &,
		.stock.last-one ~ .cart {
			.single_add_to_cart_button.button[type="submit"] {
				margin-left: 0;
			}
		}
	}
}
