/* ============================================================
   NabzTour — موتور تور راهنمای گام‌به‌گام (self-hosted, no CDN)
   طراحی‌شده برای نبض‌بازار · RTL · موبایل bottom-sheet
   رنگ لهجه با متغیر --nt-accent در هر صفحه تنظیم می‌شود.
   ============================================================ */
:root{
  --nt-accent:#2563eb;
  --nt-accent-ink:#1d4ed8;
  --nt-accent-soft:#eef4ff;
  --nt-veil:rgba(15,23,42,.60);
  --nt-radius:16px;
}

/* ریشهٔ تور — بالاتر از همه‌چیز (dراور مدیریت، مودال‌ها و…) */
.nt-root{
  position:fixed; inset:0; z-index:2147483000;
  font-family:'Vazirmatn FD NL','Vazirmatn-FD-NL','Vazirmatn',Tahoma,sans-serif;
  direction:rtl;
}
.nt-root *{ box-sizing:border-box; }

/* لایهٔ گیرندهٔ کلیک — تعامل با صفحه را حین تور می‌بندد */
.nt-catch{
  position:fixed; inset:0; z-index:1;
  background:transparent; cursor:default;
}
.nt-catch.nt-dark{ background:var(--nt-veil); }

/* اسپاتلایت — پنجرهٔ روشن روی المان هدف با تاریک‌کردن اطراف */
.nt-spot{
  position:fixed; z-index:2; pointer-events:none;
  border-radius:14px;
  box-shadow:0 0 0 9999px var(--nt-veil),
             0 0 0 3px rgba(255,255,255,.9) inset,
             0 0 0 4px var(--nt-accent);
  transition:all .32s cubic-bezier(.4,0,.2,1);
  opacity:0;
}
.nt-spot.nt-on{ opacity:1; }
/* پالس ملایم دور اسپاتلایت */
.nt-spot::after{
  content:''; position:absolute; inset:-4px; border-radius:16px;
  box-shadow:0 0 0 0 rgba(37,99,235,.45);
  animation:nt-pulse 2s ease-out infinite;
}
@keyframes nt-pulse{
  0%{ box-shadow:0 0 0 0 color-mix(in srgb,var(--nt-accent) 45%,transparent); }
  70%{ box-shadow:0 0 0 14px transparent; }
  100%{ box-shadow:0 0 0 0 transparent; }
}

/* حباب راهنما */
.nt-pop{
  position:fixed; z-index:3; width:min(360px,calc(100vw - 28px));
  background:#fff; border-radius:var(--nt-radius);
  box-shadow:0 18px 50px -12px rgba(15,23,42,.42),0 6px 18px -8px rgba(15,23,42,.28);
  border:1px solid #eef2f7;
  opacity:0; transform:translateY(6px) scale(.98);
  transition:opacity .22s ease,transform .22s ease;
  overflow:hidden;
}
.nt-pop.nt-on{ opacity:1; transform:none; }

/* نوار پیشرفت بالای حباب */
.nt-prog{ height:4px; background:var(--nt-accent-soft); position:relative; }
.nt-prog i{
  position:absolute; inset-inline-start:0; top:0; bottom:0;
  background:linear-gradient(90deg,var(--nt-accent),var(--nt-accent-ink));
  border-radius:0 3px 3px 0; transition:width .35s ease; width:0;
}

.nt-in{ padding:16px 16px 13px; }

