/* Version 3.97547: Customer Service mobile cards — semantic column targeting.
   Overrides fragile nth-child layouts after Edit/TMS columns + custom column order. */

@media (max-width: 720px) {
  html body #customerServiceView #customerServiceRows {
    display: grid !important;
    gap: 8px !important;
    width: 100% !important;
  }

  html body #customerServiceView .customer-service-load-table thead {
    display: none !important;
  }

  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row):not(.selected-load-detail-row):not(.customer-service-alert-detail-row) {
    display: grid !important;
    grid-template-columns: minmax(104px, 1fr) minmax(112px, 1.1fr) 34px 44px !important;
    grid-template-rows: auto auto !important;
    column-gap: 6px !important;
    row-gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 12px 12px !important;
    border: 1px solid #d7e0ea !important;
    border-left: 5px solid #8aa4bf !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 8px 18px rgba(31, 41, 55, .07) !important;
    overflow: visible !important;
  }

  html body #customerServiceView #customerServiceRows > tr.attention-row:not(.load-alert-detail-row):not(.load-detail-row) {
    border-left-color: #dc2626 !important;
  }

  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row):not(.selected-load-detail-row):not(.customer-service-alert-detail-row) > td {
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
  }

  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="select"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="edit"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="tmsPull"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="puDate"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="delDate"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="proNumber"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="pickupNumber"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="carrier"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="pickup"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="delivery"],
  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td.customer-service-optional-col {
    display: none !important;
  }

  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="status"] {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }

  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="loadNumber"] {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="alert"] {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 34px !important;
  }

  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="actions"] {
    grid-column: 4 !important;
    grid-row: 1 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 44px !important;
  }

  html body #customerServiceView #customerServiceRows > tr:not(.load-alert-detail-row):not(.load-detail-row) > td[data-customer-service-column="customer"] {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: block !important;
    text-align: center !important;
  }

  html body #customerServiceView #customerServiceRows .customer-service-desktop-customer {
    display: none !important;
  }

  html body #customerServiceView #customerServiceRows .mobile-customer-service-route {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #102033 !important;
  }

  html body #customerServiceView #customerServiceRows .cs-mobile-load-number {
    display: none !important;
  }

  html body #customerServiceView #customerServiceRows .status-pill-select {
    max-width: 118px !important;
    min-height: 30px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
  }

  html body #customerServiceView #customerServiceRows .customer-service-load-copy {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 30px !important;
    padding: 4px 10px !important;
    border: 1px solid #d7e0ea !important;
    border-radius: 999px !important;
    background: #fff !important;
  }

  html body #customerServiceView #customerServiceRows .customer-service-load-copy strong {
    font-size: 15px !important;
  }

  html body #customerServiceView #customerServiceRows .alert-icon-button,
  html body #customerServiceView #customerServiceRows .row-action-dot-button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  html body #customerServiceView #customerServiceRows > tr.load-detail-row,
  html body #customerServiceView #customerServiceRows > tr.selected-load-detail-row {
    display: none !important;
  }
}
