/* ماژول ارسال کالا: نقشه، پنل ارسال سفارش، صفحات تنظیمات و محموله‌ها */
/* کادر نقشه ایزوله است: کاشی‌ها و کنترل‌ها هرگز از آن بیرون نمی‌زنند و روی منو/پنل‌های دیگر نمی‌افتند. */
.ship-map { position: relative; width: 100%; overflow: hidden; isolation: isolate; contain: layout paint; z-index: 0;
  border-radius: 12px; border: 1px solid var(--line, #e5e7eb); background: #eef2f7; direction: ltr; }
/* استایل‌های عمومی پنل (img, max-width, ...) نباید روی کاشی‌ها اثر بگذارند. */
.ship-map img { max-width: none !important; max-height: none !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; }
.ship-map .leaflet-control-container { direction: ltr; }
.ship-map .leaflet-control-attribution { font-size: 10px; direction: ltr; }

.ship-panel { display: grid; gap: 12px; }
.ship-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ship-panel-head h3 { margin: 0; }
.ship-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .ship-grid { grid-template-columns: 1fr; } }
.ship-box { display: grid; gap: 8px; align-content: start; }
.ship-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ship-row > .grow { flex: 1 1 180px; min-width: 0; }
.ship-coord { direction: ltr; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #475569; }
.ship-note { font-size: 12px; color: #64748b; line-height: 1.8; }
.ship-warn { font-size: 12px; background: #fef3c7; color: #92400e; border-radius: 10px; padding: 6px 10px; }
.ship-ok { font-size: 12px; background: #dcfce7; color: #166534; border-radius: 10px; padding: 6px 10px; }
.ship-price { font-weight: 800; font-size: 15px; }

.ship-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #e0f2fe; color: #075985; white-space: nowrap; }
.ship-badge.is-success { background: #dcfce7; color: #166534; }
.ship-badge.is-danger { background: #fee2e2; color: #991b1b; }
.ship-badge.is-warning { background: #fef3c7; color: #92400e; }
.ship-badge.is-info { background: #e0f2fe; color: #075985; }
.ship-badge.is-muted { background: #f1f5f9; color: #64748b; }

.ship-shipments { display: grid; gap: 8px; }
.ship-shipment { border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.ship-shipment small { color: #64748b; }
.ship-events { margin: 0; padding: 0 16px 0 0; font-size: 12px; color: #475569; line-height: 1.9; }

.ship-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ship-card { border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 14px; display: grid; gap: 8px; background: var(--surface, #fff); }
.ship-card h4 { margin: 0; font-size: 15px; }
.ship-card p { margin: 0; font-size: 12px; color: #64748b; line-height: 1.8; }
.ship-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ship-form .wide { grid-column: 1 / -1; }
.ship-webhook { direction: ltr; font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 6px 8px; word-break: break-all; }

@media (prefers-color-scheme: dark) {
  .ship-coord, .ship-note, .ship-shipment small, .ship-card p { color: #94a3b8; }
  .ship-webhook { background: #0f172a; border-color: #334155; }
}

/* مشخصات هر ارسال (فیلدهای PerShipment) */
.ship-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 10px; }

/* ارسال گروهی در مدیریت سفارش‌ها */
.ship-bulk { padding: 12px 16px; margin-bottom: 14px; display: grid; gap: 10px; border: 1px dashed var(--line, #e5e7eb); }
.ship-bulk.is-active { border-style: solid; border-color: #9dbaf4; box-shadow: 0 10px 30px rgba(37, 99, 235, .08); }
.ship-bulk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ship-bulk-table td { vertical-align: top; }
.ship-bulk-table .select { min-width: 160px; }
.ship-progress { height: 6px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.ship-progress > div { height: 100%; background: #2563eb; transition: width .25s; }
.order-card { position: relative; }
.order-ship-select { position: absolute; top: 12px; left: 12px; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px; cursor: pointer; }
.order-ship-select input { width: 17px; height: 17px; cursor: pointer; }
.order-card.is-ship-selected { border-color: #2563eb; }
/* جا برای چک‌باکس ارسال گروهی تا روی محتوای سر کارت نیفتد */
.order-card > .order-card-head { padding-left: 46px; }
