/*
 * Workspace container — ui-workspace.
 */

ui-workspace,
.ui-workspace {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--taskbar-height);
  z-index: 10;
  pointer-events: none;
}

/* Windows inside workspace receive pointer events */
ui-workspace>ui-dialog {
  pointer-events: auto;
}

/*
 * Click-to-focus for background windows:
 * Inactive dialog iframes absorb events INSIDE their document (cross-frame),
 * so clicks never reach the parent ui-dialog where focusDialog() lives.
 * Solution: disable pointer-events on inactive iframes so the first click
 * lands on ui-dialog itself → focusDialog() fires → dialog gets .active →
 * iframe becomes interactive again for the next click.
 * This mirrors classic Windows alt-click-to-focus behavior.
 */
ui-dialog:not(.active) iframe {
  pointer-events: none;
}