/* =========================================================================
   استایل عمومی فرم درخواست نمایندگی ایکستروژن
   طراحی مینیمال با تاکید بر خوانایی، فاصله‌گذاری تمیز و باکس‌های جذاب
   ========================================================================= */

.xrf-form-wrapper {
	--xrf-red: #ec1d23;
	--xrf-red-dark: #c8181d;
	--xrf-red-soft: rgba(236, 29, 35, 0.07);
	--xrf-ink: #1c1c1e;
	--xrf-text: #3a3a3d;
	--xrf-muted: #8a8a8e;
	--xrf-line: #e9e9ec;
	--xrf-surface: #ffffff;
	--xrf-surface-soft: #fbfbfc;

	max-width: 720px;
	margin: 32px auto;
	direction: rtl;
	text-align: right;
	font-family: inherit;
	width: 100%;
	box-sizing: border-box;
	overflow-x: hidden;
	color: var(--xrf-text);
}

.xrf-form-wrapper *,
.xrf-form-wrapper *::before,
.xrf-form-wrapper *::after {
	box-sizing: border-box;
	max-width: 100%;
}

.xrf-intro-section {
	max-width: 720px;
	margin: 0 auto 28px auto;
	line-height: 1.9;
	direction: rtl;
	text-align: right;
}

/* پیام‌های وضعیت */
.xrf-alert {
	padding: 16px 20px;
	border-radius: 12px;
	margin-bottom: 22px;
	font-size: 14.5px;
	line-height: 1.8;
}

.xrf-alert-success {
	background-color: #eefaf1;
	color: #1e7e34;
	border: 1px solid #cdedd6;
}

.xrf-alert-error {
	background-color: #fdf1f0;
	color: #b71c1c;
	border: 1px solid #f6d3d1;
}

/* =========================================================================
   کارت‌های بخش (fieldset) — مینیمال ولی با عمق ملایم
   ========================================================================= */

.xrf-fieldset {
	border: 1px solid var(--xrf-line);
	border-radius: 16px;
	padding: 28px 28px 26px;
	margin: 0 0 22px;
	background: var(--xrf-surface);
	box-shadow: 0 1px 2px rgba(20, 20, 25, 0.03), 0 10px 24px -18px rgba(20, 20, 25, 0.12);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.xrf-fieldset:focus-within {
	border-color: rgba(236, 29, 35, 0.28);
	box-shadow: 0 1px 2px rgba(20, 20, 25, 0.03), 0 12px 28px -16px rgba(236, 29, 35, 0.18);
}

.xrf-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* هدر هر بخش: آیکن دایره‌ای + عنوان کوچک بالا + تیتر اصلی */
.xrf-section-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 18px;
	margin-bottom: 22px;
	border-bottom: 1px solid var(--xrf-line);
}

.xrf-section-icon {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(155deg, var(--xrf-red), var(--xrf-red-dark));
	color: #fff;
	box-shadow: 0 6px 14px -6px rgba(236, 29, 35, 0.55);
}

.xrf-section-icon svg {
	width: 22px;
	height: 22px;
}

.xrf-section-icon-captcha {
	background: linear-gradient(155deg, #2b2b30, #17171a);
	box-shadow: 0 6px 14px -6px rgba(20, 20, 25, 0.45);
}

.xrf-section-heading {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.xrf-section-eyebrow {
	font-size: 12px;
	font-weight: 600;
	color: var(--xrf-red);
	letter-spacing: 0.2px;
}

.xrf-section-title {
	margin: 0;
	font-size: 17.5px;
	font-weight: 700;
	color: var(--xrf-ink);
	line-height: 1.5;
}

.xrf-section-hint {
	font-size: 13.5px;
	color: var(--xrf-muted);
	margin: -10px 0 18px;
	line-height: 1.8;
}

/* =========================================================================
   فیلدها
   ========================================================================= */

.xrf-field {
	margin-bottom: 20px;
}

.xrf-field:last-child {
	margin-bottom: 0;
}

.xrf-field-row {
	display: flex;
	gap: 16px;
	margin-bottom: 0;
}

.xrf-field-row .xrf-field {
	flex: 1;
	min-width: 0;
}

.xrf-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 14px;
	color: var(--xrf-ink);
}

.xrf-required {
	color: var(--xrf-red);
}

.xrf-optional {
	color: var(--xrf-muted);
	font-weight: 400;
	font-size: 12.5px;
}

.xrf-field input[type="text"],
.xrf-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 16px;
	border: 1.5px solid var(--xrf-line);
	border-radius: 10px;
	font-size: 14.5px;
	direction: rtl;
	background: var(--xrf-surface-soft);
	color: var(--xrf-ink);
	transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
	font-family: inherit;
}

.xrf-field input[type="text"]::placeholder,
.xrf-field textarea::placeholder {
	color: #b7b7bc;
}

.xrf-field input[type="text"]:hover,
.xrf-field textarea:hover {
	border-color: #d5d5da;
}

.xrf-field input[type="text"]:focus,
.xrf-field textarea:focus {
	outline: none;
	background: var(--xrf-surface);
	border-color: var(--xrf-red);
	box-shadow: 0 0 0 4px rgba(236, 29, 35, 0.1);
}

