/* Gio Side Cart Enhancements */

.gio-sce-qty {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
	min-height: 34px;
}

.gio-sce-qty-label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	margin-right: 1px;
	opacity: 0.75;
}

.gio-sce-qty-btn,
.gio-sce-qty-input {
	box-sizing: border-box;
	height: 32px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1;
}

.gio-sce-qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	min-width: 32px;
	padding: 0;
	font-size: 20px;
	font-weight: 500;
	cursor: pointer;
	touch-action: manipulation;
}

.gio-sce-qty-btn:hover:not(:disabled),
.gio-sce-qty-btn:focus-visible {
	border-color: currentColor;
}

.gio-sce-qty-btn:disabled {
	cursor: default;
	opacity: 0.35;
}

.gio-sce-qty-input {
	width: 48px;
	min-width: 48px;
	padding: 0 4px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	-moz-appearance: textfield;
}

.gio-sce-qty-input::-webkit-outer-spin-button,
.gio-sce-qty-input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.gio-sce-qty-input:focus {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.gio-sce-qty-status {
	font-size: 11px;
	white-space: nowrap;
	opacity: 0.7;
}

.gio-sce-availability {
	flex-basis: 100%;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.25;
	opacity: 0.72;
}

.gio-sce-availability:empty {
	display: none;
}

.gio-sce-qty.is-updating {
	opacity: 0.72;
}

/* The add-on supplies a clearer interactive quantity display in standard list mode. */
.xoo-wsc-product:has(.gio-sce-qty) .xoo-wsc-sml-qty {
	display: none;
}

/* Gift card / coupon controls */
.gio-sce-code-box {
	width: 100%;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(0, 0, 0, 0.10);
}

.gio-sce-code-label {
	display: block;
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	text-align: left;
}

.gio-sce-code-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 6px;
}

.gio-sce-code-input,
.gio-sce-code-apply {
	height: 38px;
	box-sizing: border-box;
	border-radius: 4px;
	font: inherit;
}

.gio-sce-code-input {
	min-width: 0;
	width: 100%;
	padding: 0 10px;
	border: 1px solid rgba(0, 0, 0, 0.20);
	background: #fff;
	color: inherit;
	font-size: 14px;
}

.gio-sce-code-input:focus {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.gio-sce-code-apply {
	min-width: 72px;
	padding: 0 14px;
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.gio-sce-code-apply:disabled,
.gio-sce-code-remove:disabled {
	cursor: default;
	opacity: 0.5;
}

.gio-sce-code-status {
	min-height: 15px;
	margin-top: 4px;
	font-size: 11px;
	line-height: 1.3;
	text-align: left;
	opacity: 0.75;
}

.gio-sce-code-status.is-error {
	font-weight: 600;
}

.gio-sce-applied-codes {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 4px;
}

.gio-sce-code-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 100%;
	padding: 3px 5px 3px 8px;
	border: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: 999px;
	font-size: 11px;
	line-height: 1.2;
}

.gio-sce-code-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gio-sce-code-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}

/* Make the coupon-added rows read like normal totals rather than Side Cart's centered subtotal. */
.xoo-wsc-ft-amt-gio_sce_discount,
.xoo-wsc-ft-amt-gio_sce_total {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
}

.xoo-wsc-ft-amt-gio_sce_total {
	margin-top: 4px;
	font-weight: 700;
}

/* Undo-remove toast lives outside the fragment-replaced cart container. */
.gio-sce-undo-toast {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 1000001;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: min(360px, calc(100vw - 36px));
	padding: 11px 12px;
	border-radius: 6px;
	background: #222;
	color: #fff;
	box-shadow: 0 5px 22px rgba(0, 0, 0, 0.25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
	font-size: 13px;
}

.gio-sce-undo-toast.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.gio-sce-undo-toast.is-busy {
	opacity: 0.8;
}

.gio-sce-undo-btn {
	padding: 2px 0;
	border: 0;
	border-bottom: 1px solid currentColor;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

@media (max-width: 600px) {
	.gio-sce-qty {
		gap: 7px;
		margin-top: 9px;
	}

	.gio-sce-qty-btn,
	.gio-sce-qty-input {
		height: 36px;
	}

	.gio-sce-qty-btn {
		width: 36px;
		min-width: 36px;
	}

	.gio-sce-qty-input {
		width: 50px;
		min-width: 50px;
		font-size: 15px;
	}

	.gio-sce-code-input,
	.gio-sce-code-apply {
		height: 40px;
	}

	.gio-sce-undo-toast {
		left: 12px;
		right: 12px;
		bottom: 12px;
		max-width: none;
		justify-content: space-between;
	}
}
