/**
 * Novin Smart Assessment — service order panel.
 *
 * Every rule is scoped under .nsa-so. This renders inside somebody's Elementor
 * page, so an unscoped selector here would restyle their layout — and the brief
 * for this panel is explicitly that the page's own design is not touched.
 *
 * Same navy/cyan language as the rest of the product, institutional rather than
 * promotional: this is a form somebody fills in with their real documents, and
 * it should look like the company takes that seriously.
 */

.nsa-so {
	--nsa-so-navy: #07365f;
	--nsa-so-cyan: #128aa5;
	--nsa-so-text: #16202b;
	--nsa-so-muted: #6b7785;
	--nsa-so-border: #e3e8ee;
	--nsa-so-surface: #ffffff;
	--nsa-so-canvas: #f7f9fb;
	--nsa-so-danger: #b4232a;
	--nsa-so-ok: #04735c;
	--nsa-so-radius: 14px;

	direction: rtl;
	max-width: 860px;
	margin: 40px auto;
	padding: 26px;
	border: 1px solid var(--nsa-so-border);
	border-top: 3px solid var(--nsa-so-cyan);
	border-radius: var(--nsa-so-radius);
	background: var(--nsa-so-surface);
	box-shadow: 0 2px 10px rgba(16, 24, 40, .05);
	color: var(--nsa-so-text);
	font-size: 15px;
	line-height: 2;
	text-align: start;
}

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

.nsa-so :focus-visible {
	outline: 2px solid var(--nsa-so-cyan);
	outline-offset: 2px;
	border-radius: 6px;
}

.nsa-so__head { margin-bottom: 20px; }

.nsa-so__title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.7;
	color: var(--nsa-so-navy);
}

.nsa-so__intro {
	margin: 0;
	color: var(--nsa-so-muted);
	font-size: .95rem;
}

/* ------------------------------------------------------------- fields */

.nsa-so__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
	margin-bottom: 14px;
}

.nsa-so__field { min-width: 0; }

.nsa-so__field--wide { grid-column: 1 / -1; }

.nsa-so__label {
	display: block;
	margin-bottom: 5px;
	font-size: .9rem;
	font-weight: 700;
	color: var(--nsa-so-text);
}

.nsa-so__req {
	color: var(--nsa-so-danger);
	margin-inline-start: 3px;
}

.nsa-so__input,
.nsa-so__file {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--nsa-so-border);
	border-radius: 10px;
	background: var(--nsa-so-canvas);
	color: var(--nsa-so-text);
	font: inherit;
	font-size: .95rem;
	line-height: 1.9;
}

.nsa-so__input:focus,
.nsa-so__file:focus {
	border-color: var(--nsa-so-cyan);
	background: #fff;
}

textarea.nsa-so__input {
	resize: vertical;
	min-height: 96px;
}

.nsa-so__file { padding: 9px 12px; }

.nsa-so__set {
	margin: 0;
	padding: 0;
	border: 0;
}

.nsa-so__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.nsa-so__option {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	border: 1px solid var(--nsa-so-border);
	border-radius: 999px;
	background: var(--nsa-so-canvas);
	font-size: .9rem;
	cursor: pointer;
}

.nsa-so__option:hover { border-color: var(--nsa-so-cyan); }

.nsa-so__option input { margin: 0; accent-color: var(--nsa-so-cyan); }

.nsa-so__hint {
	margin: 5px 0 0;
	font-size: .8rem;
	line-height: 1.8;
	color: var(--nsa-so-muted);
}

/* Errors sit under the input they belong to, not in a summary at the top. */
.nsa-so__error {
	margin: 5px 0 0;
	font-size: .82rem;
	color: var(--nsa-so-danger);
}

.nsa-so__field.is-invalid .nsa-so__input,
.nsa-so__field.is-invalid .nsa-so__file {
	border-color: var(--nsa-so-danger);
	background: #fdf7f7;
}

/* ------------------------------------------------------------ actions */

.nsa-so__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--nsa-so-border);
}

.nsa-so__submit {
	padding: 12px 30px;
	border: 0;
	border-radius: 10px;
	background: var(--nsa-so-navy);
	color: #fff;
	font: inherit;
	font-size: .98rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .16s ease, opacity .16s ease;
}

.nsa-so__submit:hover:not([disabled]) { background: var(--nsa-so-cyan); }

.nsa-so__submit[disabled] {
	opacity: .55;
	cursor: progress;
}

.nsa-so__note {
	flex: 1;
	min-width: 220px;
	margin: 0;
	font-size: .8rem;
	line-height: 1.8;
	color: var(--nsa-so-muted);
}

/* The honeypot. Off-screen rather than display:none, which bots skip. */
.nsa-so__hp {
	position: absolute;
	inset-inline-start: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------------------------------------------------------- feedback */

.nsa-so__feedback {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 14px;
	padding: 12px 14px;
	border: 1px solid #f0d8d8;
	border-radius: 10px;
	background: #fdf6f6;
	color: var(--nsa-so-danger);
	font-size: .9rem;
}

.nsa-so__feedback button {
	padding: 6px 14px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .85rem;
	cursor: pointer;
}

.nsa-so__success {
	padding: 22px;
	border: 1px solid #cbe8df;
	border-radius: var(--nsa-so-radius);
	background: #f2fbf8;
}

.nsa-so__success h3 {
	margin: 0 0 8px;
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--nsa-so-ok);
}

.nsa-so__number {
	display: inline-block;
	margin: 6px 0 12px;
	padding: 7px 16px;
	border-radius: 8px;
	background: #fff;
	border: 1px dashed var(--nsa-so-ok);
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: .04em;
	direction: ltr;
}

.nsa-so__summary {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .9rem;
}

.nsa-so__summary li {
	display: flex;
	gap: 8px;
	padding: 5px 0;
	border-bottom: 1px dashed #d9ece6;
}

.nsa-so__summary li:last-child { border-bottom: 0; }

.nsa-so__summary b {
	flex: 0 0 40%;
	max-width: 40%;
	color: var(--nsa-so-muted);
	font-weight: 600;
}

/* --------------------------------------------------- editor-only notice */

/*
 * Shown to somebody who can edit the page and to nobody else. A visitor sees
 * nothing at all rather than a box about a registry key.
 */
.nsa-so-notice {
	max-width: 860px;
	margin: 24px auto;
	padding: 14px 16px;
	border: 1px dashed #b45309;
	border-radius: 10px;
	background: #fffaf3;
	color: #7c3d06;
	font-size: .9rem;
	line-height: 1.9;
	direction: rtl;
	text-align: start;
}

/* ---------------------------------------------------------------- CTA */

.nsa-so-jump {
	display: inline-block;
	padding: 11px 26px;
	border-radius: 10px;
	background: var(--nsa-so-cyan, #128aa5);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: background .16s ease;
}

.nsa-so-jump:hover,
.nsa-so-jump:focus {
	background: #0f7690;
	color: #fff;
}

/* ------------------------------------------------------------ mobile */

@media (max-width: 600px) {
	.nsa-so {
		margin: 26px auto;
		padding: 18px;
		border-radius: 12px;
	}

	.nsa-so__grid { grid-template-columns: 1fr; }

	.nsa-so__submit { width: 100%; }

	.nsa-so__summary li { flex-direction: column; gap: 2px; }
	.nsa-so__summary b { flex: none; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
	.nsa-so__submit,
	.nsa-so-jump { transition: none; }
}
