/* ==========================================================================
   سادات — پاپ‌آپ هوشمند «شروع پروژه» (مستقل از استایل صفحه‌ها)
   ========================================================================== */
.sw-overlay {
  --w-ink: #0d2a1e; --w-dim: #4a6558; --w-faint: #7b9185; --w-gold: #C8952E;
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(8,20,15,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
  font-family: 'Vazirmatn', system-ui, sans-serif; color: var(--w-ink); direction: rtl; text-align: right;
}
.sw-overlay.open { opacity: 1; pointer-events: auto; }
html.sw-lock { overflow: hidden; }
.sw-sheet {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 600px; max-height: 90vh; overflow: hidden;
  border-radius: 28px; border: 1px solid rgba(255,255,255,.9);
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(246,250,247,.9));
  backdrop-filter: blur(34px) saturate(190%); -webkit-backdrop-filter: blur(34px) saturate(190%);
  box-shadow: 0 40px 90px -30px rgba(6,22,16,.7), inset 0 1px 0 #fff;
  transform: translateY(24px) scale(.97); transition: transform .45s cubic-bezier(.16,1,.3,1);
}
.sw-overlay.open .sw-sheet { transform: none; }
.sw-close {
  position: absolute; top: 14px; inset-inline-start: 14px; z-index: 5; width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--w-ink);
  background: rgba(255,255,255,.8); border: 1px solid rgba(200,149,46,.35); transition: background .2s, border-color .2s;
}
.sw-close:hover { background: #fff; border-color: var(--w-gold); }
.sw-close svg { width: 15px; height: 15px; }
.sw-body { flex: 1; overflow-y: auto; scrollbar-width: none; }
.sw-body::-webkit-scrollbar { display: none; }
.sw-foot { flex: none; padding: 14px 24px; border-top: 1px solid rgba(200,149,46,.2); background: rgba(255,255,255,.7); }
.sw-foot:empty { display: none; }
.sw-sheet .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 800; border: 1px solid transparent; transition: transform .25s, box-shadow .25s, background .25s;
}
.sw-sheet .btn.primary { color: #1a1206; background: linear-gradient(135deg, #E9C36E 0%, #C8952E 55%, #B8841F 100%); box-shadow: 0 12px 26px -12px rgba(200,149,46,.7), inset 0 1px 0 rgba(255,255,255,.55); }
.sw-sheet .btn.primary:hover:not(:disabled) { transform: translateY(-2px); }
.sw-sheet .btn.primary:disabled { opacity: .6; cursor: default; }
.sw-sheet .btn.ghost { color: var(--w-ink); background: rgba(255,255,255,.6); border-color: rgba(200,149,46,.4); }

/* فیلدهای فرم */
.wiz-row { display: flex; flex-direction: column; gap: 14px; }
.wiz-field { display: flex; flex-direction: column; gap: 7px; }
.wiz-field label { font-size: 12.5px; font-weight: 700; color: var(--w-dim); }
.wiz-field input, .wiz-field textarea {
  width: 100%; padding: 12px 15px; border-radius: 12px; font: inherit; font-size: 14px; color: var(--w-ink); outline: none;
  background: rgba(255,255,255,.75); border: 1px solid rgba(200,149,46,.32); transition: border-color .2s, background .2s;
}
.wiz-field input:focus, .wiz-field textarea:focus { border-color: var(--w-gold); background: #fff; }
.wiz-field input::placeholder, .wiz-field textarea::placeholder { color: var(--w-faint); }
.wiz-field textarea { resize: none; min-height: 72px; line-height: 1.8; }
.wiz-ferr { display: none; font-size: 11.5px; color: #d05555; }
.wiz-field.invalid .wiz-ferr { display: block; }
.wiz-field.invalid input { border-color: #d05555; }
.wiz-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wiz-refnote { margin: 0 0 14px; padding: 9px 14px; border-radius: 10px; font-size: 12.5px; color: #8a6212; background: rgba(200,149,46,.12); border: 1px solid rgba(200,149,46,.3); }
.wiz-success { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 26px 0 14px; }
.wiz-success svg { width: 52px; height: 52px; color: var(--w-gold); }
.wiz-success h4 { margin: 0; font-size: 19px; font-weight: 900; }
.wiz-success p { margin: 0; font-size: 13.5px; line-height: 2; color: var(--w-dim); }

@media (max-width: 640px) {
  .sw-overlay { align-items: flex-end; padding: 0; }
  .sw-sheet { max-width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; transform: translateY(100%); }
  .sw-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- مراحل ویزارد ---------- */
.wiz { padding: 50px 24px 10px; } /* جای دکمه‌ی بستن */
.wiz-loading { padding: 50px 0; text-align: center; color: var(--w-dim); font-size: 13px; }
.wiz-progress { height: 5px; border-radius: 9px; background: rgba(13,42,30,.08); overflow: hidden; margin: 6px 0 14px; }
.wiz-progress i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #E9C36E, #C8952E); transition: width .5s cubic-bezier(.16,1,.3,1); }
.wiz-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--w-faint); margin-bottom: 14px; }
.wiz-stage { animation: wizIn .42s cubic-bezier(.16,1,.3,1) both; min-height: 280px; }
@keyframes wizIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.wiz h3 { font-size: 19px; font-weight: 900; line-height: 1.75; margin: 0 0 4px; }
.wiz .wiz-sub { font-size: 12.5px; color: var(--w-dim); margin: 0 0 18px; line-height: 1.85; }
.wiz-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wiz-svc {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: right; cursor: pointer;
  padding: 16px; border-radius: 18px; font: inherit; color: inherit;
  background: rgba(255,255,255,.62); border: 1px solid rgba(200,149,46,.26);
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .25s, background .25s, box-shadow .3s;
}
.wiz-svc:hover { transform: translateY(-3px); border-color: #C8952E; box-shadow: 0 14px 28px -18px rgba(13,42,30,.45); }
.wiz-svc.sel { border-color: #C8952E; background: linear-gradient(145deg, rgba(227,182,92,.30), rgba(255,255,255,.7)); }
.wiz-ic {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 13px; margin-bottom: 6px;
  color: #B8841F; background: linear-gradient(145deg, rgba(227,182,92,.32), rgba(200,149,46,.10)); border: 1px solid rgba(200,149,46,.28);
}
.wiz-ic svg { width: 20px; height: 20px; }
.wiz-svc b { font-size: 13.5px; font-weight: 800; line-height: 1.6; }
.wiz-svc small { font-size: 11px; line-height: 1.7; color: var(--w-dim); }
.wiz-opts { display: flex; flex-direction: column; gap: 9px; }
.wiz-opt {
  display: flex; align-items: center; gap: 12px; text-align: right; cursor: pointer; width: 100%;
  padding: 14px 16px; border-radius: 14px; font: inherit; font-size: 13.5px; color: inherit;
  background: rgba(255,255,255,.62); border: 1px solid rgba(200,149,46,.26);
  transition: border-color .2s, background .2s, transform .2s;
}
.wiz-opt:hover { border-color: #C8952E; transform: translateX(-2px); }
.wiz-opt .dot { flex: none; width: 19px; height: 19px; border-radius: 50%; border: 2px solid rgba(200,149,46,.55); background: #fff; transition: all .2s; }
.wiz-opt.multi .dot { border-radius: 6px; }
.wiz-opt.sel { border-color: #C8952E; background: linear-gradient(145deg, rgba(227,182,92,.26), rgba(255,255,255,.7)); font-weight: 700; }
.wiz-opt.sel .dot { background: #C8952E; border-color: #C8952E; box-shadow: inset 0 0 0 3px #fff; }
.wiz-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.wiz-chip { padding: 9px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 12.5px; color: inherit; background: rgba(255,255,255,.62); border: 1px solid rgba(200,149,46,.28); transition: all .2s; }
.wiz-chip.sel { background: linear-gradient(135deg, #E9C36E, #C8952E); border-color: transparent; color: #1a1206; font-weight: 700; }
.wiz-err { min-height: 18px; margin-top: 12px; font-size: 12px; color: #d05555; }
.wiz-nav { display: flex; gap: 10px; width: 100%; }
.wiz-nav .btn { flex: 1; justify-content: center; }
.wiz-nav .btn.ghost { flex: 0 0 auto; width: auto; min-width: 110px; }
@media (max-width: 520px) {
  .wiz { padding: 48px 16px 6px; }
  .wiz-grid { grid-template-columns: 1fr; gap: 8px; }
  .wiz-svc { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; row-gap: 0; align-items: center; padding: 12px 14px; }
  .wiz-svc .wiz-ic { grid-row: 1 / 3; margin: 0; }
  .wiz-svc b, .wiz-svc small { grid-column: 2; }
  .wiz h3 { font-size: 17px; }
}
