/*
 * فرم ارزیابی تغذیه باردیچ — استایل اصلی.
 * موبایل‌اول، راست‌به‌چپ، بر اساس هویت بصری باردیچ (سبز/نارنجی/کرم).
 */

.bardich-nf-wrapper {
	--bnf-primary: #8DC63F;
	--bnf-primary-dark: #6FA82E;
	--bnf-accent: #E87040;
	--bnf-cream: #FBF6EC;
	--bnf-text: #2E3A23;
	--bnf-muted: #8A8A78;
	--bnf-border: #E7E1D2;
	--bnf-error: #D6483B;
	--bnf-success: #4C8B3B;

	position: relative;
	max-width: 760px;
	margin: 0 auto;
	padding: 8px;
	font-family: 'Vazirmatn', Tahoma, sans-serif;
	color: var(--bnf-text);
	direction: rtl;
	overflow: hidden;
	box-sizing: border-box;
}

.bardich-nf-wrapper * {
	box-sizing: border-box;
}

/* --- المان‌های تصویری ارگانیک (برگ/قلب) --- */

.bardich-nf-shape {
	position: absolute;
	pointer-events: none;
	z-index: 0;
	opacity: 0.5;
}

.bardich-nf-shape--leaf-1 {
	top: -30px;
	right: -30px;
	width: 130px;
	height: 130px;
	background: var(--bnf-primary);
	border-radius: 70% 30% 65% 35% / 60% 40% 60% 40%;
	opacity: 0.16;
}

.bardich-nf-shape--leaf-2 {
	bottom: -40px;
	left: -40px;
	width: 160px;
	height: 160px;
	background: var(--bnf-primary-dark);
	border-radius: 40% 60% 35% 65% / 55% 45% 55% 45%;
	opacity: 0.12;
}

.bardich-nf-shape--heart {
	top: 18px;
	left: 12px;
	width: 22px;
	height: 22px;
	background: var(--bnf-accent);
	opacity: 0.6;
	clip-path: path('M11 20s-9-5.5-9-12A5 5 0 0 1 11 5a5 5 0 0 1 9 3c0 6.5-9 12-9 12z');
}

.bardich-nf-shape--dot {
	bottom: 60px;
	right: 24px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--bnf-accent);
	opacity: 0.4;
}

/* --- کارت فرم --- */

.bardich-nf-form,
.bardich-nf-success {
	position: relative;
	z-index: 1;
	background: #ffffff;
	border-radius: 22px;
	padding: 28px 22px;
	box-shadow: 0 10px 30px rgba(46, 58, 35, 0.08);
	background-color: var(--bnf-cream);
}

.bardich-nf-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* --- هدر --- */

.bardich-nf-header {
	text-align: center;
	margin-bottom: 20px;
}

.bardich-nf-logo {
	max-height: 56px;
	margin-bottom: 10px;
}

.bardich-nf-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 8px;
	color: var(--bnf-text);
}

.bardich-nf-subtitle {
	font-size: 14px;
	color: var(--bnf-muted);
	margin: 0;
	line-height: 1.9;
}

/* --- نوار مراحل (progress) --- */

.bardich-nf-progress {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	position: relative;
}

.bardich-nf-progress::before {
	content: '';
	position: absolute;
	top: 15px;
	right: 5%;
	left: 5%;
	height: 2px;
	background: var(--bnf-border);
	z-index: 0;
}

.bardich-nf-progress__item {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 6px;
}

.bardich-nf-progress__circle {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #ffffff;
	border: 2px solid var(--bnf-border);
	color: var(--bnf-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	transition: all 0.3s ease;
}

.bardich-nf-progress__label {
	font-size: 11px;
	color: var(--bnf-muted);
	max-width: 70px;
	line-height: 1.4;
}

.bardich-nf-progress__item.is-active .bardich-nf-progress__circle {
	background: var(--bnf-primary);
	border-color: var(--bnf-primary);
	color: #ffffff;
	box-shadow: 0 0 0 4px rgba(141, 198, 63, 0.2);
}

.bardich-nf-progress__item.is-active .bardich-nf-progress__label {
	color: var(--bnf-text);
	font-weight: 600;
}

.bardich-nf-progress__item.is-done .bardich-nf-progress__circle {
	background: var(--bnf-accent);
	border-color: var(--bnf-accent);
	color: #ffffff;
}

.bardich-nf-progress__item.is-done .bardich-nf-progress__circle::after {
	content: '✓';
}

.bardich-nf-progress__item.is-done .bardich-nf-progress__circle > span {
	display: none;
}

/* --- پیام خطا/موفقیت --- */

.bardich-nf-message {
	background: #FDECEA;
	color: var(--bnf-error);
	border: 1px solid #F4C7C2;
	border-radius: 12px;
	padding: 12px 16px;
	font-size: 13px;
	margin-bottom: 18px;
}

/* --- مراحل و انیمیشن --- */

.bardich-nf-steps {
	position: relative;
}

.bardich-nf-step {
	display: none;
	animation: bardichNfFadeSlide 0.4s ease;
}

.bardich-nf-step.is-active {
	display: block;
}

@keyframes bardichNfFadeSlide {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.bardich-nf-step__title {
	font-size: 17px;
	font-weight: 700;
	color: var(--bnf-primary-dark);
	margin: 0 0 6px;
}

.bardich-nf-step__subtitle {
	font-size: 13px;
	color: var(--bnf-muted);
	margin: 0 0 20px;
	line-height: 1.8;
}

/* --- گرید فیلدها --- */

.bardich-nf-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-bottom: 22px;
}

@media (min-width: 640px) {
	.bardich-nf-grid {
		grid-template-columns: 1fr 1fr;
	}

	.bardich-nf-field--full,
	.bardich-nf-field--checkbox_group,
	.bardich-nf-field--radio {
		grid-column: 1 / -1;
	}
}

.bardich-nf-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bardich-nf-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--bnf-text);
}

