/* Nic Shots Add-On – product page option. Scoped to .nsa-box so it won't fight the theme. */

.nsa-box {
	--nsa-accent: #7c3aed;
	--nsa-accent-soft: rgba(124, 58, 237, 0.08);
	--nsa-accent-glow: rgba(124, 58, 237, 0.28);
	--nsa-line: rgba(127, 127, 127, 0.28);
	--nsa-radius: 16px;

	box-sizing: border-box;
	flex: 0 0 100%;
	width: 100%;
	order: -1;
	margin: 0 0 18px;
	padding: 16px 18px 14px;
	border: 1px solid var(--nsa-line);
	border-radius: var(--nsa-radius);
	background:
		radial-gradient(120% 140% at 0% 0%, var(--nsa-accent-soft), transparent 60%),
		transparent;
	color: inherit;
	transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.nsa-box *,
.nsa-box *::before,
.nsa-box *::after {
	box-sizing: border-box;
}

/* Lights up once shots are added. */
.nsa-box.is-active {
	border-color: var(--nsa-accent);
	box-shadow: 0 0 0 4px var(--nsa-accent-soft), 0 10px 28px -12px var(--nsa-accent-glow);
}

.nsa-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.nsa-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: var(--nsa-accent);
	color: #fff;
	box-shadow: 0 6px 16px -6px var(--nsa-accent-glow);
}

.nsa-heading {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.25;
}

.nsa-title {
	margin: 0;
	padding: 0;
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
}

.nsa-sub {
	font-size: 0.86em;
	opacity: 0.72;
}

.nsa-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 22px;
}

/* Stepper */
.nsa-stepper {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	border: 1px solid var(--nsa-line);
	border-radius: 999px;
	background: rgba(127, 127, 127, 0.06);
}

.nsa-box .nsa-btn {
	display: none; /* Revealed once JS is ready, so the plain number field still works without it. */
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--nsa-accent);
	color: #fff;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.nsa-box.nsa-ready .nsa-btn {
	display: inline-flex;
}

.nsa-box .nsa-btn:hover:not(:disabled) {
	filter: brightness(1.1);
}

.nsa-box .nsa-btn:focus-visible {
	outline: 3px solid var(--nsa-accent-glow);
	outline-offset: 2px;
}

.nsa-box .nsa-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.nsa-box .nsa-input {
	width: 58px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: 1.25rem; /* 16px minimum stops iOS zooming on focus. */
	font-weight: 700;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.nsa-box .nsa-input::-webkit-outer-spin-button,
.nsa-box .nsa-input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.nsa-box .nsa-input:focus {
	outline: 2px solid var(--nsa-accent-glow);
	outline-offset: 0;
}

/* Summary */
.nsa-summary {
	flex: 1 1 180px;
	min-width: 0;
}

.nsa-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 3px 0;
	font-size: 0.93em;
}

.nsa-row > span {
	opacity: 0.75;
}

.nsa-row strong {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.nsa-multi {
	margin: 12px 0 0;
	font-size: 0.82em;
	opacity: 0.7;
}

[data-nsa-limit][hidden] {
	display: none !important;
}

.nsa-limit {
	margin: 10px 0 0;
	font-size: 0.85em;
	font-weight: 600;
	color: #d63638;
}

@media (max-width: 480px) {
	.nsa-box {
		padding: 14px;
	}
	.nsa-controls {
		flex-direction: column;
		align-items: stretch;
	}
	.nsa-stepper {
		align-self: flex-start;
	}
	/* In the stacked layout a flex-basis would become a height, so let the summary size itself. */
	.nsa-summary {
		flex: 0 0 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nsa-box,
	.nsa-box .nsa-btn {
		transition: none;
	}
}

/* Multi-buy offer banner on product pages. */
.nsa-deal {
	--nsa-deal-bg: #17318f;
	--nsa-deal-text: #ffb52e;

	box-sizing: border-box;
	width: 100%;
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: 6px;
	background: var(--nsa-deal-bg);
	color: var(--nsa-deal-text);
	font-weight: 600;
	line-height: 1.3;
}
