/* Shared popup chrome. Screen-only so document and invoice printing is unchanged.
   Important declarations protect this frame from dynamically injected editor styles. */
@media screen {
  :root {
    --dialog-border: #cfd6d1;
    --dialog-surface: #fff;
    --dialog-backdrop: rgba(20, 30, 25, .35);
    --dialog-shadow: 0 18px 64px rgba(10, 14, 12, .32);
  }
  :root[data-theme="dark"] {
    --dialog-border: #607368;
    --dialog-surface: #2b352e;
    --dialog-backdrop: rgba(10, 14, 12, .55);
    --dialog-shadow: 0 18px 64px rgba(0, 0, 0, .6);
  }
  dialog, [role="dialog"], .notification-panel, #inspector,
  .board-context-menu, .topic-context-menu, .map-group-menu {
    border: 1px solid var(--dialog-border) !important;
    border-radius: 14px;
    background: var(--dialog-surface) !important;
    box-shadow: var(--dialog-shadow) !important;
  }
  dialog::backdrop {
    background: var(--dialog-backdrop) !important;
    backdrop-filter: blur(2px);
  }
  /* Custom floating panels retain their existing positioning and interactions.
     The spread shadow dims outside the frame without intercepting clicks. */
  .notification-panel, #inspector, [role="dialog"]:not(dialog),
  .board-context-menu, .topic-context-menu, .map-group-menu {
    box-shadow: var(--dialog-shadow), 0 0 0 100vmax var(--dialog-backdrop) !important;
  }
}
