/* بطاقات الأسئلة — مشتركة بين نموذج العروض وتعديل العرض ومعاينة منشئ النموذج */
.section { padding: 18px; display: grid; gap: 14px; }
.section-title { font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.section-title .i { color: var(--blue-600); }
.opt { font-weight: 500; color: var(--faint); font-size: 14px; }
.err-msg { color: var(--red-600); font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.area-search { margin-bottom: 4px; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; padding: 2px; }
.area-grid .chip { justify-content: center; border-radius: var(--r); }
.counter { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.counter .label { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--line-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo button { position: absolute; top: 6px; inset-inline-end: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(6,31,63,.75); color: #fff; display: grid; place-items: center; }
.photo-add { aspect-ratio: 1; border: 2px dashed var(--blue-300); border-radius: var(--r); background: var(--blue-50); color: var(--blue-700); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 15px; cursor: pointer; }
.photo-add .i { width: 30px; height: 30px; }
.photo-add input { display: none; }
.q-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--orange-50); border: 1px solid #f9d3ad; color: var(--orange-700); font-weight: 600; font-size: 15px; line-height: 1.5; }
.q-note .i { flex: none; margin-top: 2px; }
.price-mode { display: flex; width: 100%; }
.price-mode button { flex: 1; padding: 10px 12px; font-size: 15px; }
.price-calc:empty { display: none; }
.price-calc { padding: 10px 14px; border-radius: var(--r); background: var(--blue-50); color: var(--blue-900); font-size: 15px; }
.price-calc b { font-size: 17px; }
.hint.human { color: var(--blue-700); font-weight: 600; margin-top: -4px; }
.hint.human:empty { display: none; }

/* ---------- خريطة تحديد الموقع ---------- */
.mp { display: grid; gap: 10px; }
.mp-search { position: relative; z-index: 3; }
.mp-input { height: 50px; }
.mp-results { position: absolute; top: calc(100% + 6px); inset-inline: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); max-height: 300px; overflow: auto; padding: 4px; }
.mp-res { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 8px; text-align: start; }
.mp-res:hover, .mp-res:focus-visible { background: var(--blue-50); }
.mp-res .i { color: var(--blue-600); margin-top: 3px; }
.mp-res b { display: block; font-weight: 600; font-size: 15px; }
.mp-res small { color: var(--muted); font-size: 13px; }
.mp-res-msg { display: flex; gap: 8px; align-items: center; padding: 12px; color: var(--muted); font-size: 14px; }

.mp-frame { position: relative; z-index: 0; height: 320px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #e9eef3; isolation: isolate; }
.mp-map { position: absolute; inset: 0; touch-action: none; }
.mp-map .leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.75); }
.mp-map .leaflet-bar a { width: 38px; height: 38px; line-height: 38px; font-size: 20px; color: var(--ink); }
.mp-map .leaflet-bar { border: 0; box-shadow: 0 1px 4px rgba(10,44,87,.25); border-radius: 10px; overflow: hidden; }

/* الدبوس ثابت في المنتصف — الخريطة تتحرك تحته */
.mp-pin { position: absolute; left: 50%; top: 50%; width: 40px; height: 52px; margin: -52px 0 0 -20px; color: var(--orange-500); z-index: 500; pointer-events: none; transition: transform .18s cubic-bezier(.2,.8,.3,1); filter: drop-shadow(0 3px 4px rgba(6,31,63,.35)); }
.mp-pin svg { display: block; }
.mp-pin-shadow { position: absolute; left: 50%; bottom: -4px; width: 12px; height: 5px; margin-left: -6px; border-radius: 50%; background: rgba(6,31,63,.35); transition: transform .18s, opacity .18s; }
.mp.is-moving .mp-pin { transform: translateY(-10px); }
.mp.is-moving .mp-pin-shadow { transform: translateY(10px) scale(.7); opacity: .5; }
.mp:not(.is-picked) .mp-pin { color: var(--blue-600); }

.mp-tools { position: absolute; top: 10px; left: 10px; z-index: 600; display: flex; gap: 8px; direction: ltr; }
.mp-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 40px; justify-content: center; padding: 0 12px; border-radius: 10px; border: 0; background: #fff; color: var(--ink); font-weight: 600; font-size: 13.5px; box-shadow: 0 1px 4px rgba(10,44,87,.25); }
.mp-btn:hover { background: var(--blue-50); }
.mp-locate { padding: 0; width: 40px; color: var(--blue-600); }
.mp-locate.busy .i { animation: spin .9s linear infinite; }
.mp.is-sat .mp-layer { background: var(--blue-700); color: #fff; }

.mp-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); z-index: 400; background: #e9eef3; font-size: 14px; }
.mp-spin { width: 18px; height: 18px; border: 2.5px solid var(--blue-200); border-top-color: var(--blue-600); border-radius: 50%; animation: spin .7s linear infinite; flex: none; }

.mp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
.mp-hint, .mp-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.mp-hint { color: var(--muted); }
.mp-hint .i { color: var(--blue-500); margin-top: 2px; }
.mp-ok { color: var(--green-600); font-weight: 600; }
.mp-ok .i { margin-top: 2px; }
.mp-ok small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }

.mp-static { position: relative; z-index: 0; isolation: isolate; height: 260px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #e9eef3; }
.mp-marker { background: none; border: 0; filter: drop-shadow(0 3px 4px rgba(6,31,63,.35)); }

@media (max-width: 480px) { .mp-frame { height: 300px; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* سؤال رفع ملف */
.file-picked { display: grid; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--blue-50); }
.file-row .i { color: var(--red-600); flex: none; }
.file-row .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-row small { color: var(--muted); white-space: nowrap; }
.file-row button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #fff; color: var(--ink-2); display: grid; place-items: center; flex: none; }
.file-row button:hover { background: var(--red-100); color: var(--red-600); }
.file-add { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; border: 2px dashed var(--blue-300); border-radius: var(--r); background: var(--blue-50); color: var(--blue-700); font-weight: 600; cursor: pointer; }
.file-add:hover { border-color: var(--blue-500); }
.file-add input { display: none; }

/* "أخرى": حقل الكتابة يظهر تحت الخيارات */
.other-wrap { margin-top: 10px; }
.other-wrap.hide { display: none; }

/* التفاوض في مربع مستقل */
.nego-card { border: 2px solid var(--orange-200, #fed7aa); background: var(--orange-50, #fff7ed); }
.nego-card .section-title { display: flex; align-items: center; gap: 8px; color: var(--orange-700, #c2410c); }
.nego-card .switch { font-size: 17px; font-weight: 600; }
/* وحدة المساحة: متر مربع / هكتار */
.unit-seg { margin-bottom: 10px; }
