/**
 * Diba Smart Design Studio — public consultation form.
 *
 * Scoped to .dss-form-wrap so it never depends on, or leaks into, the
 * active theme or other plugins.
 */

.dss-form-wrap {
	--dss-form-ink: #17212b;
	--dss-form-muted: #5c6a76;
	--dss-form-gold: #e5ad24;
	--dss-form-gold-dark: #b9850d;
	--dss-form-cream: #f7f5f0;
	--dss-form-paper: #ffffff;
	--dss-form-line: #e2e5e8;
	--dss-form-ok: #1f7a4d;
	--dss-form-ok-bg: #e8f6ee;
	--dss-form-err: #a3282f;
	--dss-form-err-bg: #fdecec;

	box-sizing: border-box;
	direction: rtl;
	text-align: right;
	color: var(--dss-form-ink);
	font-family: Vazirmatn, Tahoma, "Segoe UI", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.8;
	max-width: 860px;
	margin: 0 auto;
	padding: 28px;
	background: var(--dss-form-paper);
	border: 1px solid var(--dss-form-line);
	border-radius: 22px;
	box-shadow: 0 18px 50px rgba(23, 33, 43, 0.08);
}

.dss-form-wrap *,
.dss-form-wrap *::before,
.dss-form-wrap *::after {
	box-sizing: border-box;
}

.dss-form-head {
	margin: 0 0 22px;
}

.dss-form-eyebrow {
	margin: 0 0 6px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--dss-form-gold-dark);
}

.dss-form-title {
	margin: 0 0 8px;
	font-size: clamp(1.35rem, 2.4vw, 1.85rem);
	line-height: 1.4;
	color: var(--dss-form-ink);
}

.dss-form-intro {
	margin: 0;
	color: var(--dss-form-muted);
	font-size: 0.95rem;
}

/* Notices --------------------------------------------------------------- */
.dss-form-notice {
	margin: 0 0 22px;
	padding: 16px 18px;
	border-radius: 14px;
	border: 1px solid transparent;
}

.dss-form-notice p {
	margin: 6px 0 0;
}

.dss-form-notice--success {
	background: var(--dss-form-ok-bg);
	border-color: #bfe4cf;
	color: #145c37;
}

.dss-form-notice--error {
	background: var(--dss-form-err-bg);
	border-color: #f2c4c7;
	color: var(--dss-form-err);
}

.dss-form-ref {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid #bfe4cf;
	font-weight: 700;
	letter-spacing: 0.04em;
}

/* Form ------------------------------------------------------------------ */
.dss-form {
	margin: 0;
}

.dss-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dss-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px 18px;
}

.dss-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.dss-field--full {
	grid-column: 1 / -1;
}

.dss-field label {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--dss-form-ink);
}

.dss-req {
	color: var(--dss-form-err);
}

.dss-opt {
	font-weight: 400;
	font-size: 0.78rem;
	color: var(--dss-form-muted);
}

.dss-field input,
.dss-field select,
.dss-field textarea {
	width: 100%;
	max-width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--dss-form-line);
	border-radius: 11px;
	background: #fbfbfa;
	color: var(--dss-form-ink);
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.6;
	transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.dss-field textarea {
	resize: vertical;
	min-height: 120px;
}

.dss-field input::placeholder,
.dss-field textarea::placeholder {
	color: #9aa4ad;
}

.dss-field input:focus,
.dss-field select:focus,
.dss-field textarea:focus,
.dss-consent input:focus-visible {
	outline: none;
	border-color: var(--dss-form-gold);
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(229, 173, 36, 0.22);
}

.dss-field input:invalid:not(:placeholder-shown) {
	border-color: #e0aeb1;
}

.dss-hint {
	margin: 0;
	font-size: 0.76rem;
	color: var(--dss-form-muted);
}

/* Consent --------------------------------------------------------------- */
.dss-consent {
	margin: 20px 0 0;
	padding: 14px 16px;
	background: var(--dss-form-cream);
	border: 1px solid var(--dss-form-line);
	border-radius: 12px;
}

.dss-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 0.88rem;
	line-height: 1.7;
}

.dss-consent input {
	width: 18px;
	height: 18px;
	margin-top: 4px;
	accent-color: var(--dss-form-gold-dark);
	flex: 0 0 auto;
}

.dss-consent a {
	color: var(--dss-form-gold-dark);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Actions --------------------------------------------------------------- */
.dss-form-actions {
	margin: 20px 0 0;
	display: flex;
	justify-content: flex-start;
}

.dss-form-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 28px;
	border: 0;
	border-radius: 999px;
	background: var(--dss-form-ink);
	color: #ffffff;
	font: inherit;
	font-size: 0.96rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.dss-form-submit:hover {
	background: #253544;
}

.dss-form-submit:focus-visible {
	outline: 3px solid var(--dss-form-gold);
	outline-offset: 3px;
}

.dss-form-submit[disabled] {
	cursor: wait;
	opacity: 0.7;
}

/* Privacy notice -------------------------------------------------------- */
.dss-privacy-notice {
	margin: 22px 0 0;
	padding: 16px 18px;
	background: var(--dss-form-cream);
	border: 1px dashed #d7d0c2;
	border-radius: 12px;
	font-size: 0.82rem;
	color: var(--dss-form-muted);
}

.dss-privacy-notice strong {
	display: block;
	margin-bottom: 4px;
	color: var(--dss-form-ink);
}

.dss-privacy-notice p {
	margin: 0;
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 640px) {
	.dss-form-wrap {
		padding: 20px 16px;
		border-radius: 16px;
	}

	.dss-form-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.dss-form-submit {
		width: 100%;
	}
}
