/* Page defaults, kept out of theme.css so package
 * entries can import them into their own cascade layer (theme.css's @utility
 * rules cannot be layered). Base layer so utilities still win. */
@layer base {
  /* The stacking scale: everything the package lays over the page takes one of
   * these z-indexes, and a host slots its own fixed elements between them, such
   * as a top bar at 100. Toasts sit above dialogs, so one stays usable while a
   * modal is open. Popups sit above both: a select inside a modal opens over it,
   * and a menu opens over a toast, since it is open only because someone just
   * opened it and closes on their next press. A popup that stays open while it is
   * used, such as a hover card, a popover or a select that picks several, can
   * keep a toast that shows meanwhile under it until it closes. In this layer, so
   * a host's own :root values win. */
  :root {
    --layer-sticky: 10; /* toolbars and tab strips that stick as their page scrolls */
    --layer-header: 20; /* the page header, which sticks above them */
    --layer-overlay: 1000; /* a panel over the page, such as a full-screen log */
    --layer-drawer: 1100;
    --layer-modal: 1200;
    --layer-toast: 1300;
    --layer-popover: 1400; /* menus, selects, popovers, hover cards and tooltips */
  }

  body {
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--theme-app);
    background-color: var(--theme-app-bg);
  }

  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--theme-border, currentColor);
  }
}
