/* Prism · native-element layer for server-rendered apps (prismds).
   Hand-written; loaded after prism-components.css. The React components draw
   their dialog inside a scrim <div>; the Python package uses the browser's
   own <dialog> (top layer, Escape, focus handling) — these rules make it look
   identical. Everything else comes from prism-components.css unchanged. */

/* ---- Dialog: native <dialog class="prism-dialog"> ---- */
dialog.prism-dialog {
  padding: 0; margin: auto; color: inherit;
  /* the React scrim pads the viewport by --space-4 on every side */
  inline-size: calc(100% - 2 * var(--space-4));
  max-block-size: calc(100vh - 2 * var(--space-4));
  overflow: visible;
}
dialog.prism-dialog:not([open]) { display: none; }
dialog.prism-dialog::backdrop {
  background: var(--surface-scrim, rgb(20 18 16 / 0.45));
  animation: prism-fade var(--duration-fast, 120ms) var(--ease-standard, ease);
}
dialog.prism-dialog[data-backdrop="dark"]::backdrop { background: rgb(10 10 12 / 0.88); }
dialog.prism-dialog:focus { outline: none; }
/* full: the whole viewport */
dialog.prism-dialog[data-size="full"] { inline-size: 100%; block-size: 100%; max-block-size: none; margin: 0; }
/* end: a side sheet from the inline-end edge */
dialog.prism-dialog[data-placement="end"] {
  margin-block: 0; margin-inline: auto 0; block-size: 100%; max-block-size: none; inline-size: 100%;
}
@media (prefers-reduced-motion: reduce) {
  dialog.prism-dialog, dialog.prism-dialog::backdrop { animation: none; }
}
/* page scroll stays put while a modal is open */
html:has(dialog.prism-dialog[open]:modal) { overflow: hidden; }

/* ---- Menu: an item that POSTs is a submit button inside its own form ---- */
.prism-menu .prism-menu-form { display: contents; }

/* ---- AppHeader drawer: the off-canvas panel is inert while closed ---- */
.prism-appheader .prism-sidenav[hidden] { display: none; }
