/* SmartInfra - the display size of the web application (V327).
   The person chooses compact (the page shown at 90 %, the default), normal (100 %) or large (110 %) in Profile Settings; the choice is written on <html data-sim-size> by the layout.
   Only on a desktop width (992 px and up): a phone or a tablet keeps 100 % and its own responsive layout.
   The viewport units (vh, vw) are not scaled by the browser, so every vh / vw of the application is written through two variables: they are the real viewport divided by
   the scale, and after the scale they come out as the real viewport again (full-height panels fill the screen, nothing is left blank). */
:root { --sim-zoom: 1; --sim-vh: 100vh; --sim-vw: 100vw; }

@media (min-width: 992px) {
    html[data-sim-size="compact"] { zoom: 0.9; --sim-zoom: 0.9; --sim-vh: calc(100vh / 0.9); --sim-vw: calc(100vw / 0.9); }
    html[data-sim-size="large"]   { zoom: 1.1; --sim-zoom: 1.1; --sim-vh: calc(100vh / 1.1); --sim-vw: calc(100vw / 1.1); }
}

/* Bootstrap writes its own full-screen sizes with vh / vw (the dark layer behind a window, the window itself, a full screen window, a panel from the top or bottom, the
   100 % height helpers). Those units are not scaled by zoom, so at 90 % the dark layer covered only 90 % of the screen and the window was cut off at the bottom.
   The same rules again through the two variables (written as html + class so that they win over Bootstrap, which is loaded later). */
html .modal-backdrop { width: var(--sim-vw); height: var(--sim-vh); }
html .modal { width: var(--sim-vw); height: var(--sim-vh); }
html .modal-fullscreen, html .modal-fullscreen-sm-down, html .modal-fullscreen-md-down, html .modal-fullscreen-lg-down, html .modal-fullscreen-xl-down, html .modal-fullscreen-xxl-down { width: var(--sim-vw); }
html .vh-100 { height: var(--sim-vh) !important; }
html .min-vh-100 { min-height: var(--sim-vh) !important; }
html .vw-100 { width: var(--sim-vw) !important; }
html .min-vw-100 { min-width: var(--sim-vw) !important; }
html .offcanvas { --bs-offcanvas-height: calc(var(--sim-vh) * 0.3); }
html .navbar-nav-scroll { max-height: var(--bs-scroll-height, calc(var(--sim-vh) * 0.75)); }
