/* ============ فرم درخواست / مشاوره + پنجره‌های پاپ‌آپ ============ */
.ffbe-lfw,
.ffbe-modal {
	--ffbe-red: #c3031a;
	--ffbe-red-dark: #9d0215;
	--ffbe-dark: #161616;
	--ffbe-muted: #6f6f6f;
	--ffbe-in-bg: #fff;
	--ffbe-in-bd: #e7e3e3;
	--ffbe-in-focus: #c3031a;
	--ffbe-in-color: #1d1d1d;
	--ffbe-ph: #a3a3a3;
	--ffbe-in-radius: 10px;
	--ffbe-in-h: 44px;
	--ffbe-card-w: 352px;
	direction: rtl;
}
.ffbe-lfw *, .ffbe-lfw *::before, .ffbe-lfw *::after,
.ffbe-modal *, .ffbe-modal *::before, .ffbe-modal *::after { box-sizing: border-box; }
.ffbe-lfw .ffbe-ico, .ffbe-modal .ffbe-ico { width: 1em; height: 1em; flex: none; }
.ffbe-lf-wrap [hidden], .ffbe-modal [hidden] { display: none !important; }

/* ---- بخش کامل ---- */
.ffbe-lfw__box {
	display: grid;
	grid-template-columns: minmax(0, var(--ffbe-card-w)) minmax(0, 1fr);
	align-items: center;
	gap: clamp(32px, 10%, 112px);
	padding: 56px 48px 56px 64px;
	border-radius: 30px;
	background-color: #f8e8e9;
}
.ffbe-lfw__box.ffbe-side-left { grid-template-columns: minmax(0, 1fr) minmax(0, var(--ffbe-card-w)); }
.ffbe-lfw__box.ffbe-side-left .ffbe-lfw__card { order: 2; }

.ffbe-lfw__card {
	width: 100%;
	padding: 30px 28px 28px;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 18px 40px -22px rgba(120, 20, 30, .28);
}
.ffbe-lfw--form .ffbe-lfw__card { max-width: var(--ffbe-card-w); margin-inline: auto; }

