/* =============================================================================
   View-as (#1928, ADR-033): the support-session bar and the room it takes.

   The bar (SupportViewAsBanner) is one fixed-height row above the shell. MainLayout wraps its layout in
   `.adv-viewas-shell` ONLY for a view-as session, so every rule below is keyed on that wrapper and changes
   nothing for anyone else. The layout is `height: 100vh` inline (and 100dvh on the document editor and on
   phones), so while the bar is there it is that much shorter: the page is exactly one screen, the bar never
   scrolls away, and the mobile sidebar, which is fixed to the viewport, starts below it.
   ========================================================================== */

:root {
    --adv-viewas-banner-h: 2.5rem;
}

@media (max-width: 600px) {
    :root {
        --adv-viewas-banner-h: 3.25rem;
    }
}

.adv-viewas-shell .rz-layout,
.adv-viewas-shell .rz-layout:has(#adv-document-editor-host) {
    height: calc(100vh - var(--adv-viewas-banner-h)) !important;
    height: calc(100dvh - var(--adv-viewas-banner-h)) !important;
}

@media (max-width: 768px) {
    .adv-viewas-shell .rz-sidebar {
        top: var(--adv-viewas-banner-h) !important;
        height: calc(100vh - var(--adv-viewas-banner-h)) !important;
        height: calc(100dvh - var(--adv-viewas-banner-h)) !important;
    }

    .adv-viewas-shell .rz-sidebar-overlay {
        top: var(--adv-viewas-banner-h);
    }
}
