/* ==========================================================================
   استعلام کرایه — ظاهر صفحه
   --------------------------------------------------------------------------
   فونت‌ها، رنگ‌ها و هدر از style.css خودِ سایت می‌آیند؛ اینجا فقط چیزهایی
   هست که مخصوص همین صفحه است. همهٔ کلاس‌ها با fq- شروع می‌شوند تا با
   کلاس‌های سایت (.hero، .card، .brand و …) قاطی نشوند.
   ========================================================================== */

.fq {
  --fq-surface: #ffffff;
  --fq-surface-2: #f7f8fa;
  --fq-line: #e4e6eb;
  --fq-field: #ffffff;
  --fq-live: #17a67f;
  --fq-shadow: 0 24px 50px -30px rgba(35, 35, 35, 0.35);
  --fq-radius: 18px;

  position: relative;
  z-index: 1;
  display: block;
  padding-bottom: 64px;
}

html[data-theme="dark"] .fq {
  --fq-surface: #1b1b1b;
  --fq-surface-2: #151515;
  --fq-line: #383636;
  --fq-field: #101010;
  --fq-live: #37d0b0;
  --fq-shadow: 0 24px 50px -26px rgba(0, 0, 0, 0.75);
}

.fq-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- پس‌زمینه ---------- */
.fq-deco { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fq-deco span { position: absolute; display: block; }
.fq-deco .fq-tint {
  inset: 0;
  background:
    linear-gradient(160deg, rgba(252, 184, 20, 0.07), transparent 42%),
    radial-gradient(1200px 600px at 85% -10%, rgba(239, 90, 60, 0.07), transparent 60%);
}
.fq-deco .fq-dots {
  inset: 0;
  background-image: radial-gradient(rgba(67, 69, 77, 0.10) 1.3px, transparent 1.3px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}
html[data-theme="dark"] .fq-deco .fq-dots {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1.3px, transparent 1.3px);
}
.fq-deco .fq-glow { width: 520px; height: 520px; border-radius: 50%; filter: blur(120px); opacity: 0.14; }
.fq-deco .fq-glow.a { background: var(--accent); top: -190px; left: -130px; }
.fq-deco .fq-glow.b { background: var(--primary); bottom: -230px; right: -150px; }

/* ---------- سرصفحه ---------- */
.fq-hero { padding: 40px 0 8px; text-align: center; }
.fq-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; line-height: 1;
  color: var(--primary);
  background: rgba(239, 90, 60, 0.08);
  border: 1px solid rgba(239, 90, 60, 0.24);
  padding: 9px 16px; border-radius: 99px;
}
.fq-kicker svg { flex: none; }
.fq-hero h1 {
  font-family: "Meem", "YekanBakh", serif;
  font-size: clamp(25px, 4.2vw, 40px);
  font-weight: 800; line-height: 1.55;
  color: var(--heading);
  margin: 18px 0 10px;
  text-wrap: balance;
}
.fq-hero h1 em { font-style: normal; color: var(--accent); }
.fq-hero p { color: var(--muted); font-size: 15.5px; font-weight: 500; max-width: 46rem; margin: 0 auto; }

/* ---------- جادهٔ متحرک ---------- */
/* overflow پنهان است تا جاده و کامیون که از دو طرف بیرون می‌زنند
   نوار افقی برای کل صفحه نسازند */
