/**
 * P2M4 dynamic product form styles. Self-contained; matches the NPS theme's
 * clean, professional look. Small radii (~2px), no floating soft cards.
 */
.nps-product-form {
	--nps-ink: #0f1b2d;
	--nps-muted: #5b6675;
	--nps-line: #d7dce3;
	--nps-accent: #1f5fa8;
	--nps-accent-ink: #14406f;
	--nps-bg-alt: #f5f7fa;
	--nps-req: #b3261e;
	max-width: 760px;
	margin: 0 auto;
	padding: 8px 0 64px;
	color: var(--nps-ink);
	font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.nps-product-form__title {
	font-size: 1.9rem;
	line-height: 1.15;
	margin: 0 0 4px;
}
.nps-section {
	border: 1px solid var(--nps-line);
	border-radius: 3px;
	padding: 20px 22px;
	margin: 18px 0;
	background: #fff;
}
.nps-section__title {
	font-size: 1.15rem;
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--nps-line);
	color: var(--nps-accent-ink);
}
.nps-q { margin: 0 0 18px; }
.nps-q:last-child { margin-bottom: 0; }
.nps-q__label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}
.nps-q__help {
	margin: 0 0 8px;
	font-size: 0.86rem;
	color: var(--nps-muted);
}
.nps-q .req { color: var(--nps-req); font-weight: 700; }

.nps-product-form input[type="text"],
.nps-product-form input[type="email"],
.nps-product-form input[type="tel"],
.nps-product-form input[type="number"],
.nps-product-form input[type="date"],
.nps-product-form select,
.nps-product-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 9px 11px;
	border: 1px solid var(--nps-line);
	border-radius: 2px;
	font: inherit;
	color: var(--nps-ink);
	background: #fff;
}
.nps-product-form textarea { resize: vertical; min-height: 72px; }
.nps-product-form input:not([type="radio"]):not([type="checkbox"]):focus,
.nps-product-form select:focus,
.nps-product-form textarea:focus {
	outline: 2px solid transparent; /* invisible normally; a visible system color in forced-colors mode */
	outline-offset: 2px;
	border-color: var(--nps-accent);
	box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.15);
}
/* Screen-reader-only text (the "(required)" appended to a checkbox/radio group label,
   because aria-required is not honored on role="group"). Off-screen but readable,
   unlike display:none. */
.nps-req-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* Radios and checkboxes keep a real, full-opacity focus outline for keyboard users. The
   border-color + faint 15% box-shadow above is invisible on a native radio/checkbox and is
   dropped entirely in Windows High Contrast / forced-colors mode, so they are excluded from
   the rule above (which restores their native ring) and given an explicit accent outline. */
.nps-product-form input[type="radio"]:focus-visible,
.nps-product-form input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--nps-accent);
	outline-offset: 2px;
}
/* File-upload dropzone: the real <input type=file> is positioned off-screen, so a
   keyboard user tabbing onto it would see no focus ring. Show the ring on the visible
   tile when its hidden sibling input has focus. */
.file-upload:has( ~ input[type="file"]:focus ),
.file-upload:has( ~ input[type="file"]:focus-visible ) {
	outline: 2px solid var(--nps-accent);
	outline-offset: 2px;
}

.nps-choicegroup { display: flex; flex-direction: column; gap: 8px; }
.nps-choice {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-weight: 400;
	padding: 8px 11px;
	border: 1px solid var(--nps-line);
	border-radius: 2px;
	cursor: pointer;
}
.nps-choice { transition: border-color .12s ease, background .12s ease, box-shadow .12s ease; }
.nps-choice:hover { background: var(--nps-bg-alt); border-color: var(--nps-accent); }
/* Keyboard focus lights up the whole tile (the input keeps its own focus ring too). */
.nps-choice:focus-within { border-color: var(--nps-accent); box-shadow: 0 0 0 2px rgba(31,95,168,.25); }
/* Selected choice lights up like a tile picker: click-to-choose, VistaPrint feel. */
.nps-choice:has( input:checked ) {
	border-color: var(--nps-accent);
	background: #eaf1fa;
	box-shadow: inset 0 0 0 1px var(--nps-accent);
}
.nps-choice input { margin-top: 3px; }

