/*
 * CloudTest v1.3.224 — single source of truth for MAIN TABLE HEADER typography.
 *
 * Scope: only the main table headers in all five analysis modes:
 *   #main-table, #fc-table, #facade-table
 *
 * Permitted variants:
 *   1. normal header text
 *   2. italic mathematical labels wrapped in <em>
 *   3. 10px inline subscripts wrapped in <sub>
 *
 * Mode-local CSS and JavaScript must not redefine these properties.
 */
:root {
  --pbs-main-header-font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --pbs-main-header-font-size: 14px;
  --pbs-main-header-font-weight: 600;
  --pbs-main-header-line-height: 1.2;
  --pbs-main-header-subscript-size: 10px;

  /* Shared application-button typography. */
  --pbs-button-font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --pbs-button-font-size: 15px;
  --pbs-button-font-weight: 700;
  --pbs-button-line-height: 1.2;
}

/* Binding base style for every main-header cell and every descendant. */
html body #main-table > thead th,
html body #main-table > thead th *,
html body #fc-table > thead th,
html body #fc-table > thead th *,
html body #facade-table > thead th,
html body #risk-table > thead th,
html body #facade-table > thead th *,
html body #risk-table > thead th *,
html body #size-table > thead th,
html body #size-table > thead th *,
html body #construction-table > thead th,
html body #construction-table > thead th * {
  font-family: var(--pbs-main-header-font-family) !important;
  font-size: var(--pbs-main-header-font-size) !important;
  font-weight: var(--pbs-main-header-font-weight) !important;
  font-style: normal !important;
  line-height: var(--pbs-main-header-line-height) !important;
}

/* The only allowed italic variant. Keep the expression inline. */
html body #main-table > thead th em,
html body #fc-table > thead th em,
html body #facade-table > thead th em,
html body #risk-table > thead th em,
html body #size-table > thead th em,
html body #construction-table > thead th em {
  display: inline !important;
  font-family: var(--pbs-main-header-font-family) !important;
  font-size: var(--pbs-main-header-font-size) !important;
  font-weight: var(--pbs-main-header-font-weight) !important;
  font-style: italic !important;
  line-height: var(--pbs-main-header-line-height) !important;
}

/* The only allowed subscript variant: true inline typographic subscript. */
html body #main-table > thead th sub,
html body #fc-table > thead th sub,
html body #facade-table > thead th sub,
html body #risk-table > thead th sub,
html body #main-table > thead th em > sub,
html body #fc-table > thead th em > sub,
html body #facade-table > thead th em > sub,
html body #risk-table > thead th em > sub,
html body #size-table > thead th sub,
html body #size-table > thead th em > sub,
html body #construction-table > thead th sub,
html body #construction-table > thead th em > sub {
  display: inline !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  float: none !important;
  font-family: var(--pbs-main-header-font-family) !important;
  font-size: var(--pbs-main-header-subscript-size) !important;
  font-weight: var(--pbs-main-header-font-weight) !important;
  font-style: inherit !important;
  line-height: 0 !important;
  vertical-align: sub !important;
}


/*
 * Binding application-button typography.
 * Used by the five main mode buttons and every contextual action button.
 * Button geometry, colours, alignment and icon sizes remain component-owned.
 */
html body .mode-btn,
html body .context-toolbar button,
html body .context-toolbar .context-btn,
html body .context-toolbar [role="button"] {
  font-family: var(--pbs-button-font-family) !important;
  font-size: var(--pbs-button-font-size) !important;
  font-weight: var(--pbs-button-font-weight) !important;
  font-style: normal !important;
  line-height: var(--pbs-button-line-height) !important;
}

/* Contextual button text wrappers inherit the binding button font. */
html body .context-toolbar button *,
html body .context-toolbar .context-btn *,
html body .context-toolbar [role="button"] * {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-style: inherit !important;
  line-height: inherit !important;
}

/* Keep mathematical suffixes typographic when they occur in contextual labels. */
html body .context-toolbar button sub,
html body .context-toolbar .context-btn sub,
html body .context-toolbar [role="button"] sub {
  display: inline !important;
  position: static !important;
  font-size: 10px !important;
  line-height: 0 !important;
  vertical-align: sub !important;
}

/* Shared calculated-result colour contract. Fire Risk rank colours and all
   calculation modes reference these tokens instead of defining local pass/fail colours. */
:root{
  --pbs-calculation-pass-color:#008000;
  --pbs-calculation-fail-color:#dc0000;
}
.pbs-calculation-pass{
  color:var(--pbs-calculation-pass-color)!important;
  -webkit-text-fill-color:var(--pbs-calculation-pass-color)!important;
}
.pbs-calculation-fail{
  color:var(--pbs-calculation-fail-color)!important;
  -webkit-text-fill-color:var(--pbs-calculation-fail-color)!important;
}

/* v1.3.447 — form values embedded in contextual controls remain regular weight.
 * This rule intentionally follows the blanket contextual-descendant inheritance
 * rule above. The control label remains a contextual-button label, while the
 * editable value and unit are data typography, not button typography.
 */
html body .context-toolbar .context-btn .building-fire-height-input-shell input,
html body .context-toolbar .context-btn .building-fire-height-input-shell span {
  font-family: var(--pbs-table-row-font-family, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif) !important;
  font-size: var(--pbs-table-row-font-size, 14px) !important;
  font-weight: var(--pbs-table-row-font-weight, 400) !important;
  line-height: var(--pbs-table-row-line-height, 1.2) !important;
}
