/* Botones − / + del campo de cantidad (Bulk Variations). Variables editables desde el theme. */

.gedos-qty {
	--gedos-qty-btn-w: 30px;
	--gedos-qty-border: #ccc;
	--gedos-qty-bg: #f3f3f3;
	--gedos-qty-bg-hover: #e4e4e4;
	--gedos-qty-color: #222;

	display: flex;
	align-items: stretch;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

/* Botones: "all: unset" para ignorar el estilo de <button> del theme. */
.wc-bulk-variations-table .gedos-qty .gedos-qty__btn {
	all: unset;
	position: relative;
	display: block;
	flex: 0 0 var(--gedos-qty-btn-w);
	width: var(--gedos-qty-btn-w);
	box-sizing: border-box;
	border: 1px solid var(--gedos-qty-border);
	background: var(--gedos-qty-bg);
	color: var(--gedos-qty-color);
	cursor: pointer;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.wc-bulk-variations-table .gedos-qty .gedos-qty__btn:hover {
	background: var(--gedos-qty-bg-hover);
}

.wc-bulk-variations-table .gedos-qty .gedos-qty__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.wc-bulk-variations-table .gedos-qty .gedos-qty__btn--minus {
	border-radius: 4px 0 0 4px;
}

.wc-bulk-variations-table .gedos-qty .gedos-qty__btn--plus {
	border-radius: 0 4px 4px 0;
}

/* El − y el + se dibujan con pseudo-elementos, así no dependen de la tipografía del theme. */
.gedos-qty__btn::before,
.gedos-qty__btn::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
	transform: translate( -50%, -50% );
}

.gedos-qty__btn--plus::after {
	transform: translate( -50%, -50% ) rotate( 90deg );
}

.gedos-qty__btn--minus::after {
	display: none;
}

/* Campo numérico: sin flechitas nativas, centrado y pegado a los botones. */
.wc-bulk-variations-table .wcbvp-row .gedos-qty input.wcbvp-quantity[type="number"] {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0 !important;
	border-radius: 0;
	border-left-width: 0;
	border-right-width: 0;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.gedos-qty input.wcbvp-quantity[type="number"]::-webkit-outer-spin-button,
.gedos-qty input.wcbvp-quantity[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Campo deshabilitado (sin stock, etc.): botones apagados también. */
.gedos-qty:has( input:disabled ) .gedos-qty__btn {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}
