/* 创建报价 - 选择产品弹窗：取消横向滚动，保证操作列可见 */
#qSelectProductModal .modal {
  width: min(1120px, calc(100vw - 56px)) !important;
  max-width: calc(100vw - 56px) !important;
}

#qSelectProductModal .modal-body {
  overflow-x: hidden !important;
}

#qSelectProductModal .modal-body > div:first-child {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  align-items: center;
}

#qSelectProductModal .modal-body table {
  width: 100%;
  table-layout: fixed;
}

#qSelectProductModal table th,
#qSelectProductModal table td {
  box-sizing: border-box;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

#qSelectProductModal table th:nth-child(1),
#qSelectProductModal table td:nth-child(1) {
  width: 17%;
}

#qSelectProductModal table th:nth-child(2),
#qSelectProductModal table td:nth-child(2) {
  width: 35%;
}

#qSelectProductModal table th:nth-child(3),
#qSelectProductModal table td:nth-child(3) {
  width: 23%;
}

#qSelectProductModal table th:nth-child(4),
#qSelectProductModal table td:nth-child(4) {
  width: 14%;
  text-align: right;
  white-space: nowrap !important;
}

#qSelectProductModal table th:nth-child(5),
#qSelectProductModal table td:nth-child(5) {
  width: 11%;
  text-align: center;
  white-space: nowrap !important;
}

#qSelectProductModal table td:nth-child(5) .btn {
  min-width: 56px;
  padding-left: 10px;
  padding-right: 10px;
}

@media (max-width: 760px) {
  #qSelectProductModal .modal {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

  #qSelectProductModal .modal-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  #qSelectProductModal .modal-body > div:first-child {
    grid-template-columns: 1fr;
  }

  #qSelectProductModal table th,
  #qSelectProductModal table td {
    padding-left: 6px;
    padding-right: 6px;
    font-size: 12px;
  }

  #qSelectProductModal table th:nth-child(3),
  #qSelectProductModal table td:nth-child(3) {
    display: none;
  }

  #qSelectProductModal table th:nth-child(1),
  #qSelectProductModal table td:nth-child(1) {
    width: 24%;
  }

  #qSelectProductModal table th:nth-child(2),
  #qSelectProductModal table td:nth-child(2) {
    width: 42%;
  }

  #qSelectProductModal table th:nth-child(4),
  #qSelectProductModal table td:nth-child(4) {
    width: 20%;
  }

  #qSelectProductModal table th:nth-child(5),
  #qSelectProductModal table td:nth-child(5) {
    width: 14%;
  }
}
