/* Off-screen but readable: mirrors the visual loading/success states for
   screen readers. */
.wccw-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Container Wrapper */
.wc-custom-add-to-cart-wrapper {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
}

/* Quantity Box styling */
.wc-custom-quantity-selector {
	display: flex;
	align-items: stretch;
	box-sizing: border-box;
	overflow: hidden;
}

.wc-custom-quantity-selector .wccw-qty-btn {
	height: 100%;
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-sizing: border-box;
	outline: none;
	user-select: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.wc-custom-quantity-selector .wccw-qty-input {
	height: 100%;
	border: none;
	background: transparent;
	padding: 0;
	margin: 0;
	text-align: center;
	width: 100%;
	flex: 1;
	box-sizing: border-box;
	outline: none;
	-moz-appearance: textfield;
}

.wc-custom-quantity-selector .wccw-qty-input::-webkit-outer-spin-button,
.wc-custom-quantity-selector .wccw-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Button styling */
.add-to-cart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	box-sizing: border-box;
	border: none;
	outline: none;
	text-align: center;
}

.add-to-cart-btn .btn-content-wrapper {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	transition: opacity 0.2s ease;
}

.add-to-cart-btn .btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.add-to-cart-btn svg {
	width: 1em;
	height: 1em;
	display: inline-block;
}

/* Interactive States Loading / Success */
.add-to-cart-btn.is-loading .btn-content-wrapper {
	opacity: 0;
}

.add-to-cart-btn.is-loading .cart-btn-loader {
	display: flex;
}

.add-to-cart-btn.is-success .btn-content-wrapper {
	opacity: 0;
}

.add-to-cart-btn.is-success .cart-btn-success-checkmark {
	display: flex;
}

/* Spinner Loader */
.cart-btn-loader {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: none;
	align-items: center;
	justify-content: center;
}

.cart-btn-loader svg {
	animation: rotate 2s linear infinite;
	width: 24px;
	height: 24px;
}

.cart-btn-loader svg .path {
	stroke: currentColor;
	stroke-linecap: round;
	animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes dash {
	0% {
		stroke-dasharray: 1, 150;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -35;
	}
	100% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -124;
	}
}

/* Success Checkmark */
.cart-btn-success-checkmark {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: none;
	align-items: center;
	justify-content: center;
}

.cart-btn-success-checkmark svg {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: block;
	stroke-width: 4;
	stroke: currentColor;
	stroke-miterlimit: 10;
	box-shadow: inset 0px 0px 0px currentColor;
	animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.cart-btn-success-checkmark svg .checkmark-circle {
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	stroke-width: 4;
	stroke-miterlimit: 10;
	stroke: currentColor;
	fill: none;
	animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.cart-btn-success-checkmark svg .checkmark-check {
	transform-origin: 50% 50%;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	stroke-width: 4;
	stroke: #ffffff;
	animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
	100% {
		stroke-dashoffset: 0;
	}
}

@keyframes scale {
	0%, 100% {
		transform: none;
	}
	50% {
		transform: scale3d(1.1, 1.1, 1);
	}
}

@keyframes fill {
	100% {
		box-shadow: inset 0px 0px 0px 30px currentColor;
	}
}

/* Variations form & attributes select box styling defaults */
.variations_form.cart .variations {
	width: 100%;
	margin-bottom: 15px;
	border: none;
	border-collapse: collapse;
}

.variations_form.cart .variations td {
	padding: 8px 0;
	vertical-align: middle;
	background: transparent;
	border: none;
}

.variations_form.cart .variations td.label {
	width: 80px;
	font-weight: 600;
	color: #333;
}

.variations_form.cart .variations select {
	width: 100%;
	max-width: 300px;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fff;
	outline: none;
	font-size: 14px;
	color: #444;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.variations_form.cart .variations select:focus {
	border-color: #61ce70;
}

.variations_form.cart .single_variation_wrap {
	margin-top: 15px;
}

.variations_form.cart .woocommerce-variation-price {
	margin-bottom: 15px;
	font-size: 1.25em;
	font-weight: 700;
	color: #333;
}

.variations_form.cart .woocommerce-variation-description {
	margin-bottom: 15px;
	font-size: 14px;
	color: #666;
}

/* View Cart Link Styles and Positions */
.wccw-view-cart-inline .wc-custom-add-to-cart-wrapper {
	display: flex;
	flex-wrap: nowrap !important;
	align-items: center;
}
.wccw-view-cart-inline .wc-custom-add-to-cart-wrapper .added_to_cart {
	display: inline-flex !important;
	align-items: center !important;
	flex-basis: auto !important;
	order: 3 !important;
	white-space: nowrap !important;
}

.wccw-view-cart-below .wc-custom-add-to-cart-wrapper {
	display: flex;
	flex-wrap: wrap !important;
}
.wccw-view-cart-below .wc-custom-add-to-cart-wrapper .added_to_cart {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-basis: 100% !important;
	order: 4 !important;
	white-space: nowrap !important;
}

.wccw-view-cart-above .wc-custom-add-to-cart-wrapper {
	display: flex;
	flex-wrap: wrap !important;
}
.wccw-view-cart-above .wc-custom-add-to-cart-wrapper .added_to_cart {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-basis: 100% !important;
	order: -1 !important;
	white-space: nowrap !important;
}

/* Alignment Styles for Block Layouts */
.wccw-view-cart-align-left .added_to_cart {
	margin-right: auto !important;
	margin-left: 0 !important;
	text-align: left;
}
.wccw-view-cart-align-center .added_to_cart {
	margin-left: auto !important;
	margin-right: auto !important;
	text-align: center;
}
.wccw-view-cart-align-right .added_to_cart {
	margin-left: auto !important;
	margin-right: 0 !important;
	text-align: right;
}