.ffbe-lfw__text { color: var(--ffbe-dark, #161616); }
.ffbe-lfw__badge {
	display: inline-block;
	padding: 8px 20px;
	border-radius: 999px;
	background-color: #ffa9b2;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.6;
}
.ffbe-lfw__title {
	margin: 18px 0 14px !important;
	color: var(--ffbe-dark, #161616);
	font-size: clamp(24px, 2.6vw, 32px);
	font-weight: 900;
	line-height: 1.5;
}
.ffbe-lfw__desc {
	margin: 0 0 18px;
	color: var(--ffbe-muted, #6f6f6f);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 2.1;
	max-width: 470px;
}
.ffbe-lfw__points { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ffbe-lfw__points li { display: flex; align-items: center; gap: 10px; color: #222; font-size: 14px; font-weight: 800; line-height: 1.6; }
.ffbe-lfw__points .ffbe-ico { width: 22px; height: 22px; color: var(--ffbe-red, #c3031a); }

/* ---- دکمه باز کردن پاپ‌آپ ---- */
.ffbe-lfw__trigger-wrap { display: flex; }
.ffbe-lfw__trigger {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 13px 24px;
	border: 0;
	border-radius: 12px;
	background-color: #e31127;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	transition: background-color .2s, transform .2s;
}
.ffbe-lfw__trigger:hover { background-color: #b80d1f; }
.ffbe-lfw__trigger .ffbe-ico { width: 20px; height: 20px; }

/* ---- فرم ---- */
.ffbe-lf { margin: 0; }
.ffbe-lf__title { margin: 0 0 22px !important; text-align: center; color: var(--ffbe-dark, #161616); font-size: 19px; font-weight: 900; line-height: 1.5; }
.ffbe-lf__grid { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 16px; }
.ffbe-lf__field { flex: 1 1 100%; min-width: 0; }
.ffbe-lf__field.ffbe-w-50 { flex-basis: calc(50% - 6px); }
.ffbe-lf__field.ffbe-w-33 { flex-basis: calc(33.333% - 8px); }
.ffbe-lf__label { display: block; margin-bottom: 8px; color: #222; font-size: 13px; font-weight: 800; line-height: 1.5; }
.ffbe-lf__label i { color: var(--ffbe-red, #c3031a); font-style: normal; }
.ffbe-lf input[type="text"],
.ffbe-lf input[type="tel"],
.ffbe-lf input[type="email"],
.ffbe-lf select,
.ffbe-lf textarea {
	display: block;
	width: 100%;
	height: var(--ffbe-in-h, 44px);
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--ffbe-in-bd, #e7e3e3);
	border-radius: var(--ffbe-in-radius, 10px);
	background-color: var(--ffbe-in-bg, #fff);
	color: var(--ffbe-in-color, #1d1d1d);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.6;
	box-shadow: none;
	outline: none;
	transition: border-color .2s, box-shadow .2s;
}
.ffbe-lf input[dir="ltr"] { text-align: right; }
.ffbe-lf input[dir="ltr"]::placeholder { text-align: right; }
.ffbe-lf textarea { height: auto; min-height: 76px; padding: 12px 14px; resize: vertical; }
.ffbe-lf select {
	-webkit-appearance: none;
	appearance: none;
	padding-left: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 14px center;
	cursor: pointer;
}
.ffbe-lf select:invalid, .ffbe-lf select.is-empty { color: var(--ffbe-ph, #a3a3a3); }
.ffbe-lf select option { color: var(--ffbe-in-color, #1d1d1d); }
.ffbe-lf ::placeholder { color: var(--ffbe-ph, #a3a3a3); opacity: 1; }
.ffbe-lf input:focus, .ffbe-lf select:focus, .ffbe-lf textarea:focus {
	border-color: var(--ffbe-in-focus, #c3031a);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ffbe-in-focus, #c3031a) 14%, transparent);
}
.ffbe-lf__radios { display: flex; flex-wrap: wrap; gap: 8px; }
.ffbe-lf__radio { position: relative; cursor: pointer; }
.ffbe-lf__radio input { position: absolute; opacity: 0; pointer-events: none; }
.ffbe-lf__radio span { display: inline-block; padding: 8px 14px; border: 1px solid var(--ffbe-in-bd, #e7e3e3); border-radius: 999px; background: var(--ffbe-in-bg, #fff); font-size: 13px; font-weight: 700; transition: all .2s; }
.ffbe-lf__radio input:checked + span { border-color: var(--ffbe-red, #c3031a); background: var(--ffbe-red, #c3031a); color: #fff; }
.ffbe-lf__radio input:focus-visible + span { box-shadow: 0 0 0 3px rgba(195, 3, 26, .2); }

.ffbe-lf__field.has-error input, .ffbe-lf__field.has-error select, .ffbe-lf__field.has-error textarea { border-color: #d92d20; }
.ffbe-lf__err { display: block; min-height: 0; color: #d92d20; font-size: 12px; font-weight: 600; line-height: 1.6; }
.ffbe-lf__err:not(:empty) { margin-top: 5px; }

.ffbe-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ffbe-lf__msg { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #b42318; font-size: 13px; font-weight: 600; line-height: 1.7; }
.ffbe-lf__msg[hidden] { display: none; }

.ffbe-lf__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	min-height: 44px;
	margin-top: 18px;
	padding: 10px 16px;
	border: 0;
	border-radius: 10px;
	background-color: var(--ffbe-red, #c3031a);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.5;
	cursor: pointer;
	transition: background-color .2s, opacity .2s;
}
.ffbe-lf__btn:hover { background-color: var(--ffbe-red-dark, #9d0215); }
.ffbe-lf__btn .ffbe-ico { width: 19px; height: 19px; }
.ffbe-lf__btn[disabled] { opacity: .7; cursor: progress; }
.ffbe-lf__btn.is-loading span::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-start: 8px; vertical-align: -2px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: ffbe-spin .7s linear infinite; }
@keyframes ffbe-spin { to { transform: rotate(360deg); } }

.ffbe-lf-done { padding: 26px 6px; text-align: center; }
.ffbe-lf-done[hidden] { display: none; }
.ffbe-lf-done__ico { display: inline-grid; width: 64px; height: 64px; color: #12a150; animation: ffbe-pop .4s ease-out; }
.ffbe-lf-done__ico .ffbe-ico { width: 64px; height: 64px; }
.ffbe-lf-done h4 { margin: 14px 0 8px !important; color: var(--ffbe-dark, #161616); font-size: 18px; font-weight: 900; }
.ffbe-lf-done p { margin: 0 0 18px; color: var(--ffbe-muted, #6f6f6f); font-size: 14px; line-height: 2; }
.ffbe-lf-done__again { padding: 9px 18px; border: 1px solid var(--ffbe-in-bd, #e7e3e3); border-radius: 10px; background: #fff; color: #333; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ffbe-lf-done__again:hover { border-color: var(--ffbe-red, #c3031a); color: var(--ffbe-red, #c3031a); }
@keyframes ffbe-pop { from { transform: scale(.6); opacity: 0; } }

/* ---- پنجره پاپ‌آپ ---- */
.ffbe-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 18px; }
.ffbe-modal[hidden] { display: none; }
.ffbe-modal__bd { position: absolute; inset: 0; background: rgba(20, 10, 12, .62); backdrop-filter: blur(3px); animation: ffbe-fade .2s; }
.ffbe-modal__box {
	position: relative;
	width: min(440px, 100%);
	max-height: calc(100vh - 36px);
	overflow: auto;
	overscroll-behavior: contain;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	animation: ffbe-rise .25s ease-out;
}
.ffbe-modal--form .ffbe-modal__box { background: transparent; box-shadow: none; overflow: visible; }
.ffbe-modal--form .ffbe-lfw__card { max-height: calc(100vh - 36px); overflow: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.ffbe-modal__x {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f3f1f1;
	color: #222;
	font-size: 18px;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.ffbe-modal__x:hover { background: var(--ffbe-red, #c3031a); color: #fff; }
@keyframes ffbe-fade { from { opacity: 0; } }
@keyframes ffbe-rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
html.ffbe-modal-open { overflow: hidden; }

/* ---- واکنش‌گرا ---- */
@media (max-width: 1024px) {
	.ffbe-lfw__box, .ffbe-lfw__box.ffbe-side-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 40px 32px; }
}
@media (max-width: 767px) {
	.ffbe-lfw__box, .ffbe-lfw__box.ffbe-side-left { grid-template-columns: 1fr; padding: 28px 16px; border-radius: 22px; }
	.ffbe-lfw__box .ffbe-lfw__text { order: -1; text-align: center; }
	.ffbe-lfw__desc { margin-inline: auto; }
	.ffbe-lfw__points { justify-items: center; }
	.ffbe-lfw__card { padding: 24px 18px; }
	.ffbe-lf__field.ffbe-w-50, .ffbe-lf__field.ffbe-w-33 { flex-basis: 100%; }
	.ffbe-modal { padding: 10px; align-items: flex-end; }
	.ffbe-modal__box { max-height: calc(100vh - 20px); border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.ffbe-modal__bd, .ffbe-modal__box, .ffbe-lf-done__ico { animation: none; }
}
