/*
 * atc.css — 0.2.6 (mobile audit 2026-10-25, item 17), product pages only, loaded with atc.js. Kept out of pdp.css,
 * whose rules are scoped under [data-avl-sf="pdp"]: these style Rey's form, the sticky bar and the header count.
 * The chosen colour and capacity looked like the others (capacity ring 1px grey, colour ring transparent), and
 * «إضافة إلى السلة» showed nothing for the 3–6 s before the side cart opened.
 * Specificity is deliberate: the Customizer's swatch rules are `.single-product …` with !important.
 */

body.single-product form.variations_form .rey-swatchList.--type-color .rey-swatchList-item.--selected {
	box-shadow: 0 0 0 2px #16C344 !important;
}

body.single-product form.variations_form .rey-swatchList.--type-button .rey-swatchList-item {
	min-height: 36px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
}

body.single-product form.variations_form .rey-swatchList.--type-button .rey-swatchList-item.--selected {
	box-shadow: inset 0 0 0 2px #16C344 !important;
	background: #effbf2 !important;
	color: #0a0a0a !important;
	font-weight: 700;
}

body.single-product form.variations_form .rey-swatchList.--type-button .rey-swatchList-item.--selected .rey-swatchList-itemContent {
	color: inherit !important;
	font-weight: inherit;
}

/* Busy state, set by assets/js/atc.js between Rey's adding_to_cart and added_to_cart. */
body.single-product .single_add_to_cart_button[data-avs-busy],
body.single-product .avloon-atc-bar__btn[data-avs-busy] {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

body.single-product .single_add_to_cart_button[data-avs-busy] > *,
body.single-product .avloon-atc-bar__btn[data-avs-busy] > * {
	visibility: hidden;
}

body.single-product .single_add_to_cart_button[data-avs-busy]::after,
body.single-product .avloon-atc-bar__btn[data-avs-busy]::after {
	content: attr(data-avs-busy);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--avs-atc-ink, #fff);
	font: inherit;
	visibility: visible;
	opacity: 1;
	margin: 0;
	transform: none;
	background: none;
	border: 0;
	width: auto;
	height: auto;
	animation: none;
}

body.single-product .single_add_to_cart_button[data-avs-busy]::before,
body.single-product .avloon-atc-bar__btn[data-avs-busy]::before {
	content: "";
	position: absolute;
	top: 50%;
	inset-inline-start: 16px;
	width: 14px;
	height: 14px;
	margin: -9px 0 0;
	border: 2px solid var(--avs-atc-ink, #fff);
	border-right-color: transparent;
	border-radius: 50%;
	animation: avs-atc-spin .7s linear infinite;
	visibility: visible;
	opacity: 1;
}

@keyframes avs-atc-spin {
	to {
		transform: rotate(360deg);
	}
}

/* The header count goes up at once (atc.js); a short pop draws the eye to it. */
.rey-headerCart-wrapper.avs-atc-bump .rey-headerIcon-counter {
	animation: avs-atc-bump .45s ease-out;
}

@keyframes avs-atc-bump {
	40% {
		transform: scale(1.45);
	}
}

@media (prefers-reduced-motion: reduce) {
	body.single-product .single_add_to_cart_button[data-avs-busy]::before,
	body.single-product .avloon-atc-bar__btn[data-avs-busy]::before,
	.rey-headerCart-wrapper.avs-atc-bump .rey-headerIcon-counter {
		animation: none;
	}
}
