/*
 * Newsletters Sign Up Connector — preference-centre styles.
 * Scoped under .nsc-prefs; tokens mirror the signup form for a consistent look.
 */

.nsc-prefs {
	--nsc-navy: #16264b;
	--nsc-navy-dark: #0f1c3a;
	--nsc-text: #1f2937;
	--nsc-muted: #6b7280;
	--nsc-border: #e6e8ee;
	--nsc-banner: #eef0f7;
	--nsc-accent: var(--nsc-navy);
	--nsc-ring: rgba(22, 38, 75, 0.35);
	--nsc-success: #1a7f47;
	--nsc-error: #c0392b;
	--nsc-radius: 14px;
	--nsc-radius-sm: 10px;

	max-width: 620px;
	margin: 0 auto;
	color: var(--nsc-text);
	font-family: inherit;
	line-height: 1.5;
	box-sizing: border-box;
}

.nsc-prefs *,
.nsc-prefs *::before,
.nsc-prefs *::after {
	box-sizing: inherit;
}

.nsc-prefs__head {
	text-align: center;
	margin-bottom: 1.5rem;
}

.nsc-prefs__title {
	margin: 0 0 0.5rem;
	color: var(--nsc-navy);
	font-size: clamp(1.4rem, 3vw, 2rem);
	font-weight: 800;
	line-height: 1.15;
}

.nsc-prefs__subtitle {
	margin: 0 auto;
	max-width: 42rem;
	color: var(--nsc-muted);
}

/* Email field (request view) */
.nsc-prefs__field {
	margin-bottom: 1rem;
}

.nsc-prefs__field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.nsc-prefs__field input {
	width: 100%;
	padding: 0.8rem 0.9rem;
	font-size: 1rem;
	border: 1px solid var(--nsc-border);
	border-radius: var(--nsc-radius-sm);
	background: #fff;
	color: var(--nsc-text);
}

/* Honeypot */
.nsc-prefs__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.nsc-prefs__turnstile {
	margin-bottom: 1rem;
}

/* Editor list */
.nsc-prefs__editor-intro {
	color: var(--nsc-muted);
	margin: 0 0 1rem;
}

.nsc-prefs__list {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nsc-prefs__item {
	border: 1px solid var(--nsc-border);
	border-radius: var(--nsc-radius-sm);
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nsc-prefs__item:has(.nsc-prefs__check:checked) {
	border-color: var(--nsc-accent);
	box-shadow: 0 0 0 1px var(--nsc-accent) inset;
}

.nsc-prefs__row {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.85rem 1rem;
	cursor: pointer;
}

.nsc-prefs__check {
	width: 20px;
	height: 20px;
	accent-color: var(--nsc-accent);
	flex: none;
}

.nsc-prefs__meta {
	display: flex;
	flex-direction: column;
}

.nsc-prefs__brand {
	font-weight: 800;
	color: var(--nsc-accent);
}

.nsc-prefs__cat {
	font-size: 0.9rem;
	color: var(--nsc-muted);
}

/* Submit (shared by both views) */
.nsc-prefs__submit {
	display: block;
	width: 100%;
	padding: 0.95rem 1.25rem;
	background: var(--nsc-navy);
	color: #fff;
	border: 0;
	border-radius: var(--nsc-radius);
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}

.nsc-prefs__submit:hover {
	background: var(--nsc-navy-dark);
}

.nsc-prefs__submit[disabled] {
	opacity: 0.65;
	cursor: progress;
}

/* Status */
.nsc-prefs__status {
	margin: 0.9rem 0 0;
	text-align: center;
	font-weight: 600;
	min-height: 1.2em;
}

.nsc-prefs__status.is-success {
	color: var(--nsc-success);
}

.nsc-prefs__status.is-error {
	color: var(--nsc-error);
}

.nsc-prefs :is(input, button, a):focus-visible {
	outline: 3px solid var(--nsc-ring);
	outline-offset: 2px;
	border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
	.nsc-prefs__item,
	.nsc-prefs__submit {
		transition: none;
	}
}
