/* 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; } /* The call itself. It is a stacking context of its own, as the standalone page's `#root` is, so that the layers the call view uses for its header, footer and overlays stay below the modals and toasts, which are portalled into the root and carry no layer of their own. What Compound floats — tooltips, menus — is not in here at all: it goes into the host's body, as it would for any other component on the host's page, and is styled and layered by the host's copy of Compound. */ .content { display: flex; flex-direction: column; block-size: 100%; position: relative; isolation: isolate; }