/* Shared main-table header filter contract. Stable filename; no release number. */
:root {
  --pbs-header-filter-placeholder: #64748b;
  --pbs-header-filter-text: #0f172a;
  --pbs-header-filter-border: #cbd5e1;
  --pbs-header-filter-active-background: #fee2e2;
  --pbs-header-filter-active-border: #f87171;
  --pbs-header-filter-active-text: #7f1d1d;
  --pbs-header-filter-radius: 4px;
}

html body input.room-table-filter-input,
html body input.pbs-main-header-filter {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: var(--pbs-table-control-height, 28px) !important;
  min-height: var(--pbs-table-control-height, 28px) !important;
  max-height: var(--pbs-table-control-height, 28px) !important;
  margin: 0 !important;
  padding: 3px 6px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--pbs-header-filter-border) !important;
  border-radius: var(--pbs-header-filter-radius) !important;
  background: #fff !important;
  color: var(--pbs-header-filter-text) !important;
  -webkit-text-fill-color: var(--pbs-header-filter-text) !important;
  caret-color: var(--pbs-header-filter-text) !important;
  font-family: var(--pbs-table-row-font-family, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif) !important;
  font-size: var(--pbs-table-row-font-size, 13px) !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
html body input.room-table-filter-input::placeholder,
html body input.pbs-main-header-filter::placeholder {
  color: var(--pbs-header-filter-placeholder) !important;
  -webkit-text-fill-color: var(--pbs-header-filter-placeholder) !important;
  opacity: 1 !important;
  font: inherit !important;
  font-weight: 600 !important;
}
html body input.room-table-filter-input:focus,
html body input.room-table-filter-input:focus-visible,
html body input.pbs-main-header-filter:focus,
html body input.pbs-main-header-filter:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
html body input.room-table-filter-input:not(:placeholder-shown),
html body input.room-table-filter-input:not(:placeholder-shown):focus,
html body input.pbs-main-header-filter:not(:placeholder-shown),
html body input.pbs-main-header-filter:not(:placeholder-shown):focus {
  background: var(--pbs-header-filter-active-background) !important;
  border-color: var(--pbs-header-filter-active-border) !important;
  color: var(--pbs-header-filter-active-text) !important;
  -webkit-text-fill-color: var(--pbs-header-filter-active-text) !important;
  caret-color: var(--pbs-header-filter-active-text) !important;
  font-weight: 600 !important;
  box-shadow: inset 0 0 0 1px rgba(248,113,113,.35) !important;
}

/* Calculation-mode header text uses the same header weight as the main modes. */
html body #risk-table .risk-filter-row .pbs-zone-left-grid > :first-child,
html body #facade-table .facade-filter-row .facade-filter-left-grid > :first-child {
  font-family: var(--pbs-main-header-font-family, var(--pbs-table-row-font-family, "Segoe UI", sans-serif)) !important;
  font-size: var(--pbs-main-header-font-size, 13px) !important;
  font-weight: var(--pbs-main-header-font-weight, 600) !important;
  color: #fff !important;
}

/* Keep filter controls inside the real LEFT-zone content box. */
html body #risk-table .risk-filter-row > th:first-child,
html body #facade-table .facade-filter-row > th.facade-zone-left {
  box-sizing: border-box !important;
  overflow: hidden !important;
}
html body #risk-table .risk-filter-row .pbs-zone-left-grid,
html body #facade-table .facade-filter-row .facade-filter-left-grid {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
