/* Orders table density and column-fit overlay. Visual rules only. */
.gm-ord-ops {
  --gm-tbl-pad-y: 10px;
  --gm-tbl-pad-x: 7px;
  --gm-tbl-head-h: 44px;
  --gm-tbl-row-min: 64px;
  --gm-tbl-row-gap: 4px;
}

.gm-ord-ops .orders-desktop-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.gm-ord-ops .orders-desktop-scroll table {
  width: 100% !important;
  min-width: 1516px !important;
  table-layout: fixed !important;
}

.gm-ord-ops .orders-desktop-scroll table thead th {
  height: 44px !important;
  padding: 8px 7px !important;
}

.gm-ord-ops .orders-desktop-scroll table tbody td {
  height: 64px !important;
  padding: 10px 7px !important;
  line-height: 1.3 !important;
  border-bottom-width: 4px !important;
}

.gm-ord-ops .orders-desktop-scroll table tbody td > p + p,
.gm-ord-ops .orders-desktop-scroll table tbody td > span + span,
.gm-ord-ops .orders-desktop-scroll table tbody td > p + span,
.gm-ord-ops .orders-desktop-scroll table tbody td .mt-1,
.gm-ord-ops .orders-desktop-scroll table tbody td .mt-1\.5 {
  margin-top: 3px !important;
}

/* Actual desktop order: select, risk, order, customer, phone, city,
   delivery rate, product, pieces, assignee, status, claim, COD, actions. */
.gm-ord-ops .orders-desktop-scroll table th:nth-child(1),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(1) { width: 36px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(2),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(2) { width: 24px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(3),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(3) { width: 120px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(4),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(4) { width: 180px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(5),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(5) { width: 112px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(6),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(6) { width: 80px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(7),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(7) { width: 128px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(8),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(8) { width: 260px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(9),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(9) { width: 50px !important; text-align: center; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(10),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(10) { width: 120px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(11),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(11) { width: 105px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(12),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(12) { width: 80px !important; }
.gm-ord-ops .orders-desktop-scroll table th:nth-child(13),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(13) { width: 85px !important; }
.gm-ord-ops .orders-desktop-scroll table th:last-child,
.gm-ord-ops .orders-desktop-scroll table td:last-child {
  width: 144px !important;
  min-width: 144px !important;
  padding-inline: 6px !important;
}

.gm-ord-ops .orders-desktop-scroll table td:nth-child(4),
.gm-ord-ops .orders-desktop-scroll table td:nth-child(8) {
  overflow-wrap: break-word;
  white-space: normal !important;
}

.gm-ord-ops .orders-desktop-scroll table td:nth-child(4) .truncate,
.gm-ord-ops .orders-desktop-scroll table td:nth-child(8) .truncate {
  max-width: 100% !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.gm-ord-ops .orders-desktop-scroll table td:nth-child(5) {
  white-space: nowrap !important;
}

.gm-ord-ops .orders-desktop-scroll table tbody td.gm-col-fill .truncate,
.gm-ord-ops .orders-desktop-scroll table tbody td p.truncate {
  max-width: 100% !important;
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"] {
  --rate-accent: #60a5fa;
  --rate-surface: rgba(37, 99, 235, 0.12);
  position: relative;
  width: 116px;
  min-width: 116px !important;
  max-width: 116px !important;
  min-height: 52px;
  padding: 8px 9px 7px 12px !important;
  overflow: hidden;
  background: linear-gradient(115deg, var(--rate-surface), rgba(10, 23, 43, 0.9) 72%) !important;
  border: 1px solid color-mix(in srgb, var(--rate-accent) 32%, transparent) !important;
  border-radius: 8px !important;
  box-shadow: inset 3px 0 0 var(--rate-accent), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  color: #f8fafc !important;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"]:has(> div span[style*="52, 211, 153"]) {
  --rate-accent: #34d399;
  --rate-surface: rgba(5, 150, 105, 0.18);
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"]:has(> div span[style*="245, 158, 11"]) {
  --rate-accent: #fbbf24;
  --rate-surface: rgba(217, 119, 6, 0.18);
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"]:has(> div span[style*="244, 63, 94"]) {
  --rate-accent: #fb7185;
  --rate-surface: rgba(225, 29, 72, 0.18);
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"]:has(> div span[style*="125, 211, 252"]) {
  --rate-accent: #7dd3fc;
  --rate-surface: rgba(14, 116, 144, 0.18);
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"]:has(> div span[style*="100, 116, 139"]) {
  --rate-accent: #94a3b8;
  --rate-surface: rgba(71, 85, 105, 0.2);
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"]:hover {
  border-color: color-mix(in srgb, var(--rate-accent) 60%, transparent) !important;
  transform: translateY(-1px);
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"] > div:first-child {
  min-height: 18px;
  gap: 6px !important;
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"] > div:first-child > span:first-child {
  width: 6px !important;
  height: 6px !important;
  background: var(--rate-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rate-accent) 14%, transparent);
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"] > div:first-child > span:last-child {
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  color: #f8fafc !important;
}

.gm-ord-ops .orders-desktop-scroll [data-gm="bosta-rate"] > div:nth-child(2) {
  margin-top: 5px !important;
  overflow: hidden;
  color: #aebed2 !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.gm-ord-ops .orders-desktop-scroll table [role="combobox"],
.gm-ord-ops .orders-desktop-scroll table select {
  width: 100%;
  min-width: 0 !important;
  min-height: 32px;
}

@media (max-width: 1279px) {
  .gm-ord-ops .orders-desktop-scroll table {
    min-width: 1524px !important;
  }
}
