/**
 * استایل پیش‌فرض فرانت‌اند محاسبه‌گر اقساط نفیس (راست‌چین).
 * این‌ها فقط استایل پایه هستند؛ هر چیزی از طریق المنتور قابل بازنویسی است.
 */

/*
 * خودِ ویجت المنتور باید کل عرض والدش را پر کند. در کانتینرهای فلکس‌باکس
 * المنتور، آیتم‌ها روی محور اصلی به‌اندازه‌ی محتوا جمع می‌شوند؛ این قانون
 * تضمین می‌کند که کادر محاسبه‌گر همیشه تمام عرض موجود را بگیرد.
 */
.elementor-widget-nafis-inst-product,
.elementor-widget-nafis-inst-manual {
	width: 100%;
}

.elementor-widget-nafis-inst-product > .elementor-widget-container,
.elementor-widget-nafis-inst-manual > .elementor-widget-container {
	width: 100%;
}

.nafis-inst {
	direction: rtl;
	text-align: right;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.nafis-inst *,
.nafis-inst *::before,
.nafis-inst *::after {
	box-sizing: border-box;
}

.nafis-inst__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 0;
}

.nafis-inst__label {
	font-weight: 600;
}

.nafis-inst__value {
	font-weight: 700;
	white-space: nowrap;
}

/* خط رابط (نقطه‌چین) بین برچسب و مقدار — به‌صورت پیش‌فرض پنهان است و
   با کلید «نمایش خط رابط» در المنتور روشن می‌شود. */
.nafis-inst__leader {
	display: none;
	flex: 1 1 auto;
	align-self: center;
	height: 0;
	margin: 0 10px;
	border-bottom: 2px dotted #c9c9c9;
}

/* چیدمان دوبخشی: انتخاب‌گرها در یک ستون، نتایج در ستون دیگر */
.nafis-inst--two-col {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 24px;
}

.nafis-inst--two-col .nafis-inst__col {
	min-width: 0;
}

.nafis-inst--two-col .nafis-inst__col--results {
	flex: 1 1 0;
}

.nafis-inst--two-col .nafis-inst__col--inputs {
	flex: 0 0 40%;
	max-width: 40%;
}

/* جابه‌جایی سمت بخش انتخاب‌گرها */
.nafis-inst--inputs-left .nafis-inst__col--inputs {
	order: 2;
}

.nafis-inst--inputs-left .nafis-inst__col--results {
	order: 1;
}

/* روی موبایل، دو بخش زیر هم و تمام‌عرض می‌شوند */
@media (max-width: 767px) {
	.nafis-inst--two-col {
		flex-direction: column;
	}

	.nafis-inst--two-col .nafis-inst__col--inputs,
	.nafis-inst--two-col .nafis-inst__col--results {
		flex: 1 1 auto !important;
		max-width: 100% !important;
		width: 100%;
	}
}

/* انتخاب‌گرها */
.nafis-inst__row--down_selector,
.nafis-inst__row--period_selector {
	flex-direction: column;
	align-items: stretch;
}

.nafis-inst__control {
	width: 100%;
}

.nafis-inst__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}

.nafis-inst__chip {
	cursor: pointer;
	border: 1px solid #d0d0d0;
	background: #f7f7f7;
	color: #333;
	border-radius: 8px;
	padding: 8px 16px;
	font: inherit;
	line-height: 1.4;
	transition: all 0.15s ease;
}

.nafis-inst__chip:hover {
	border-color: #b0b0b0;
}

.nafis-inst__chip.is-active {
	background: #1e73be;
	border-color: #1e73be;
	color: #fff;
}

/* فیلدهای ورودی */
.nafis-inst__input,
.nafis-inst__select {
	width: 100%;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	padding: 8px 12px;
	font: inherit;
	background: #fff;
	color: #333;
}

.nafis-inst__custom-down {
	margin-top: 8px;
}

.nafis-inst__custom-label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.9em;
}

/* آیتم برجسته */
.nafis-inst__highlight {
	background: #eef6ff;
	border: 1px solid #cfe3fb;
	border-radius: 10px;
	padding: 12px 14px;
}

.nafis-inst__row--installment .nafis-inst__value {
	font-size: 1.4em;
	color: #1e73be;
}

/* جدول اقساط */
.nafis-inst__table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 8px;
}

.nafis-inst__table th,
.nafis-inst__table td {
	border: 1px solid #e2e2e2;
	padding: 8px 10px;
	text-align: center;
}

.nafis-inst__table thead th {
	background: #f0f0f0;
}

/* پیام خطا */
.nafis-inst__message {
	display: none;
	color: #b00020;
	background: #fdecea;
	border: 1px solid #f5c6cb;
	border-radius: 8px;
	padding: 8px 12px;
	margin: 8px 0;
	font-size: 0.95em;
}

/* دکمه فراخوان */
.nafis-inst__row--cta {
	justify-content: center;
}

.nafis-inst__cta {
	display: inline-block;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	background: #1e73be;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 28px;
	font: inherit;
	font-weight: 700;
	transition: background 0.15s ease;
}

.nafis-inst__cta:hover {
	background: #155a96;
	color: #fff;
}

.nafis-inst__note-text {
	width: 100%;
	font-size: 0.95em;
	color: #555;
}
