/*
 LGFT v5.24.9 — Global Table Header/Column Alignment Lock
 Purpose: keep every operational/program table header aligned with its body cells, even
 when older mobile/table scripts, zoom, or manually-coded table markup are present.
 Screen only unless explicitly printed by existing print CSS.
*/
.table-wrap.lgft-table-align-host,
.table-scroll.lgft-table-align-host,
.table-responsive.lgft-table-align-host,
.datatable-wrap.lgft-table-align-host,
.datatable-container.lgft-table-align-host,
.report-table-wrap.lgft-table-align-host,
.data-table-wrap.lgft-table-align-host,
.lgft-table-align-host{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  border-radius:14px!important;
  -webkit-overflow-scrolling:touch!important;
}

/* Undo the old mobile rule that made normal tables display:block and split header/body geometry.
   True mobile card tables keep their card layout through the more specific rules below. */
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table),
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table){
  display:table!important;
  width:100%!important;
  max-width:none!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
  white-space:normal!important;
  overflow:visible!important;
}

table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) colgroup,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) colgroup{display:table-column-group!important;}
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) col,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) col{display:table-column!important;}
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) thead,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) thead{display:table-header-group!important;}
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) tbody,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) tbody{display:table-row-group!important;}
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) tfoot,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) tfoot{display:table-footer-group!important;}
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) tr,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) tr{display:table-row!important;}
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) th,
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) td,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) th,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) td{
  display:table-cell!important;
  box-sizing:border-box!important;
  vertical-align:top!important;
  padding:10px 12px!important;
  line-height:1.35!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  max-width:none!important;
  min-width:0!important;
}
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) th,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) th{
  text-align:left!important;
  vertical-align:middle!important;
  position:relative!important;
}

/* Numeric/accounting columns keep consistent right alignment across headers and cells. */
table.table.lgft-table-align-lock th.lgft-col-num,
table.table.lgft-table-align-lock td.lgft-col-num,
table.table.lgft-table-align-lock th.lgft-col-money,
table.table.lgft-table-align-lock td.lgft-col-money,
table.table.lgft-table-align-lock th.right,
table.table.lgft-table-align-lock td.right,
table.lgft-data-table.lgft-table-align-lock th.lgft-col-num,
table.lgft-data-table.lgft-table-align-lock td.lgft-col-num,
table.lgft-data-table.lgft-table-align-lock th.lgft-col-money,
table.lgft-data-table.lgft-table-align-lock td.lgft-col-money,
table.lgft-data-table.lgft-table-align-lock th.right,
table.lgft-data-table.lgft-table-align-lock td.right{text-align:right!important;}

table.table.lgft-table-align-lock td .table-card-label,
table.lgft-data-table.lgft-table-align-lock td .table-card-label{display:none!important;}
table.table.lgft-table-align-lock:not(.lgft-mobile-card-table) td .table-card-value,
table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table) td .table-card-value{display:inline!important;}

/* Safe minimum widths: wide tables scroll instead of crushing headers out of sync. */
table.table.lgft-table-align-lock[data-col-count="1"],
table.table.lgft-table-align-lock[data-col-count="2"],
table.table.lgft-table-align-lock[data-col-count="3"],
table.table.lgft-table-align-lock[data-col-count="4"]{min-width:0!important;}
table.table.lgft-table-align-lock[data-col-count="5"]{min-width:760px!important;}
table.table.lgft-table-align-lock[data-col-count="6"]{min-width:860px!important;}
table.table.lgft-table-align-lock[data-col-count="7"]{min-width:980px!important;}
table.table.lgft-table-align-lock[data-col-count="8"]{min-width:1080px!important;}
table.table.lgft-table-align-lock[data-col-count="9"]{min-width:1180px!important;}
table.table.lgft-table-align-lock[data-col-count="10"]{min-width:1280px!important;}
table.table.lgft-table-align-lock[data-col-count="11"],
table.table.lgft-table-align-lock[data-col-count="12"],
table.table.lgft-table-align-lock[data-col-count="13"],
table.table.lgft-table-align-lock[data-col-count="14"],
table.table.lgft-table-align-lock[data-col-count="15"]{min-width:1480px!important;}

/* Statement/billing tables: date/type/reference stay compact; description gets the real room; money columns align right. */
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"]{min-width:1040px!important;}
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] th:nth-child(1),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] td:nth-child(1){width:10%!important;}
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] th:nth-child(2),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] td:nth-child(2){width:10%!important;}
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] th:nth-child(3),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] td:nth-child(3){width:16%!important;}
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] th:nth-child(4),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] td:nth-child(4){width:34%!important;min-width:0!important;}
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] th:nth-child(5),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] td:nth-child(5),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] th:nth-child(6),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] td:nth-child(6),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] th:nth-child(7),
table.table.lgft-table-align-lock[data-lgft-table-kind="statement"] td:nth-child(7){width:10%!important;text-align:right!important;white-space:nowrap!important;}

/* True mobile card mode remains intentional. */
@media screen and (max-width:768px){
  table.table.lgft-mobile-card-table.lgft-table-align-lock,
  table.lgft-data-table.lgft-mobile-card-table.lgft-table-align-lock{display:block!important;min-width:0!important;table-layout:auto!important;}
  table.table.lgft-mobile-card-table.lgft-table-align-lock thead,
  table.table.lgft-mobile-card-table.lgft-table-align-lock colgroup,
  table.lgft-data-table.lgft-mobile-card-table.lgft-table-align-lock thead,
  table.lgft-data-table.lgft-mobile-card-table.lgft-table-align-lock colgroup{display:none!important;}
  table.table.lgft-mobile-card-table.lgft-table-align-lock tr,
  table.table.lgft-mobile-card-table.lgft-table-align-lock td,
  table.lgft-data-table.lgft-mobile-card-table.lgft-table-align-lock tr,
  table.lgft-data-table.lgft-mobile-card-table.lgft-table-align-lock td{display:block!important;}
  table.table.lgft-mobile-card-table.lgft-table-align-lock td .table-card-label,
  table.lgft-data-table.lgft-mobile-card-table.lgft-table-align-lock td .table-card-label{display:block!important;}
  table.table.lgft-mobile-card-table.lgft-table-align-lock td .table-card-value,
  table.lgft-data-table.lgft-mobile-card-table.lgft-table-align-lock td .table-card-value{display:block!important;}
}

@media print{
  .table-wrap.lgft-table-align-host,.lgft-table-align-host{overflow:visible!important;}
  table.table.lgft-table-align-lock:not(.lgft-mobile-card-table),
  table.lgft-data-table.lgft-table-align-lock:not(.lgft-mobile-card-table){display:table!important;width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important;}
  table.table.lgft-table-align-lock th,table.table.lgft-table-align-lock td{padding:4px 5px!important;font-size:8.5px!important;}
}