.nt-head{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.nt-badge{
  display:inline-flex; align-items:center; gap:5px;
  background:var(--nt-accent-soft); color:var(--nt-accent-ink);
  font-size:11px; font-weight:800; padding:4px 9px; border-radius:999px;
  white-space:nowrap; letter-spacing:.2px;
}
.nt-badge svg{ width:13px; height:13px; }
.nt-count{ margin-inline-start:auto; font-size:11.5px; font-weight:700; color:#94a3b8; white-space:nowrap; }

.nt-x{
  position:absolute; inset-inline-end:9px; top:9px; z-index:4;
  width:28px; height:28px; border:none; background:#f1f5f9; color:#64748b;
  border-radius:9px; cursor:pointer; font-size:17px; line-height:1;
  display:grid; place-items:center; transition:.15s;
}
.nt-x:hover{ background:#e2e8f0; color:#0f172a; }

.nt-title{ margin:0; font-size:16px; font-weight:900; color:#0f172a; line-height:1.5; }
.nt-body{ margin:7px 0 0; font-size:13.5px; line-height:1.95; color:#475569; }
.nt-body b{ color:#0f172a; font-weight:800; }
.nt-body .nt-hi{ color:var(--nt-accent-ink); font-weight:800; }
.nt-body ul{ margin:8px 0 0; padding-inline-start:18px; }
.nt-body li{ margin:3px 0; }

.nt-foot{ display:flex; align-items:center; gap:10px; margin-top:14px; }
.nt-dots{ display:flex; gap:5px; flex:1; flex-wrap:wrap; }
.nt-dot{ width:7px; height:7px; border-radius:999px; background:#dbe3ec; transition:.2s; cursor:pointer; }
.nt-dot.nt-done{ background:var(--nt-accent); opacity:.5; }
.nt-dot.nt-cur{ background:var(--nt-accent); width:20px; }

.nt-nav{ display:flex; align-items:center; gap:7px; }
.nt-btn{
  font-family:inherit; font-size:13px; font-weight:800; cursor:pointer;
  border-radius:10px; padding:9px 15px; border:1px solid transparent;
  transition:.15s; white-space:nowrap; display:inline-flex; align-items:center; gap:5px;
}
.nt-btn:active{ transform:translateY(1px); }
.nt-next{ background:var(--nt-accent); color:#fff; }
.nt-next:hover{ background:var(--nt-accent-ink); }
.nt-prev{ background:#fff; color:#475569; border-color:#e2e8f0; }
.nt-prev:hover{ background:#f8fafc; }
.nt-skip{ background:transparent; color:#94a3b8; padding:9px 6px; }
.nt-skip:hover{ color:#ef4444; }
.nt-hidden{ display:none !important; }

/* دکمهٔ شناور «راهنما» */
.nt-fab{
  position:fixed; inset-block-end:18px; inset-inline-start:18px; z-index:2147482000;
  display:inline-flex; align-items:center; gap:7px;
  background:var(--nt-accent); color:#fff; border:none; cursor:pointer;
  font-family:'Vazirmatn FD NL','Vazirmatn-FD-NL','Vazirmatn',Tahoma,sans-serif;
  font-size:13px; font-weight:800; padding:11px 15px; border-radius:999px;
  box-shadow:0 10px 26px -8px color-mix(in srgb,var(--nt-accent) 60%,transparent),0 3px 10px rgba(15,23,42,.18);
  transition:.18s; direction:rtl;
}
.nt-fab:hover{ filter:brightness(1.06); transform:translateY(-1px); }
.nt-fab svg{ width:17px; height:17px; }
.nt-fab .nt-fab-lbl{ display:inline; }
/* نشان قرمز «جدید» برای کاربرانی که هنوز تور را ندیده‌اند */
.nt-fab.nt-new::after{
  content:''; position:absolute; top:-3px; inset-inline-end:-3px;
  width:12px; height:12px; border-radius:999px; background:#ef4444; border:2px solid #fff;
  animation:nt-blink 1.4s ease-in-out infinite;
}
@keyframes nt-blink{ 0%,100%{ transform:scale(1); opacity:1 } 50%{ transform:scale(1.25); opacity:.75 } }

/* ── موبایل: حباب به‌صورت شیت پایین صفحه ── */
@media (max-width:640px){
  .nt-pop{
    inset-inline:0 !important; inset-block-end:0 !important; top:auto !important;
    width:100% !important; border-radius:20px 20px 0 0;
    transform:translateY(14px);
    box-shadow:0 -14px 40px -10px rgba(15,23,42,.4);
  }
  .nt-pop.nt-on{ transform:none; }
  .nt-in{ padding:16px 16px calc(14px + env(safe-area-inset-bottom,0px)); }
  .nt-foot{ margin-top:16px; }
  .nt-next,.nt-prev{ padding:11px 16px; font-size:13.5px; }
  .nt-fab .nt-fab-lbl{ display:none; }
  .nt-fab{ padding:12px; inset-block-end:16px; inset-inline-start:14px; }
}

@media (prefers-reduced-motion:reduce){
  .nt-spot,.nt-pop,.nt-prog i{ transition:none; }
  .nt-spot::after,.nt-fab.nt-new::after{ animation:none; }
}
