/*
 * PublicWeb rem-root bridge for TechsaCare EHR hub.
 * TEC-2838 renders the hub under Metronic style.bundle.css which sets:
 *   html, body { font-size: 13px !important; }
 *   @media (max-width: 991.98px) { font-size: 12px !important; }
 * PublicWeb site chrome uses 16px rem. Without this bridge, every rem in
 * techsacare-ehr-hub.css (identical to the branch) paints ~23% larger.
 * Keep techsacare-ehr-hub.css byte-identical to the branch; only this file
 * adjusts the PublicWeb document root for hub pages.
 */

html:has(.tc-ehr-hub),
html:has(.tc-ehr-stub) {
  font-size: 13px !important;
}

@media (max-width: 991.98px) {
  html:has(.tc-ehr-hub),
  html:has(.tc-ehr-stub) {
    font-size: 12px !important;
  }
}

@media (max-width: 767.98px) {
  html:has(.tc-ehr-hub),
  html:has(.tc-ehr-stub) {
    font-size: 12px !important;
  }
}

/* Keep PublicWeb chrome at its designed 16px rem scale while hub uses Metronic rem. */
html:has(.tc-ehr-hub) .site-header,
html:has(.tc-ehr-stub) .site-header,
html:has(.tc-ehr-hub) .site-footer,
html:has(.tc-ehr-stub) .site-footer,
html:has(.tc-ehr-hub) .site-fabs,
html:has(.tc-ehr-stub) .site-fabs,
html:has(.tc-ehr-hub) .help-modal,
html:has(.tc-ehr-stub) .help-modal,
html:has(.tc-ehr-hub) .auth-popup,
html:has(.tc-ehr-stub) .auth-popup,
html:has(.tc-ehr-hub) .skip-link,
html:has(.tc-ehr-stub) .skip-link {
  zoom: calc(16 / 13);
}

@media (max-width: 991.98px) {
  html:has(.tc-ehr-hub) .site-header,
  html:has(.tc-ehr-stub) .site-header,
  html:has(.tc-ehr-hub) .site-footer,
  html:has(.tc-ehr-stub) .site-footer,
  html:has(.tc-ehr-hub) .site-fabs,
  html:has(.tc-ehr-stub) .site-fabs,
  html:has(.tc-ehr-hub) .help-modal,
  html:has(.tc-ehr-stub) .help-modal,
  html:has(.tc-ehr-hub) .auth-popup,
  html:has(.tc-ehr-stub) .auth-popup,
  html:has(.tc-ehr-hub) .skip-link,
  html:has(.tc-ehr-stub) .skip-link {
    zoom: calc(16 / 12);
  }
}

/* Match product pages that sit flush above the footer (no extra site gap). */
body:has(.tc-ehr-hub) .site-footer,
body:has(.tc-ehr-stub) .site-footer {
  margin-top: 0;
}

/*
 * Metronic style.bundle sets img,svg { vertical-align: middle }.
 * Bootstrap reboot already sets img { max-width: 100%; height: auto }.
 */
.tc-ehr-hub img,
.tc-ehr-hub svg,
.tc-ehr-stub img,
.tc-ehr-stub svg {
  vertical-align: middle;
}
