/* Copyright 2026 Element Creations Ltd. SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ /* The container a host mounts us into. It fills whatever space the host gives it, and nothing we draw may leave it. That takes two separate things, which are easy to mistake for one. `isolation` gives us a stacking context, so nothing inside can be layered above the host's own interface. Containment makes us the containing block for `position: fixed` descendants, and clips what we paint to our own box: without it, the modal scrim and dialog — which are positioned `fixed` and centred, since in the app they are meant to cover the page — resolve against the viewport and appear in the middle of the host's window rather than in the middle of the call. The clipping cuts both ways: a menu near the edge of a small container is trimmed rather than overflowing into the host. That is the trade being a component rather than a page makes. */ .root { display: flex; flex-direction: column; inline-size: 100%; block-size: 100%; isolation: isolate; contain: layout paint; position: relative; background-color: var(--cpd-color-bg-canvas-default); color: var(--cpd-color-text-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; } /* Compound's overlay container, which holds tooltips and popovers, has to fill the container for the elements inside it to be positioned against it. The standalone page does the same for the container under `#root`. */ .root > [data-overlay-container] { position: relative; block-size: 100%; }