.fq-road { position: relative; height: 96px; margin-top: 26px; overflow: hidden; }
.fq-road .cargo {
  position: absolute; top: 0; right: 50%; transform: translateX(50%);
  display: flex; gap: 10px; font-size: 12px; color: var(--muted); white-space: nowrap;
}
.fq-road .cargo span {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--fq-surface); border: 1px solid var(--fq-line);
  padding: 6px 13px; border-radius: 99px;
}
.fq-road i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fq-road i.iron { background: linear-gradient(135deg, #b0bec5, #546e7a); }
.fq-road i.pellet { background: radial-gradient(circle at 35% 30%, #8d6e63, #3e2723); }
.fq-road .lane {
  position: absolute; bottom: 12px; left: -10%; width: 120%; height: 6px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--fq-line) 0 34px, transparent 34px 58px);
  animation: fq-lane 1.1s linear infinite;
}
@keyframes fq-lane { to { transform: translateX(-58px); } }

/* ---------- شبکهٔ اصلی ---------- */
.fq-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px; margin-top: 30px; align-items: start; }
.fq-card {
  background: linear-gradient(180deg, var(--fq-surface), var(--fq-surface-2));
  border: 1px solid var(--fq-line);
  border-radius: var(--fq-radius);
  box-shadow: var(--fq-shadow);
  padding: 22px;
}
.fq-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fq-card-head .ic {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  color: #fff; background: var(--primary);
}
.fq-card-head h2 { font-family: "Meem", "YekanBakh", serif; font-size: 17px; color: var(--heading); margin: 0; }
.fq-card-head p { font-size: 12.5px; color: var(--muted); font-weight: 500; margin: 3px 0 0; }

/* ---------- خط مسیر ---------- */
/*
 * فضای پایین برای نشانِ «فاصله و مدت سفر» باز گذاشته شده تا روی خط مسیر
 * ننشیند؛ وقتی مقصدی انتخاب نشده باشد، همان فضا خالی می‌ماند.
 */
.fq-route {
  display: flex; align-items: center; gap: 16px;
  background: var(--fq-surface-2); border: 1px solid var(--fq-line);
  border-radius: 14px; padding: 13px 18px 40px; margin-bottom: 20px;
}
.fq-route.is-plain { padding-bottom: 13px; }
.fq-route .node { display: flex; flex-direction: column; min-width: 0; }
.fq-route .node span { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.fq-route .node b {
  font-size: 15px; color: var(--heading); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* پیکان به سمت چپ است چون بار از مبدأ (راست) به مقصد (چپ) می‌رود */
.fq-route .arrow { flex: 1; min-width: 34px; height: 2px; background: var(--fq-line); position: relative; }
.fq-route .arrow::before {
  content: ""; position: absolute; left: -1px; top: -4px;
  border: 5px solid transparent; border-left-color: var(--primary);
}
.fq-route .arrow i {
  position: absolute; inset: 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  background-size: 42% 100%; background-repeat: no-repeat; background-position: 100% 0;
  animation: fq-flow 2.6s ease-in-out infinite;
}
/* جریان از راست (مبدأ) به چپ (مقصد) — هم‌جهت با پیکان */
@keyframes fq-flow { to { background-position: -42% 0; } }

/* ---------- فیلدها ---------- */
.fq-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fq-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fq-field > label { font-size: 13px; color: var(--muted); font-weight: 600; }
.fq-field > label b { color: var(--accent); font-weight: 700; }
.fq-hint { font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.8; }

.fq-ctl { position: relative; }
.fq-ctl input {
  width: 100%; font: inherit; font-size: 15px; font-weight: 600;
  font-family: "YekanBakh-FaNum", "YekanBakh", sans-serif;
  color: var(--heading); background: var(--fq-field);
  border: 1px solid var(--fq-line); border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.fq-ctl.has-unit input { padding-left: 52px; }
.fq-ctl input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(239, 90, 60, 0.15); }
.fq-ctl input::-webkit-outer-spin-button,
.fq-ctl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fq-ctl input[type="number"] { -moz-appearance: textfield; }
.fq-unit {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--muted); pointer-events: none;
}

/* تناژهای پرتکرار — روی موبایل تایپ نکردن یعنی خطای کمتر */
.fq-tons { display: flex; flex-wrap: wrap; gap: 6px; }
.fq-tons button {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--muted); background: var(--fq-surface-2);
  border: 1px solid var(--fq-line); border-radius: 99px; padding: 5px 13px;
  transition: 0.2s;
}
.fq-tons button:hover { color: var(--primary); border-color: rgba(239, 90, 60, 0.4); }
.fq-tons button[aria-pressed="true"] { color: #fff; background: var(--primary); border-color: var(--primary); }

/* ---------- منوی انتخاب ---------- */
.fq-combo { position: relative; }
.fq-combo select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.fq-combo-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: inherit; font-size: 15px; font-weight: 600; text-align: right; cursor: pointer;
  color: var(--heading); background: var(--fq-field);
  border: 1px solid var(--fq-line); border-radius: 12px;
  padding: 12px 14px; transition: border-color 0.2s, box-shadow 0.2s;
}
.fq-combo-btn:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(239, 90, 60, 0.15); }
.fq-combo-btn[aria-expanded="true"] { border-color: var(--primary); }
.fq-combo-btn.is-empty { color: var(--muted); font-weight: 500; }
.fq-combo-btn .chev { flex: none; color: var(--muted); transition: transform 0.2s; }
.fq-combo-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.fq-pop {
  position: absolute; z-index: 30; inset: calc(100% + 6px) 0 auto 0;
  background: var(--fq-surface); border: 1px solid var(--fq-line);
  border-radius: 14px; box-shadow: 0 20px 44px -20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: fq-pop 0.16s ease-out;
}
@keyframes fq-pop { from { opacity: 0; transform: translateY(-6px); } }
.fq-search { padding: 10px; border-bottom: 1px solid var(--fq-line); }
.fq-search input {
  width: 100%; font: inherit; font-size: 14px; color: var(--heading);
  background: var(--fq-field); border: 1px solid var(--fq-line);
  border-radius: 10px; padding: 9px 12px; outline: none;
}
.fq-search input:focus { border-color: var(--primary); }
.fq-list { max-height: 262px; overflow-y: auto; padding: 6px; margin: 0; list-style: none; scrollbar-width: thin; }
.fq-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14.5px; font-weight: 600; color: var(--text);
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.fq-list li .rate {
  font-family: "YekanBakh-FaNum", sans-serif; font-size: 12px;
  font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums;
}
.fq-list li[aria-selected="true"] { color: var(--primary); }
.fq-list li.is-active { background: rgba(239, 90, 60, 0.10); color: var(--primary); }
.fq-list li.is-active .rate { color: var(--primary); }
.fq-empty { padding: 18px 12px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- نوار نرخ‌ها ---------- */
.fq-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.fq-pill {
  font-size: 12px; font-weight: 500; color: var(--muted);
  background: var(--fq-surface-2); border: 1px solid var(--fq-line);
  padding: 7px 13px; border-radius: 99px;
}
.fq-pill b { color: var(--heading); font-family: "YekanBakh-FaNum", sans-serif; font-weight: 700; }

/* ---------- کارت نتیجه ---------- */
.fq-result { position: sticky; top: 20px; }
.fq-result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.fq-result-head h2 { display: flex; align-items: center; gap: 9px; font-family: "Meem", "YekanBakh", serif; font-size: 16px; color: var(--heading); }
.fq-live {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--fq-live); box-shadow: 0 0 0 0 rgba(23, 166, 127, 0.45);
  animation: fq-pulse 1.6s infinite;
}
@keyframes fq-pulse {
  70% { box-shadow: 0 0 0 9px rgba(23, 166, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 166, 127, 0); }
}
.fq-print {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--muted); background: transparent;
  border: 1px solid var(--fq-line); border-radius: 10px; padding: 7px 14px; transition: 0.2s;
}
.fq-print:hover { color: var(--primary); border-color: var(--primary); }

