/*!
 * Lead Tracker & Floating Contact Widget v1.5.1
 * Copyright © 2026 تری وم (trivem) — تمامی حقوق محفوظ است.
 */
/* ===========================================================
   Lead Tracker – Floating Widget & Form Styles
   =========================================================== */

.ltr-widget {
	position: fixed;
	z-index: 99990;
	font-family: inherit;
}

/* Network services landing-page components */
.ltr-network-shortcuts,.ltr-network-cta{--ltr-brand:var(--wp--preset--color--primary,var(--ltr-color,#2563eb));--ltr-ink:var(--wp--preset--color--contrast,#0f172a);font-family:inherit}
.ltr-network-heading{margin:0 0 22px;color:var(--ltr-ink);font-size:clamp(22px,3vw,32px);font-weight:800}
.ltr-shortcuts-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.ltr-shortcut-card{position:relative;display:flex;align-items:center;gap:14px;min-height:112px;padding:20px;border:1px solid rgba(37,99,235,.14);border-radius:20px;background:#fff;background:linear-gradient(145deg,#fff 0%,color-mix(in srgb,var(--ltr-brand) 4%,#fff) 100%);box-shadow:0 10px 30px rgba(15,23,42,.06);color:var(--ltr-ink);text-decoration:none;overflow:hidden;transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
.ltr-shortcut-card:hover{transform:translateY(-5px);box-shadow:0 18px 38px rgba(15,23,42,.12);border-color:rgba(37,99,235,.45);border-color:color-mix(in srgb,var(--ltr-brand) 45%,#dbe4f0)}
.ltr-shortcut-icon{display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;border-radius:15px;background:color-mix(in srgb,var(--ltr-brand) 12%,#fff);color:var(--ltr-brand)}
.ltr-shortcut-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ltr-shortcut-copy{display:flex;flex:1;flex-direction:column;gap:7px}.ltr-shortcut-copy strong{font-size:16px}.ltr-shortcut-copy small{color:#64748b;font-size:13px;line-height:1.6}.ltr-shortcut-arrow{color:var(--ltr-brand);opacity:.7}.ltr-shortcut-arrow svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ltr-network-cta{position:relative;display:flex;align-items:center;justify-content:space-between;gap:28px;margin:28px 0;padding:clamp(28px,5vw,52px);border-radius:28px;isolation:isolate;overflow:hidden;color:#fff;background:linear-gradient(120deg,var(--ltr-brand),color-mix(in srgb,var(--ltr-brand) 62%,#111827))}
.ltr-network-cta{height:200px;box-sizing:border-box}
.ltr-cta-glow{position:absolute;z-index:-1;width:330px;height:330px;inset-inline-end:-110px;top:-160px;border-radius:50%;background:rgba(255,255,255,.16);filter:blur(3px)}.ltr-cta-content{max-width:650px}.ltr-cta-kicker{display:inline-block;margin-bottom:10px;color:rgba(255,255,255,.76);font-size:12px;font-weight:700;letter-spacing:.08em}.ltr-network-cta h2{margin:0 0 10px;color:#fff;font-size:clamp(24px,4vw,38px);line-height:1.25}.ltr-network-cta p{margin:0;color:rgba(255,255,255,.84);font-size:16px;line-height:1.9}.ltr-cta-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:10px}.ltr-cta-actions a{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 19px;border-radius:12px;font-size:14px;font-weight:800;text-decoration:none;transition:transform .2s ease,background .2s ease}.ltr-cta-primary{background:#fff;color:var(--ltr-brand)}.ltr-cta-secondary{border:1px solid rgba(255,255,255,.35);color:#fff;background:rgba(255,255,255,.1)}.ltr-cta-actions a:hover{transform:translateY(-2px)}.ltr-cta-secondary svg{width:17px;height:17px;fill:currentColor}
@media(max-width:800px){.ltr-shortcuts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ltr-network-cta{height:auto;min-height:200px;flex-direction:column;align-items:flex-start}.ltr-cta-actions{width:100%}}
@media(max-width:520px){.ltr-shortcuts-grid{grid-template-columns:1fr}.ltr-shortcut-card{min-height:96px;padding:16px}.ltr-network-cta{padding:26px 20px;border-radius:20px}.ltr-cta-actions a{flex:1}}

/* CTA phone capture */
.ltr-cta-phone-form{display:flex;align-items:center;gap:8px}
.ltr-cta-phone-form input{width:180px;padding:13px 14px;border:1px solid rgba(255,255,255,.35);border-radius:12px;background:rgba(255,255,255,.14);color:#fff;font:inherit}
.ltr-cta-phone-form input::placeholder{color:rgba(255,255,255,.78)}
.ltr-cta-phone-form button{border:0;cursor:pointer}
@media(max-width:520px){.ltr-cta-actions,.ltr-cta-phone-form{width:100%;flex-direction:column}.ltr-cta-phone-form input,.ltr-cta-phone-form button,.ltr-cta-actions a{width:100%;box-sizing:border-box}}

/* حباب‌ها همیشه ثابت و قابل‌مشاهده (بدون هاور) */
/* direction: ltr برای اینکه چیدمان فیزیکی مستقل از راست‌چین بودن قالب باشد */
.ltr-bubbles {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	direction: ltr;
}
.ltr-widget.ltr-pos-left  .ltr-bubbles { align-items: flex-start; }
.ltr-widget.ltr-pos-right .ltr-bubbles { align-items: flex-end; }

/* دکمه‌های ارتباطی */
.ltr-bubble {
	width: calc(var(--ltr-size, 60px) * .82);
	height: calc(var(--ltr-size, 60px) * .82);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
	transition: transform .2s ease;
	flex: 0 0 auto;
}
.ltr-bubble svg { width: 52%; height: 52%; }

.ltr-bubble.ltr-phone    { background: var(--ltr-color, #25D366); }
.ltr-bubble.ltr-whatsapp { background: #25D366; }
.ltr-bubble.ltr-bale     { background: #8e44ec; }

/* دکمه تماس (اصلی): بزرگ‌تر و همیشه در حال تکان خوردن */
.ltr-bubble.ltr-primary {
	width: var(--ltr-size, 60px);
	height: var(--ltr-size, 60px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.ltr-bubble.ltr-primary svg { width: 55%; height: 55%; }

/* ردیف دکمه تماس + لیبل — چیدمان فیزیکی مستقل از جهت قالب */
.ltr-phone-row {
	display: flex;
	align-items: center;
	gap: 12px;
	direction: ltr;
}
/* موقعیت راست: دکمه تماس بچسبد به راست، لیبل بعد از آن (سمت چپش) */
.ltr-widget.ltr-pos-right .ltr-phone-row { flex-direction: row-reverse; }
/* موقعیت چپ: دکمه تماس سمت چپ، لیبل بعد از آن (سمت راستش) */
.ltr-widget.ltr-pos-left  .ltr-phone-row { flex-direction: row; }

/* متن داخل لیبل دوباره راست‌چین شود (برای فارسی) */
.ltr-typing-label { direction: rtl; text-align: right; }

/* انیمیشن‌ها روی دکمه تماس */
.ltr-anim-pulse .ltr-bubble.ltr-primary { animation: ltr-pulse 2s infinite; }
.ltr-anim-shake .ltr-bubble.ltr-primary { animation: ltr-shake 2.5s infinite; }

@keyframes ltr-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); }
	70%  { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@keyframes ltr-shake {
	0%, 82%, 100% { transform: rotate(0); }
	84% { transform: rotate(-12deg); }
	86% { transform: rotate(12deg); }
	88% { transform: rotate(-8deg); }
	90% { transform: rotate(8deg); }
	92% { transform: rotate(-4deg); }
	94% { transform: rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
	.ltr-bubble.ltr-primary { animation: none !important; }
}

/* لیبل تایپی */
.ltr-typing-label {
	background: #fff;
	color: #222;
	padding: 10px 16px;
	border-radius: 30px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
	font-size: 14px;
	white-space: nowrap;
	min-width: 190px;
	max-width: 190px;
	overflow: hidden;
	text-overflow: ellipsis;
	position: relative;
}
.ltr-typing-label::after {
	content: '';
	display: inline-block;
	width: 2px;
	height: 1em;
	background: #222;
	margin-inline-start: 2px;
	vertical-align: middle;
	animation: ltr-caret .7s steps(1) infinite;
}
@keyframes ltr-caret { 50% { opacity: 0; } }

/* موبایل */
@media (max-width: 600px) {
	.ltr-typing-label {
		min-width: 140px;
		max-width: 140px;
		font-size: 12px;
		padding: 8px 12px;
	}
}

/* ===========================================================
   فرم مشاوره — همیشه و به‌صورت خودکار کل عرض کانتینر را پر می‌کند
   =========================================================== */
.ltr-form-wrap {
	--ltr-color: var(--wp--preset--color--primary, #2563eb);
	--ltr-ink: var(--wp--preset--color--contrast, #0f172a);
	--ltr-surface: var(--wp--preset--color--base, #ffffff);
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	flex: 1 1 auto;      /* اگر کانتینر flex بود، کشیده شود */
	align-self: stretch; /* در flex/grid کامل کشیده شود */
}
.ltr-lead-form {
	--ltr-color: var(--wp--preset--color--primary, #2563eb);
	--ltr-ink: var(--wp--preset--color--contrast, #0f172a);
	display: block;
	width: 100%;
	max-width: 100%; /* پیش‌فرض: پر کردن کل عرض کانتینر */
	margin-inline: auto;
	box-sizing: border-box;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid #e6e6e6;
	border-radius: 14px;
	padding: clamp(16px, 4%, 26px); /* پدینگ متناسب با عرض کانتینر */
	box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
	font-family: inherit;
}
.ltr-form-title {
	margin: 0 0 18px;
	font-size: clamp(17px, 4vw, 21px);
	text-align: center;
}
.ltr-field { margin-bottom: 14px; }
.ltr-field:has([name="ltr_call_time"]) { display: none !important; }
.ltr-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}
.ltr-req { color: #e02424; margin-inline-start: 2px; }

.ltr-field input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #d5d5d5;
	border-radius: 10px;
	font-size: 16px; /* ۱۶px تا موبایل هنگام فوکوس زوم نکند */
	transition: border-color .2s, box-shadow .2s;
}
.ltr-field select {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #d5d5d5;
	border-radius: 10px;
	font-size: 16px;
	background: #fff;
	font-family: inherit;
	transition: border-color .2s, box-shadow .2s;
}
.ltr-field select:focus {
	outline: none;
	border-color: var(--ltr-color, #25D366);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ltr-color) 18%, transparent);
}
.ltr-field select.ltr-service-locked {
	background: #f3f4f6;
	color: #555;
	cursor: not-allowed;
}
.ltr-field input:focus {
	outline: none;
	border-color: var(--ltr-color, #25D366);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ltr-color) 18%, transparent);
}
.ltr-field input.ltr-invalid {
	border-color: #e02424;
	box-shadow: 0 0 0 3px rgba(224, 36, 36, .12);
}

.ltr-submit-btn {
	width: 100%;
	padding: 13px;
	border: none;
	border-radius: 10px;
	background: var(--ltr-color, #2563eb);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity .2s;
}
.ltr-submit-btn:hover { opacity: .9; }
.ltr-submit-btn:disabled { opacity: .6; cursor: wait; }

.ltr-form-msg {
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	display: none;
}
.ltr-form-msg.ltr-ok    { display: block; background: #e7f7ec; color: #1a7a3d; }
.ltr-form-msg.ltr-error { display: block; background: #fdeaea; color: #b5322c; }

/* در صفحه‌های خیلی باریک، فرم جمع‌وجورتر شود */
@media (max-width: 360px) {
	.ltr-lead-form { border-radius: 10px; }
	.ltr-field { margin-bottom: 10px; }
	.ltr-field input, .ltr-field select, .ltr-submit-btn { padding: 10px 12px; }
}

/* ===========================================================
   پاپ‌آپ موفقیت (Modal)
   =========================================================== */
.ltr-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .55);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
	box-sizing: border-box;
}
.ltr-popup-overlay.ltr-open { opacity: 1; visibility: visible; }

.ltr-popup-box {
	position: relative;
	width: 100%;
	max-width: 400px;
	background: #fff;
	border-radius: 16px;
	padding: 32px 24px 24px;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	transform: translateY(16px) scale(.96);
	transition: transform .28s cubic-bezier(.34, 1.56, .64, 1);
	box-sizing: border-box;
	font-family: inherit;
}
.ltr-popup-overlay.ltr-open .ltr-popup-box { transform: translateY(0) scale(1); }

.ltr-popup-close {
	position: absolute;
	top: 10px;
	inset-inline-end: 14px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 0;
}
.ltr-popup-close:hover { color: #333; }

.ltr-popup-icon {
	width: 68px;
	height: 68px;
	margin: 0 auto 16px;
}
.ltr-popup-icon svg { width: 100%; height: 100%; }
.ltr-popup-icon circle { stroke: var(--ltr-color, #25D366); stroke-width: 2; }
.ltr-popup-icon path {
	stroke: var(--ltr-color, #25D366);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: ltr-check .4s .2s ease forwards;
}
@keyframes ltr-check { to { stroke-dashoffset: 0; } }

.ltr-popup-title {
	margin: 0 0 10px;
	font-size: 20px;
	color: #1a1a1a;
}
.ltr-popup-text {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.8;
	color: #555;
}
.ltr-popup-text p { margin: 0 0 8px; }
.ltr-popup-ok {
	min-width: 140px;
	padding: 11px 24px;
	border: none;
	border-radius: 10px;
	background: var(--ltr-color, #25D366);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
}
.ltr-popup-ok:hover { opacity: .9; }

@media (max-width: 480px) {
	.ltr-popup-box { padding: 26px 18px 20px; border-radius: 14px; }
	.ltr-popup-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	.ltr-popup-icon path { animation: none; stroke-dashoffset: 0; }
	.ltr-popup-box { transition: none; }
}
