/* v684 - LIST on desktop / laptop (>=1025px): EVERY unit row is ONE line.
   Why: the table used to wrap long values (building name, "2 BHK + MAID ROOM", "165 SQM", "Buildi-ng", remarks ...) onto 2-5 lines
   and cut words in the middle, so rows were tall, uneven and hard to scan.
   What this file does (loaded LAST, desktop only - phones / iPad (<=1024px) are untouched):
     - no wrapping inside a body cell, no mid-word breaks; header labels are one line too
     - the type size follows the screen width (11px laptop -> 13px big monitor) and everything is vertically centred
     - js/332-list-oneline-desktop.js then measures each sheet and, ONLY when a sheet is still too wide, applies in this order:
         1) a little less side padding, 2) short wording ("2 BHK + Maid", "165 m2"), 3) a slightly smaller type (down to ~11px),
         4) a width cap on the long text columns (building / view / utilities / offer / remarks) with an ellipsis "..." and a hover tooltip.
       So the sheet always fits the screen, nothing sits on top of anything else, and nothing needs sideways scrolling.
   Variables set per sheet by the script: --ol-fs (type size) --ol-px (cell side padding) --ol-cap (max width of the long columns).
   Roll back: remove this file's <link> and js/332 <script> from index.html. */
@media (min-width:1025px){
  .avl-sheet{
    --ol-fs:clamp(11px,.88vw,13px);
    --ol-hfs:clamp(9.5px,.7vw,10.5px);
    --ol-px:9px;
    --ol-py:6px;
    --ol-cap:9999px;                    /* max width of the text columns; the script lowers it only when a sheet is still too wide */
    --ol-fl-b:96px; --ol-fl-o:176px; --ol-fl-x:70px;   /* floors: building / offer / other text columns never go below these (until the last-resort step) */
  }
  .avl-sheet .avl-table-wrap,.avl-table-wrap{overflow-x:hidden}
  .avl-sheet table.avl-table{width:100%;min-width:0;table-layout:auto;font-size:var(--ol-fs)}

  /* ---------- header: one line ---------- */
  .avl-sheet table.avl-table thead th{
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;word-break:normal;overflow-wrap:normal;hyphens:none;
    font-size:var(--ol-hfs);padding:8px var(--ol-px);line-height:1.2;vertical-align:middle;
  }

  /* ---------- body rows: one line, centred ---------- */
  .avl-sheet table.avl-table tbody tr.avl-row > td{
    white-space:nowrap;word-break:normal;overflow-wrap:normal;hyphens:none;
    padding:var(--ol-py) var(--ol-px);line-height:1.3;vertical-align:middle;font-size:var(--ol-fs);
  }
  /* the text columns may be capped (ellipsis) when a sheet is still too wide. The script marks them .ol-flex.
     Unit number (icons next to it), Rate, Status pill, Balcony, Size, Furniture and Booking Date are never capped. */
  .avl-sheet table.avl-table tbody tr.avl-row > td.ol-flex{overflow:hidden;text-overflow:ellipsis;max-width:max(var(--ol-cap),var(--ol-fl-x))}
  .avl-sheet table.avl-table thead th.ol-flex{max-width:max(var(--ol-cap),var(--ol-fl-x))}
  .avl-sheet table.avl-table tbody tr.avl-row > td.ol-flex.avl-col-building,
  .avl-sheet table.avl-table thead th.ol-flex.avl-col-building{max-width:max(var(--ol-cap),var(--ol-fl-b))}
  .avl-sheet table.avl-table tbody tr.avl-row > td.ol-flex.avl-col-offer,
  .avl-sheet table.avl-table thead th.ol-flex.avl-col-offer{max-width:max(var(--ol-cap),var(--ol-fl-o))}
  /* last resort (freak-long data on a small screen): the floors drop too, so the sheet can never be wider than the screen */
  .avl-sheet.ol-hard{--ol-fl-b:60px;--ol-fl-o:96px;--ol-fl-x:44px}

  /* old fixed / minimum widths from earlier versions must not push the table wider than the screen */
  .avl-sheet table.avl-table th.avl-col-building,.avl-sheet table.avl-table td.avl-col-building,
  .avl-sheet table.avl-table th.avl-col-unit,.avl-sheet table.avl-table td.avl-col-unit,
  .avl-sheet table.avl-table th.avl-col-offer,.avl-sheet table.avl-table td.avl-col-offer,
  .avl-sheet table.avl-table th.avl-col-util,.avl-sheet table.avl-table td.avl-col-util,
  .avl-sheet table.avl-table th.avl-col-remarks,.avl-sheet table.avl-table td.avl-col-remarks{min-width:0;width:auto}
  .avl-sheet table.avl-table th.avl-col-select,.avl-sheet table.avl-table td.avl-col-select{width:34px;min-width:34px;padding-left:8px;padding-right:2px}
  .avl-sheet table.avl-table th.avl-col-expand,.avl-sheet table.avl-table td.avl-col-expand{width:32px;min-width:32px;padding-left:3px;padding-right:3px}

  /* unit number: text + (diamond) + (viewings count) side by side, never stacked */
  .avl-sheet table.avl-table td.avl-col-unit{white-space:nowrap}
  .avl-sheet table.avl-table td.avl-col-unit > *{vertical-align:middle}
  /* offer chips (price chip + "1M free" chip) stay on one line */
  .avl-sheet table.avl-table td.avl-col-offer{white-space:nowrap}
  .avl-sheet table.avl-table td.avl-col-offer .avl-offer-chip{white-space:nowrap;max-width:100%;font-size:calc(var(--ol-fs) - .5px);padding:2px 8px;line-height:1.25;vertical-align:middle}
  /* status pill: one line, a touch smaller than the cell text */
  .avl-sheet table.avl-table .avl-status-badge{white-space:nowrap;font-size:calc(var(--ol-fs) - 2px)}

  /* ---------- short wording (set by the script, shown only while the sheet carries .ol-abbr) ----------
     The real text stays in the page (search, copy, screen readers); only what is DRAWN changes. */
  .avl-sheet.ol-abbr table.avl-table tbody tr.avl-row > td[data-ol-s]{font-size:0 !important;line-height:0}
  .avl-sheet.ol-abbr table.avl-table tbody tr.avl-row > td[data-ol-s]::after{
    content:attr(data-ol-s);font-size:var(--ol-fs);line-height:1.3;
  }
}