.bardich-nf-required {
	color: var(--bnf-error);
	margin-right: 3px;
}

.bardich-nf-input,
.bardich-nf-textarea {
	width: 100%;
	border: 1px solid var(--bnf-border);
	border-radius: 12px;
	padding: 11px 14px;
	font-family: inherit;
	font-size: 14px;
	background: #ffffff;
	color: var(--bnf-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bardich-nf-textarea {
	resize: vertical;
	min-height: 78px;
}

.bardich-nf-input:focus,
.bardich-nf-textarea:focus {
	outline: none;
	border-color: var(--bnf-primary);
	box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.18);
}

.bardich-nf-field.is-invalid .bardich-nf-input,
.bardich-nf-field.is-invalid .bardich-nf-textarea,
.bardich-nf-field.is-invalid .bardich-nf-radio-group {
	border-color: var(--bnf-error);
}

/* --- رادیو و چک‌باکس --- */

.bardich-nf-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	border: 1px solid transparent;
	border-radius: 12px;
	padding: 2px;
}

.bardich-nf-radio,
.bardich-nf-checkbox {
	display: flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--bnf-border);
	border-radius: 10px;
	padding: 9px 14px;
	font-size: 13px;
	background: #ffffff;
	cursor: pointer;
	transition: all 0.2s ease;
}

.bardich-nf-radio:hover,
.bardich-nf-checkbox:hover {
	border-color: var(--bnf-primary);
}

.bardich-nf-radio input,
.bardich-nf-checkbox input {
	accent-color: var(--bnf-primary);
	width: 16px;
	height: 16px;
}

.bardich-nf-radio:has(input:checked),
.bardich-nf-checkbox:has(input:checked),
.bardich-nf-radio.is-checked,
.bardich-nf-checkbox.is-checked {
	border-color: var(--bnf-primary);
	background: rgba(141, 198, 63, 0.1);
	color: var(--bnf-primary-dark);
	font-weight: 600;
}

.bardich-nf-checkbox-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
}

@media (min-width: 480px) {
	.bardich-nf-checkbox-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* --- دکمه‌ها --- */

.bardich-nf-actions {
	display: flex;
	flex-direction: row-reverse;
	gap: 12px;
	align-items: center;
}

.bardich-nf-btn {
	appearance: none;
	border: none;
	border-radius: 30px;
	padding: 13px 28px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.bardich-nf-btn--primary {
	background: var(--bnf-primary);
	color: #ffffff;
	box-shadow: 0 6px 16px rgba(141, 198, 63, 0.35);
}

.bardich-nf-btn--primary:hover {
	background: var(--bnf-primary-dark);
	transform: translateY(-1px);
}

.bardich-nf-btn--primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.bardich-nf-btn--outline {
	background: transparent;
	color: var(--bnf-muted);
	border: 1px solid var(--bnf-border);
}

.bardich-nf-btn--outline:hover {
	border-color: var(--bnf-accent);
	color: var(--bnf-accent);
}

/* --- پیام موفقیت پایانی --- */

.bardich-nf-success {
	display: none;
	text-align: center;
	padding: 46px 24px;
	animation: bardichNfFadeSlide 0.5s ease;
}

.bardich-nf-success__icon {
	font-size: 42px;
	display: block;
	margin-bottom: 12px;
}

.bardich-nf-success__title {
	color: var(--bnf-primary-dark);
	font-size: 20px;
	margin: 0 0 10px;
}

.bardich-nf-success__message {
	color: var(--bnf-text);
	font-size: 14px;
	line-height: 1.9;
	max-width: 460px;
	margin: 0 auto;
}

/* --- حالت‌های نمایش کلی --- */

.bardich-nf-wrapper.is-submitted .bardich-nf-form {
	display: none;
}

.bardich-nf-wrapper.is-submitted .bardich-nf-success {
	display: block;
}

@media (min-width: 640px) {
	.bardich-nf-form,
	.bardich-nf-success {
		padding: 40px 46px;
	}

	.bardich-nf-title {
		font-size: 26px;
	}
}
