/* Central main-table header appearance and Fire Risk minimum-width geometry. */
:root {
  --pbs-main-table-header-background: #001f3f;
  --pbs-main-table-header-color: #ffffff;
  --pbs-main-table-header-border: #00172f;
  --pbs-main-table-header-radius: 6px;
}

html body #risk-table > thead > tr > th {
  background: var(--pbs-main-table-header-background) !important;
  background-image: none !important;
  color: var(--pbs-main-table-header-color) !important;
  border-color: var(--pbs-main-table-header-border) !important;
  font-family: var(--pbs-table-header-font-family, var(--pbs-table-row-font-family, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif)) !important;
  font-weight: var(--pbs-table-header-font-weight, 700) !important;
}
html body #risk-table > thead > tr > th * {
  color: inherit !important;
}
html body #risk-table > thead > tr:first-child > th:first-child {
  border-top-left-radius: var(--pbs-main-table-header-radius) !important;
}
html body #risk-table > thead > tr:first-child > th:last-child {
  border-top-right-radius: var(--pbs-main-table-header-radius) !important;
}

/* The left-zone minimum must include the TH's own horizontal padding. */
html body #risk-table {
  --risk-cell-padding-inline: 4px;
  --risk-left-content-min: calc(var(--risk-number-min) + var(--risk-name-min) + var(--risk-column-gap));
  --risk-left-outer-min: calc(var(--risk-left-content-min) + var(--risk-cell-padding-inline) + var(--risk-cell-padding-inline));
  min-width: calc(var(--risk-left-outer-min) + var(--risk-middle-width) + var(--risk-right-width)) !important;
}
html body #risk-table > colgroup > col.risk-left,
html body #risk-table > thead > tr > th:first-child,
html body #risk-table > tbody > tr > td:first-child {
  min-width: var(--risk-left-outer-min) !important;
}
html body #risk-table > thead > tr.risk-filter-row > th:first-child {
  padding-left: var(--risk-cell-padding-inline) !important;
  padding-right: var(--risk-cell-padding-inline) !important;
  overflow: hidden !important;
}
html body #risk-table > thead > tr.risk-filter-row > th:first-child > .pbs-zone-left-grid {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: minmax(var(--risk-number-min), var(--risk-number-max)) minmax(var(--risk-name-min), 1fr) !important;
  box-sizing: border-box !important;
}
html body #risk-table > thead > tr.risk-filter-row #risk-filter {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Fire-compartment-size main table uses the same central navy header contract. */
html body #size-table > thead > tr > th {
  background: var(--pbs-main-table-header-background) !important;
  background-image: none !important;
  color: var(--pbs-main-table-header-color) !important;
  border-color: var(--pbs-main-table-header-border) !important;
}
html body #size-table > thead > tr > th * {
  color: inherit !important;
}
html body #size-table > thead > tr:first-child > th:first-child {
  border-top-left-radius: var(--pbs-main-table-header-radius) !important;
}
html body #size-table > thead > tr:first-child > th:last-child {
  border-top-right-radius: var(--pbs-main-table-header-radius) !important;
}


/* Constructions main table uses the same central navy header contract as Fire Size. */
html body #construction-table > thead > tr > th {
  background: var(--pbs-main-table-header-background) !important;
  background-image: none !important;
  color: var(--pbs-main-table-header-color) !important;
  border-color: var(--pbs-main-table-header-border) !important;
}
html body #construction-table > thead > tr > th * { color: inherit !important; }
html body #construction-table > thead > tr:first-child > th:first-child { border-top-left-radius: var(--pbs-main-table-header-radius) !important; }
html body #construction-table > thead > tr:first-child > th:last-child { border-top-right-radius: var(--pbs-main-table-header-radius) !important; }
