/**
 * SAMPA Cotação — shared quantity stepper (frontend + admin).
 */

.sampa-qty-stepper {
	display: inline-flex;
	align-items: stretch;
	flex: 0 0 auto;
	border: 1px solid var(--sampa-border, #e2e8f0);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	max-width: 100%;
}

.sampa-qty-stepper__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	min-width: 45px;
	padding: 0;
	border: none;
	background: #f8fafc;
	color: #334155;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.sampa-qty-stepper__btn:hover:not(:disabled),
.sampa-qty-stepper__btn:focus-visible:not(:disabled) {
	background: #eef2ff;
	color: #4338ca;
}

.sampa-qty-stepper__btn:disabled {
	cursor: default;
	opacity: 0.55;
}

.sampa-qty-stepper__input {
	width: 52px;
	min-width: 52px;
	padding: 6px 4px;
	border: none;
	border-left: 1px solid var(--sampa-border, #e2e8f0);
	border-right: 1px solid var(--sampa-border, #e2e8f0);
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	background: #fff;
	-moz-appearance: textfield;
}

.sampa-qty-stepper__input::-webkit-outer-spin-button,
.sampa-qty-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.sampa-qty-stepper__input:read-only {
	background: #f8fafc;
	cursor: default;
}

.sampa-qty-stepper__input.sampa-field-quantity--invalid,
.sampa-qty-stepper.is-invalid .sampa-qty-stepper__input {
	border-color: #fca5a5;
	background: #fef2f2;
	color: #b91c1c;
}

.sampa-qty-stepper.is-readonly {
	opacity: 0.95;
}

.sampa-field--quantity .sampa-qty-stepper {
	width: 100%;
	max-width: 180px;
}

.sampa-catalog-quote-action .sampa-qty-stepper {
	flex: 0 0 auto;
}

.sampa-catalog-quote-action {
	display: flex;
	align-items: stretch;
	gap: 8px;
	width: 100%;
	min-width: 0;
}

.sampa-catalog-quote-action .sampa-client-quote-from-catalog {
	flex: 1 1 auto;
	min-width: 0;
}

.sampa-client-item-card__actions-primary {
	display: block;
}

.sampa-client-item-card__actions-primary .sampa-catalog-quote-action {
	width: 100%;
}

.sampa-client-items-list__actions .sampa-catalog-quote-action {
	flex: 1 1 220px;
	min-width: min(100%, 220px);
}

.sampa-client-item-detail__actions .sampa-catalog-quote-action {
	flex: 1 1 100%;
	max-width: 360px;
	margin-right: auto;
}

.sampa-catalog-quote-cart__item-qty .sampa-qty-stepper {
	margin-top: 4px;
}

.sampa-catalog-quote-cart__item-qty-label {
	display: block;
	font-size: 12px;
	color: #64748b;
	margin-bottom: 2px;
}


@media (max-width: 799px) {

	.sampa-qty-stepper {
		display: flex;
		margin: auto;
	}

	.sampa-catalog-quote-action {
		display: grid;
	}

	.sampa-qty-stepper__btn {
		width: 24%;
		min-width: 24%;
	}

	.sampa-qty-stepper__input {
		width: 50%;
		min-width: 50%;
		font-size: 13px;
	}
}