/* Estimate Search & Outcomes page (2026-10-15)
   Compact rows: tight fixed columns, smaller action buttons on one row,
   wrapping to two rows only when the screen is too narrow (iPad mini, small laptops). */

/* ---- Rows ---- */
.estimates-table th,
.estimates-table td{padding:6px 9px;vertical-align:middle}
.estimates-table th{white-space:nowrap}

/* Columns that only need to be as wide as their contents. This also removes
   the wide gap between Job # and Customer. */
.estimates-table th:nth-child(1),
.estimates-table th:nth-child(4),
.estimates-table th:nth-child(5),
.estimates-table th:nth-child(6),
#estimatesBody td.job-cell,
#estimatesBody td.col-fit{width:1%;white-space:nowrap}
#estimatesBody td.col-money{text-align:right}
.estimates-table th:nth-child(5){text-align:right}

/* ---- Job # cell ---- */
.job-cell-number,
.job-cell-version{display:block}
.job-cell-number{font-size:14px;line-height:1.2;color:#17365d}
.job-cell-version{margin-top:2px;font-size:11px;line-height:1.25;font-weight:600;color:#5b6f86}
.job-cell-pending{
  display:inline-block;margin-top:3px;padding:0 7px;border-radius:999px;
  background:#fff6e5;color:#8a5400;border:1px solid #f1d39a;
  font-size:10px;font-weight:700;line-height:1.6;white-space:nowrap
}

/* ---- Status cell ---- */
#estimatesBody .status-pill{padding:2px 8px;font-size:11px}

/* ---- Action buttons: smaller, one row when there is room ----
   The table gives the Actions column its one-row width when the screen is
   wide enough; on narrower screens the column shrinks and the buttons wrap. */
#estimatesBody .estimate-action-group{flex-wrap:wrap;gap:4px}
#estimatesBody .estimate-action-btn{min-height:28px;padding:5px 9px;font-size:12px;border-radius:5px}
#estimatesBody .estimate-action-status{font-size:11px}
/* Never let the buttons stack deeper than two rows: hold room for three
   buttons per row (View / Copy / Edit, then Sold / Lost). */
#estimatesBody td.actions-cell{min-width:330px}

/* Tablets / small laptops: trim padding, button size and header width so the
   table fits without sideways scrolling and buttons stay at two rows. */
@media (max-width:1300px){
  .estimates-table th,
  .estimates-table td{padding:6px 6px}
  .estimates-table th:nth-child(4){white-space:normal}
  #estimatesBody .estimate-action-btn{min-height:26px;padding:4px 7px;font-size:11px}
  #estimatesBody td.actions-cell{min-width:270px}
  .job-cell-pending{padding:0 5px;font-size:9.5px}
}
@media (max-width:1100px){
  #estimatesBody .estimate-action-btn{padding:4px 6px;font-size:10.5px}
  #estimatesBody .estimate-action-group{gap:3px}
  /* Let "Option B · Revision 0" and the pending tag wrap in a narrow Job # column. */
  #estimatesBody td.job-cell{white-space:normal;min-width:86px}
  .job-cell-pending{white-space:normal;border-radius:6px;padding:1px 5px;line-height:1.3}
  #estimatesBody td.actions-cell{min-width:258px}
}
@media (max-width:800px){
  .estimates-table th,
  .estimates-table td{padding:5px 4px}
  #estimatesBody td.actions-cell{min-width:240px}
}