.fq-lines { display: flex; flex-direction: column; }
.fq-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; }
.fq-line + .fq-line { border-top: 1px dashed var(--fq-line); }
.fq-line .lbl { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.fq-line .lbl svg { color: var(--muted); flex: none; }
.fq-line.sub .lbl, .fq-line.sub .val { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.fq-line .val {
  font-family: "YekanBakh-FaNum", sans-serif; font-weight: 700; font-size: 14.5px;
  color: var(--heading); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.fq-line.total {
  margin-top: 6px; padding-top: 16px;
  border-top: 1px solid var(--fq-line);
}
.fq-line.total .lbl { font-size: 14.5px; color: var(--heading); font-weight: 700; }
.fq-line.total .val { font-size: 20px; color: var(--primary); }
.fq-line.total .val small { font-size: 12px; font-weight: 500; color: var(--muted); }
/* واحد پول کنار هر مبلغ، تا کسی عدد را به واحد دیگری نخواند */
.fq-line .val small { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-right: 2px; }

.fq-blank {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 30px 10px; text-align: center; font-size: 13.5px; line-height: 2; color: var(--muted);
}
.fq-blank svg { color: var(--fq-line); }
.fq-foot-note { margin-top: 16px; font-size: 11.5px; line-height: 2; color: var(--muted); text-align: center; }

/* ---------- ویژگی‌ها ---------- */
.fq-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.fq-feat {
  background: var(--fq-surface); border: 1px solid var(--fq-line);
  border-radius: 16px; padding: 20px; text-align: center;
}
.fq-feat .ic {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 13px;
  display: grid; place-items: center; font-size: 20px;
  background: rgba(252, 184, 20, 0.12); border: 1px solid rgba(252, 184, 20, 0.28);
}
.fq-feat h3 { font-family: "Meem", "YekanBakh", serif; font-size: 15px; color: var(--heading); margin-bottom: 8px; }
.fq-feat p { font-size: 12.5px; font-weight: 500; line-height: 2; color: var(--muted); margin: 0; }

.fq-updated { margin-top: 26px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------- فاصله و مدت سفر روی خط مسیر ---------- */
.fq-route .arrow .meta {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  background: var(--fq-surface); border: 1px solid var(--fq-line);
  padding: 4px 11px; border-radius: 99px;
}
.fq-route .arrow .meta b { color: var(--heading); font-family: "YekanBakh-FaNum", sans-serif; font-weight: 700; }
.fq-route .arrow .meta .sep { opacity: 0.45; }

/* ---------- یادآوری نوع ناوگان ---------- */
.fq-fleet:empty { display: none; }
.fq-fleet {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 16px; padding: 10px 13px;
  font-size: 12px; font-weight: 500; line-height: 1.9; color: var(--muted);
  background: rgba(252, 184, 20, 0.08);
  border: 1px solid rgba(252, 184, 20, 0.28);
  border-radius: 12px;
}
.fq-fleet::before { content: "⚑"; color: var(--accent); font-size: 14px; line-height: 1.6; }
.fq-result .fq-fleet { margin-top: 10px; text-align: right; }

/* ---------- اشتراک‌گذاری ---------- */
.fq-share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--fq-line);
}
.fq-share .lbl { font-size: 12px; color: var(--muted); margin-left: 2px; }
.fq-share-btn {
  width: 34px; height: 34px; flex: none; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  color: var(--muted); background: var(--fq-surface-2);
  border: 1px solid var(--fq-line); border-radius: 10px;
  transition: 0.2s;
}
.fq-share-btn:hover { color: var(--primary); border-color: rgba(239, 90, 60, 0.45); transform: translateY(-1px); }
.fq-share-btn.done { color: #fff; background: var(--fq-live); border-color: var(--fq-live); }
.fq-share-btn[aria-expanded="true"] { color: var(--primary); border-color: var(--primary); }

/* ارسال با پیامک */
.fq-sms { margin-top: 10px; }
.fq-sms-form { display: flex; gap: 8px; }
.fq-sms-input {
  flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px;
  font: inherit; font-size: 16px; text-align: right; color: inherit;
  background: var(--fq-surface-2); border: 1px solid var(--fq-line); border-radius: 10px;
}
.fq-sms-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(239, 90, 60, 0.15); }
.fq-sms-send {
  flex: none; height: 40px; padding: 0 16px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--primary); border: 0; border-radius: 10px;
}
.fq-sms-send[disabled] { opacity: 0.55; cursor: wait; }
.fq-sms-guest { margin: 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
.fq-sms-guest a { color: var(--primary); font-weight: 700; }
.fq-sms-msg { margin: 6px 0 0; font-size: 12.5px; line-height: 1.8; min-height: 1em; }
.fq-sms-msg.ok { color: var(--fq-live); }
.fq-sms-msg.err { color: #c62828; }

/* ---------- ریسپانسیو ---------- */
@media (max-width: 980px) {
  .fq-grid { grid-template-columns: 1fr; }
  .fq-result { position: static; }
  .fq-feats { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fq-wrap { padding: 0 14px; }
  .fq-hero { padding-top: 28px; }
  .fq-fields { grid-template-columns: 1fr; }
  .fq-card { padding: 18px 16px; }
  .fq-route { flex-wrap: nowrap; gap: 10px; padding: 12px 14px; }
}

/* حرکت کمتر برای کسانی که در سیستمشان خواسته‌اند */
@media (prefers-reduced-motion: reduce) {
  .fq-lane, .fq-route .arrow i, .fq-live, .fq-pop { animation: none; }
}

/* ---------- چاپ ---------- */
@media print {
  .site-header, .fq-deco, .fq-hero, .fq-feats, .fq-print, .fq-live,
  .fq-tons, .fq-share, .bottom-bar, .mobile-nav, .nav-overlay, .fq-updated { display: none !important; }
  body { padding: 0; background: #fff; }
  .fq-grid { grid-template-columns: 1fr; gap: 12px; }
  .fq-card { box-shadow: none; border-color: #ccc; background: #fff; }
  .fq-line .val, .fq-line .lbl { color: #111; }
  .fq-line.total .val { color: #b45309; }
}
