/* دکمه و پنجره‌ی «مشاوره و درخواست تماس» */
.pardis-consult-fab, .pd-consult {
	--consult-c: var(--pardis-primary, #5b30f6);
	--consult-rgb: var(--pardis-primary-rgb-comma, 91, 48, 246);
}

/* دکمه‌ی شناور */
.pardis-consult-fab {
	position: fixed;
	z-index: 60;
	display: flex; align-items: center;
	height: 58px;
	padding: 0;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--consult-c), color-mix(in srgb, var(--consult-c) 65%, #a855f7));
	color: #fff;
	text-decoration: none;
	box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--consult-c) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
	transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
	animation: pd-fab-in .6s cubic-bezier(.2, .9, .3, 1.3) 1.2s both;
}
.pardis-consult-fab__icon { width: 58px; height: 58px; display: grid; place-items: center; flex-shrink: 0; }
.pardis-consult-fab__label {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	font-size: 13.5px; font-weight: 800;
	transition: max-width .35s ease, padding .35s ease;
}
/* hover فقط روی دستگاه‌هایی که ماوس دارند؛ روی لمس بعد از هر تپ «چسبنده» می‌ماند و
   دکمه باز/جمع می‌شد و می‌پرید */
.pardis-consult-fab { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) {
	.pardis-consult-fab:hover { transform: translateY(-3px); color: #fff; }
	.pardis-consult-fab:hover .pardis-consult-fab__label { max-width: 220px; padding-inline-end: 20px; }
}
.pardis-consult-fab:active { transform: scale(.94); }
.pardis-consult-fab.has-pulse::before, .pardis-consult-fab.has-pulse::after {
	content: "";
	position: absolute; inset: 0;
	border-radius: inherit;
	border: 2px solid var(--consult-c);
	animation: pd-fab-pulse 2.6s cubic-bezier(.2, .6, .4, 1) 8; /* چند بار تپش و سپس توقف (مصرف باتری) */
	pointer-events: none;
}
.pardis-consult-fab.has-pulse::after { animation-delay: 1.3s; }
.pardis-consult-fab:hover::before, .pardis-consult-fab:hover::after { animation: none; opacity: 0; }
@media (hover: none) { .pardis-consult-fab:hover::before, .pardis-consult-fab:hover::after { animation: revert; opacity: revert; } }
@keyframes pd-fab-pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes pd-fab-in { from { transform: scale(.4) translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pardis-consult-fab, .pardis-consult-fab::before, .pardis-consult-fab::after { animation: none !important; } }
body.pardis-preloader-active .pardis-consult-fab { visibility: hidden; }

/* پنجره (مودال) — دوستونه در دسکتاپ، بدون اسکرول */
.pd-consult[hidden] { display: none !important; }
.pd-consult { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pd-consult__backdrop { position: absolute; inset: 0; background: rgba(15, 13, 32, .55); backdrop-filter: blur(6px); animation: pd-c-fade .25s ease both; }
.pd-consult__panel {
	position: relative;
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	width: min(820px, 100%);
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow: hidden;
	border-radius: 26px;
	background: var(--bg-surface, #fff);
	color: var(--text-primary, #1e1c3a);
	box-shadow: 0 40px 90px -30px rgba(15, 13, 32, .6);
	animation: pd-c-in .35s cubic-bezier(.2, .9, .3, 1.15) both;
}
@keyframes pd-c-fade { from { opacity: 0; } }
@keyframes pd-c-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.pd-consult.is-closing .pd-consult__panel { animation: pd-c-out .2s ease both; }
.pd-consult.is-closing .pd-consult__backdrop { animation: pd-c-fade .2s ease reverse both; }
@keyframes pd-c-out { to { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes pd-c-sheet-in { from { transform: translateY(100%); } }
@keyframes pd-c-sheet-out { to { transform: translateY(100%); } }

.pd-consult__close { position: absolute; top: 14px; left: 14px; z-index: 3; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 11px; background: var(--bg-subtle, #eef1fb); color: var(--text-muted, #6b6898); cursor: pointer; transition: background .2s, color .2s; }
.pd-consult__close:hover { background: #ffe4e6; color: #e11d48; }

/* ستون رنگی */
.pd-consult__hero {
	position: relative;
	display: flex; flex-direction: column; gap: 14px;
	padding: 28px 24px;
	color: #fff;
	background:
		radial-gradient(circle at 15% 12%, rgba(255, 255, 255, .2), transparent 42%),
		radial-gradient(circle at 90% 95%, rgba(255, 255, 255, .14), transparent 45%),
		linear-gradient(160deg, var(--consult-c), color-mix(in srgb, var(--consult-c) 60%, #a855f7));
	overflow: hidden;
}
.pd-consult__hero::after { content: ""; position: absolute; width: 220px; height: 220px; bottom: -110px; left: -80px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .07); pointer-events: none; }
.pd-consult__head { display: flex; flex-direction: column; gap: 12px; }
.pd-consult__badge { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 17px; background: rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.pd-consult__hero h3 { margin: 0; font-size: 19px; font-weight: 900; line-height: 1.6; color: #fff; }
.pd-consult__desc { margin: 0; font-size: 12.5px; line-height: 2; opacity: .9; }
.pd-consult__points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 9px; }
.pd-consult__points li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.pd-consult__points svg { flex-shrink: 0; padding: 3px; width: 21px; height: 21px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.pd-consult__hero-call { position: relative; z-index: 1; margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-radius: 14px; background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none; transition: background .2s; }
.pd-consult__hero-call:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.pd-consult__hero-call span { font-size: 11px; opacity: .85; }
.pd-consult__hero-call b { font-size: 15px; font-weight: 800; text-align: right; }

/* ستون فرم */
.pd-consult__body { min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.pd-consult__body::-webkit-scrollbar { display: none; }
.pd-consult__form { padding: 26px 26px 22px; }
.pd-consult__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; }
.pd-consult__field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; }
.pd-consult__field--full { grid-column: 1 / -1; }
.pd-consult__field > span { color: var(--text-primary, #1e1c3a); }
.pd-consult__field input, .pd-consult__field select, .pd-consult__field textarea {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1.5px solid var(--border, #e2e0f4);
	border-radius: 13px;
	background: var(--bg-surface, #fff);
	color: var(--text-primary, #1e1c3a);
	font: inherit; font-size: 14px; font-weight: 500;
	outline: 0;
	transition: border-color .2s, box-shadow .2s;
}
.pd-consult__field textarea { height: 64px; min-height: 64px; padding: 10px 14px; resize: none; line-height: 1.9; }
.pd-consult__field input:focus, .pd-consult__field select:focus, .pd-consult__field textarea:focus { border-color: var(--consult-c); box-shadow: 0 0 0 4px rgba(var(--consult-rgb), .14); }
.pd-consult__field.is-invalid input { border-color: #e11d48; box-shadow: 0 0 0 4px rgba(225, 29, 72, .1); }
.pd-consult__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-consult__chips label { position: relative; cursor: pointer; }
.pd-consult__chips input { position: absolute; opacity: 0; }
.pd-consult__chips b { display: inline-block; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--border, #e2e0f4); font-size: 12px; font-weight: 600; color: var(--text-muted, #6b6898); transition: all .15s; }
.pd-consult__chips input:checked + b { border-color: var(--consult-c); background: rgba(var(--consult-rgb), .08); color: var(--consult-c); }
.pd-consult__chips input:focus-visible + b { box-shadow: 0 0 0 3px rgba(var(--consult-rgb), .2); }
/* بیرون از صفحه (left:-9999px) در صفحه‌ی راست‌به‌چپ عرض صفحه را زیاد می‌کرد و در موبایل اسکرول افقی می‌ساخت؛ با clip در همان‌جا پنهان می‌شود. */
.pd-consult__hp { 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; opacity: 0; }
.pd-consult__msg { margin-top: 12px; padding: 9px 14px; border-radius: 12px; font-size: 12.5px; background: rgba(225, 29, 72, .08); color: #be123c; }
.pd-consult__submit {
	width: 100%;
	height: 50px;
	margin-top: 16px;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	border: 0; border-radius: 14px;
	background: linear-gradient(135deg, var(--consult-c), color-mix(in srgb, var(--consult-c) 65%, #a855f7));
	color: #fff;
	font: inherit; font-size: 15px; font-weight: 800;
	cursor: pointer;
	box-shadow: 0 16px 30px -14px color-mix(in srgb, var(--consult-c) 85%, transparent);
	transition: transform .2s, box-shadow .2s, opacity .2s;
}
.pd-consult__submit:hover { transform: translateY(-2px); }
.pd-consult__submit.is-loading { opacity: .75; pointer-events: none; }
.pd-consult__submit.is-loading svg { animation: pd-ring 1s ease-in-out infinite; }
@keyframes pd-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-15deg); } 75% { transform: rotate(15deg); } }
.pd-consult__privacy { margin: 10px 0 0; font-size: 11px; color: var(--text-muted, #6b6898); text-align: center; }
.pd-consult__done[hidden], .pd-consult__form[hidden] { display: none !important; }
.pd-consult__done { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 28px 30px; text-align: center; }
.pd-consult__check { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 16px 34px -14px rgba(16, 185, 129, .9); animation: pd-c-pop .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pd-c-pop { from { transform: scale(.3); opacity: 0; } }
.pd-consult__done h3 { margin: 16px 0 6px; font-size: 20px; font-weight: 900; }
.pd-consult__done p { margin: 0 0 16px; font-size: 13.5px; line-height: 2; color: var(--text-muted, #6b6898); }
.pd-consult__call { display: block; margin-bottom: 16px; font-size: 13px; color: var(--consult-c); text-decoration: none; }
.pd-consult__again { height: 44px; padding: 0 26px; border: 1.5px solid var(--border, #e2e0f4); border-radius: 13px; background: transparent; color: var(--text-primary, #1e1c3a); font: inherit; font-weight: 700; cursor: pointer; }
html.pd-consult-open { overflow: hidden; }

/* صفحه‌های کوتاه (لپ‌تاپ‌های کوچک): فشرده‌تر */
@media (min-width: 761px) and (max-height: 640px) {
	.pd-consult__form { padding: 18px 22px 16px; }
	.pd-consult__grid { gap: 9px 12px; }
	.pd-consult__field input, .pd-consult__field select { height: 42px; }
	.pd-consult__submit { height: 46px; margin-top: 12px; }
	.pd-consult__privacy { display: none; }
	.pd-consult__points { display: none; }
}

/* موبایل و تبلت عمودی: برگه‌ی پایینی یک‌ستونه */
@media (max-width: 760px) {
	.pd-consult { align-items: flex-end; padding: 0; }
	.pd-consult__panel {
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(0, 1fr);
		width: 100%;
		max-height: 94vh;
		max-height: 94dvh;
		border-radius: 24px 24px 0 0;
		/* ورود نرم و بدون overshoot (قبلاً پایین برگه فاصله می‌انداخت) و خروجِ رو‌به‌پایین */
		animation: pd-c-sheet-in .28s cubic-bezier(.22, 1, .36, 1) both;
		will-change: transform;
	}
	.pd-consult.is-closing .pd-consult__panel { animation: pd-c-sheet-out .15s cubic-bezier(.4, 0, 1, 1) both; }
	.pd-consult.is-closing .pd-consult__backdrop { animation: pd-c-fade .15s ease reverse both; }
	/* blur روی موبایل سنگین است و باز/بسته شدن را گیر‌دار می‌کرد */
	.pd-consult__backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(15, 13, 32, .62); }
	.pd-consult__close { touch-action: manipulation; }
	.pd-consult__close { top: 12px; left: 12px; background: rgba(255, 255, 255, .2); color: #fff; }
	.pd-consult__close:hover { background: rgba(255, 255, 255, .35); color: #fff; }
	.pd-consult__hero { gap: 6px; padding: 18px 20px 16px; }
	.pd-consult__hero::after { display: none; }
	.pd-consult__head { flex-direction: row; align-items: center; gap: 10px; padding-left: 40px; }
	.pd-consult__badge { width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0; }
	.pd-consult__badge svg { width: 20px; height: 20px; }
	.pd-consult__hero h3 { font-size: 16px; }
	.pd-consult__desc { font-size: 12px; line-height: 1.9; }
	.pd-consult__points, .pd-consult__hero-call { display: none; }
	.pd-consult__form { padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
	.pd-consult__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	.pd-consult__field { font-size: 12px; gap: 5px; }
	.pd-consult__field input, .pd-consult__field select { height: 44px; font-size: 16px; }
	.pd-consult__field textarea { font-size: 16px; }
	.pd-consult__chips b { padding: 5px 10px; font-size: 11.5px; }
	.pd-consult__submit { margin-top: 12px; }
}
@media (max-width: 380px) {
	.pd-consult__grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
	.pardis-consult-fab { height: 52px; }
	.pardis-consult-fab__icon { width: 52px; height: 52px; }
}
/* گوشی‌های کوتاه: حذف موارد غیرضروری تا فرم بدون اسکرول جا شود */
@media (max-width: 760px) and (max-height: 720px) {
	.pd-consult__desc, .pd-consult__privacy { display: none; }
	.pd-consult__hero { padding: 14px 18px 12px; }
	.pd-consult__form { padding-top: 12px; }
	.pd-consult__grid { gap: 8px 10px; }
	.pd-consult__field input, .pd-consult__field select { height: 42px; }
	.pd-consult__field textarea { height: 50px; min-height: 50px; padding: 8px 12px; }
	.pd-consult__submit { height: 46px; margin-top: 10px; }
}