.nps-address { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nps-address__part span { display: block; font-size: 0.8rem; color: var(--nps-muted); margin-bottom: 3px; }
.nps-address__part:first-child { grid-column: 1 / -1; }

.nps-repeat__row { display: flex; gap: 8px; margin-bottom: 8px; }
.nps-repeat__add, .nps-continue, .nps-submit {
	font: inherit;
	cursor: pointer;
	border-radius: 2px;
}
.nps-repeat__add {
	background: none;
	border: 1px dashed var(--nps-line);
	color: var(--nps-accent-ink);
	padding: 7px 12px;
}
.nps-repeat__remove { border: 1px solid var(--nps-line); background: #fff; border-radius: 2px; cursor: pointer; padding: 0 10px; }
.nps-repeat__add[disabled] { opacity: .5; cursor: not-allowed; }
.nps-repeat__max { color: var(--nps-muted, #5b6b78); font-size: 13px; margin: 6px 0 0; }

.nps-notsure {
	background: var(--nps-bg-alt);
	border: 1px solid var(--nps-line);
	border-radius: 3px;
	padding: 14px 18px;
	margin: 16px 0;
}
.nps-notsure__toggle { font-weight: 600; display: flex; align-items: center; gap: 9px; }
.nps-notsure__hint { margin: 6px 0 0 27px; font-size: 0.86rem; color: var(--nps-muted); }

.nps-section__nav { margin-top: 16px; display: flex; gap: 10px; align-items: center; }
/* Previous: a solid secondary button, the same height as the CTA. */
.nps-back {
	background: #fff;
	border: 1px solid var(--nps-accent);
	color: var(--nps-accent-ink);
	padding: 12px 24px;
	font: inherit;
	font-weight: 700;
	font-size: 1.02rem;
	border-radius: 2px;
	cursor: pointer;
}
.nps-back:hover { background: var(--nps-bg-alt); }
.nps-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 22px; }
/* Short choice sets on one line (desktop); stacked again on phones below. */
.nps-choicegroup--inline { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.nps-choicegroup--inline .nps-choice { flex: 0 1 auto; padding-right: 18px; }
.nps-steps { display: flex; align-items: center; gap: 14px; margin: 14px 0 18px; font-size: 0.9rem; font-weight: 600; color: var(--nps-muted); }
.nps-steps__label { white-space: nowrap; }
.nps-steps__bar { flex: 1; height: 6px; background: #e3e8ee; border-radius: 3px; overflow: hidden; }
.nps-steps__fill { display: block; height: 100%; width: 0; background: var(--nps-accent); transition: width 0.25s ease; }
@media (max-width: 560px) { .nps-steps { flex-direction: column; align-items: stretch; gap: 6px; } .nps-steps__label { white-space: normal; } .nps-steps__bar { flex: none; height: 6px; } }
.nps-continue {
	background: var(--nps-bg-alt);
	border: 1px solid var(--nps-accent);
	color: var(--nps-accent-ink);
	padding: 9px 20px;
	font-weight: 600;
}
.nps-submit-row { margin-top: 22px; text-align: right; }
.nps-submit {
	background: var(--nps-accent);
	border: 1px solid var(--nps-accent-ink);
	color: #fff;
	padding: 12px 30px;
	font-weight: 700;
	font-size: 1.02rem;
}
.nps-submit:hover { background: var(--nps-accent-ink); }

.nps-contact .nps-q__label { font-weight: 600; }

.nps-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
/* Outranks the form's base text-input rule (which is 100% wide), so this holds. */
.nps-product-form .nps-num input[type="text"] { width: 30%; min-width: 130px; }

@media (max-width: 560px) {
	.nps-row { grid-template-columns: 1fr; gap: 0; }
	.nps-product-form .nps-num input[type="text"] { width: 50%; }
	.nps-product-form { padding-left: 4px; padding-right: 4px; }
	.nps-section { padding: 16px; }
	.nps-address { grid-template-columns: 1fr; }
	.nps-actions { flex-direction: column-reverse; align-items: stretch; }
	.nps-submit, .nps-back { width: 100%; }
	.nps-choicegroup--inline { flex-direction: column; gap: 8px; }
	.nps-choicegroup--inline .nps-choice { padding-right: 11px; }
}

/* Problems: banner above the button, highlight on the question the server or the client named. */
.nps-form-error {
	background: #fdf2f2;
	border: 1px solid #e7b3ae;
	border-left: 4px solid var(--nps-req);
	color: #7a1c14;
	padding: 12px 14px;
	border-radius: 2px;
	margin: 18px 0 0;
	font-weight: 600;
}
.nps-form-error:focus { outline: 2px solid var(--nps-req); outline-offset: 2px; }
.nps-q--problem {
	padding: 10px 12px;
	margin-left: -12px;
	margin-right: -12px;
	border-left: 3px solid var(--nps-req);
	background: #fdf6f5;
}
.nps-q--problem input, .nps-q--problem select, .nps-q--problem textarea { border-color: var(--nps-req); }
.nps-submit[disabled] { opacity: 0.65; cursor: wait; }

/* Success state (replaces the form once the server issues a reference). */
.nps-form-success {
	max-width: 760px;
	margin: 24px auto 64px;
	padding: 34px 28px;
	border: 1px solid #d7dce3;
	border-radius: 3px;
	background: #fff;
	text-align: center;
	color: #0f1b2d;
	font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.nps-form-success__check {
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #1a7f37;
	color: #fff;
	font-size: 30px;
	line-height: 56px;
}
.nps-form-success h2 { margin: 0 0 10px; font-size: 1.6rem; }
.nps-form-success p { margin: 0 auto 12px; max-width: 560px; }
.nps-form-success__refline { font-size: 1.05rem; }
.nps-form-success__ref { color: #14406f; }
.nps-form-success__note { font-size: 0.9rem; color: #5b6675; }
.nps-form-success__home {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 22px;
	border: 1px solid #1f5fa8;
	border-radius: 2px;
	color: #14406f;
	text-decoration: none;
	font-weight: 600;
}

/* Validation display (FORM-DESIGN.md rule 3): red bold label, red border, the
   reason under the field. The summary box uses the site's .error-summary. */
.nps-product-form .error-summary { margin: 14px 0 18px; }
.nps-product-form .error-summary[hidden] { display: none; }
.nps-q.is-invalid > .nps-q__label { color: #B00020; font-weight: 700; }
.nps-q.is-invalid input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.nps-q.is-invalid select,
.nps-q.is-invalid textarea { border-color: #B00020; border-width: 2px; background: #FFF7F7; }
.nps-q.is-invalid .nps-choicegroup,
.nps-q.is-invalid .nps-address,
.nps-q.is-invalid .nps-repeat,
.nps-q.is-invalid input[type="file"] { border: 2px solid #B00020; border-radius: 3px; padding: 10px; background: #FFF7F7; }
.nps-q .field-error { display: block; color: #B00020; font-weight: 600; font-size: 13.5px; line-height: 1.45; margin-top: 6px; }
.nps-form-error[hidden] { display: none; }

/* Per-file upload list: name and size, its own Uploaded / Failed state, Remove, Try again. */
.nps-files { list-style: none; margin: 10px 0 0; padding: 0; }
.nps-files[hidden] { display: none; }
.nps-files li {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	border: 1px solid var(--nps-line);
	border-radius: 2px;
	padding: 8px 12px;
	margin-bottom: 6px;
	background: #fff;
	font-size: 0.92rem;
}
.nps-files li[data-status="failed"],
.nps-files li[data-status="unsupported"] { border-color: #B00020; background: #FFF7F7; }
.nps-files__name { flex: 1 1 auto; min-width: 160px; word-break: break-all; }
.nps-files__state { font-weight: 700; white-space: nowrap; }
.nps-files__state--done { color: #1a7f37; }
.nps-files__state--failed,
.nps-files__state--unsupported { color: #B00020; }
.nps-files__state--uploading { color: var(--nps-muted); }
.nps-files__remove, .nps-files__retry {
	font: inherit;
	font-size: 0.88rem;
	cursor: pointer;
	border: 1px solid var(--nps-line);
	background: #fff;
	border-radius: 2px;
	padding: 3px 10px;
}
.nps-files__retry { border-color: var(--nps-accent); color: var(--nps-accent-ink); font-weight: 600; }
.nps-files__why { flex-basis: 100%; color: #7a1c14; font-size: 0.85rem; }