.xrf-field input.xrf-input-error,
.xrf-field textarea.xrf-input-error {
	border-color: #e0554f;
	background-color: #fff8f7;
}

.xrf-field-error {
	display: block;
	color: #d32f2f;
	font-size: 12.5px;
	margin-top: 6px;
	min-height: 15px;
}

.xrf-field-hint {
	font-size: 12.5px;
	color: var(--xrf-muted);
	margin: 7px 0 0 0;
	line-height: 1.7;
}

/* فیلدهای چندمقداری (شماره تماس / صفحات مجازی) */
.xrf-repeatable-items {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.xrf-repeatable-item {
	display: flex;
	gap: 8px;
	align-items: center;
}

.xrf-repeatable-item input {
	flex: 1;
	min-width: 0;
}

.xrf-btn-remove-item {
	background: #fdf1f0;
	color: #b71c1c;
	border: 1.5px solid #f6d3d1;
	border-radius: 8px;
	padding: 9px 13px;
	cursor: pointer;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.xrf-btn-remove-item:hover {
	background: #fbe4e2;
	border-color: #f0bcb8;
}

.xrf-btn-add-item {
	margin-top: 12px;
	background: transparent;
	border: 1.5px dashed rgba(236, 29, 35, 0.45);
	color: var(--xrf-red);
	border-radius: 8px;
	padding: 9px 15px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}

.xrf-btn-add-item:hover {
	background: var(--xrf-red-soft);
	border-color: var(--xrf-red);
}

/* =========================================================================
   بخش سابقه فعالیت
   ========================================================================= */

.xrf-activity-item {
	border: 1.5px solid var(--xrf-line);
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 10px;
	background: var(--xrf-surface-soft);
	transition: border-color 0.18s ease, background-color 0.18s ease;
}

.xrf-activity-item:last-child {
	margin-bottom: 0;
}

.xrf-activity-item:has(.xrf-activity-checkbox:checked) {
	border-color: rgba(236, 29, 35, 0.35);
	background: var(--xrf-red-soft);
}

.xrf-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 14px;
	color: var(--xrf-ink);
	cursor: pointer;
	margin-bottom: 0;
}

.xrf-checkbox-label input[type="checkbox"] {
	width: 19px;
	height: 19px;
	cursor: pointer;
	accent-color: var(--xrf-red);
	flex-shrink: 0;
}

.xrf-activity-description {
	margin-top: 14px;
	margin-right: 0;
	padding: 16px;
	background: var(--xrf-surface);
	border: 1px solid var(--xrf-line);
	border-radius: 10px;
}

.xrf-activity-description label {
	font-weight: 400;
	font-size: 13.5px;
	color: var(--xrf-text);
	line-height: 1.8;
}

/* =========================================================================
   بخش کپچای ریاضی
   ========================================================================= */

.xrf-captcha-fieldset {
	background: var(--xrf-surface);
}

.xrf-captcha-question {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--xrf-surface-soft);
	border: 1.5px dashed rgba(236, 29, 35, 0.5);
	border-radius: 9px;
	padding: 8px 20px;
	margin: 10px 0 14px;
	font-size: 17px;
	font-weight: 700;
	color: var(--xrf-ink);
	letter-spacing: 1px;
}

/* Honeypot - کاملاً مخفی از دید کاربر واقعی اما در دسترس ربات‌های خودکار */
/* توجه: عمداً از افست منفی بزرگ (مثل left:-9999px) استفاده نشده چون باعث بزرگ شدن عرض قابل‌اسکرول صفحه در موبایل می‌شود */
.xrf-honeypot-field {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* =========================================================================
   بخش پایانی و دکمه ثبت
   ========================================================================= */

.xrf-closing-section {
	text-align: center;
	margin-top: 30px;
}

.xrf-closing-text {
	font-size: 14.5px;
	color: var(--xrf-muted);
	margin-bottom: 20px;
	line-height: 1.9;
}

.xrf-submit-btn {
	background: linear-gradient(135deg, var(--xrf-red), var(--xrf-red-dark));
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 15px 46px;
	font-size: 15.5px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 8px 20px -6px rgba(236, 29, 35, 0.45);
}

.xrf-submit-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px -6px rgba(236, 29, 35, 0.5);
}

.xrf-submit-btn:active {
	transform: translateY(0);
}

.xrf-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.xrf-btn-loader {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: xrf-spin 0.7s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}

@keyframes xrf-spin {
	to {
		transform: rotate(360deg);
	}
}

/* =========================================================================
   واکنش‌گرا برای موبایل
   ========================================================================= */

@media (max-width: 600px) {
	.xrf-form-wrapper {
		margin: 18px auto;
		padding: 0 10px;
	}

	.xrf-fieldset {
		padding: 20px 18px;
		border-radius: 14px;
	}

	.xrf-section-icon {
		width: 38px;
		height: 38px;
		border-radius: 10px;
	}

	.xrf-section-icon svg {
		width: 20px;
		height: 20px;
	}

	.xrf-section-title {
		font-size: 16px;
	}

	.xrf-repeatable-item {
		flex-wrap: wrap;
	}

	.xrf-field-row {
		flex-direction: column;
		gap: 0;
	}
}
