/* Assiette Gourmande — quantites dans le mini-panier
   S'ajoute au panneau valide a l'etape 1B sans le modifier.
   Desactivable via l'option ag_feature_mini_cart_quantity. */

.ag-mini-cart-on .ct-header-cart .ct-cart-content .ag-qty {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin-top: 8px;
}

.ag-qty__reglage {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	border: 1px solid rgba(0, 0, 0, .16);
	border-radius: 0;
	overflow: hidden;
}

.ag-qty__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	flex: none;
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	border-radius: 0;
	color: #3A3D3A;
	font-family: inherit;
	font-size: 17px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.ag-qty__btn:hover:not([disabled]),
.ag-qty__btn:focus-visible:not([disabled]) {
	background: rgba(242, 144, 43, .12);
	color: var(--theme-palette-color-1, #F2902B);
}

.ag-qty__btn:focus-visible {
	outline: 2px solid var(--theme-palette-color-1, #F2902B);
	outline-offset: -2px;
}

.ag-qty__btn[disabled] {
	opacity: .3;
	cursor: default;
}

.ag-mini-cart-on .ct-header-cart .ct-cart-content .ag-qty__val {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	padding: 0 2px;
	color: #3A3D3A;
	font-size: 14px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ag-mini-cart-on .ct-header-cart .ct-cart-content .ag-qty__prix {
	color: #3A3D3A;
	font-size: 13px;
}

/* etat de chargement discret */
.ag-qty--occupe .ag-qty__reglage {
	opacity: .45;
	pointer-events: none;
}

.ag-qty--occupe .ag-qty__val {
	position: relative;
	color: transparent !important;
}

.ag-qty--occupe .ag-qty__val:after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border: 2px solid rgba(58, 61, 58, .25);
	border-top-color: var(--theme-palette-color-1, #F2902B);
	border-radius: 50%;
	animation: agQtyTourne .7s linear infinite;
}

@keyframes agQtyTourne {
	to { transform: rotate(360deg); }
}

/* message d'erreur, uniquement quand le serveur n'a pas repondu */
.ag-mini-cart-on .ct-header-cart .ct-cart-content .ag-qty__avis {
	flex: 1 0 100%;
	color: #96391A;
	font-size: 12px;
	line-height: 1.4;
}

.ag-mini-cart-on .ct-header-cart .ct-cart-content .ag-qty__avis a {
	color: #96391A;
	text-decoration: underline;
}

/* mobile : cibles plus grandes et plus espacees */
@media (max-width: 781px) {
	.ag-qty__btn {
		width: 44px;
		height: 44px;
		font-size: 19px;
	}

	.ag-mini-cart-on .ct-header-cart .ct-cart-content .ag-qty__val {
		min-width: 34px;
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ag-qty--occupe .ag-qty__val:after {
		animation: none;
	}
}
