/* R11.7.0 - global managed-image dialogs above asset/spare/bearing/motor drawers. */
/* R7.2 previously used a plain div at z-index:4200; R11.5 drawer is z-index:12000.
   A native modal dialog is in the browser's TOP LAYER, independent of stacking contexts. */
dialog#r72PhotoEditor.r72-photo-editor-back{
  position:fixed;inset:0;margin:0;padding:clamp(6px,1.8vw,18px);border:0;
  box-sizing:border-box;width:100vw;max-width:none;height:100dvh;max-height:100dvh;
  overflow:auto;background:transparent!important;backdrop-filter:none!important;
  color:var(--text,#172b44);z-index:500000;
}
dialog#r72PhotoEditor.r72-photo-editor-back:not([open]){display:none!important}
dialog#r72PhotoEditor.r72-photo-editor-back[open]{display:flex;align-items:center;justify-content:center}
dialog#r72PhotoEditor.r72-photo-editor-back::backdrop{
  background:rgba(2,10,23,.78);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);
}
dialog#r72PhotoEditor .r72-photo-editor{
  width:min(1040px,100%);max-width:100%;max-height:min(94dvh,100%);
  box-sizing:border-box;min-height:0;flex:0 1 auto;
  background:var(--card,var(--panel,#fff));
}
/* Managed gallery and legacy image viewers also have to rise over the R11.5 drawer
   (12000) and the standard modal backdrop (12030) when opened from inside a drawer. */
#r73Lightbox.r73-lightbox.open,#r6Lightbox.r6-lightbox.open,
#r7Lightbox.r7-lightbox.open{z-index:12060!important}
@media(max-width:760px){
  dialog#r72PhotoEditor.r72-photo-editor-back{padding:6px}
  dialog#r72PhotoEditor .r72-photo-editor{max-height:calc(100dvh - 12px);width:100%}
  dialog#r72PhotoEditor .r72-photo-editor-body{grid-template-columns:1fr}
  dialog#r72PhotoEditor .r72-photo-stage{min-height:210px}
}
@media(prefers-reduced-motion:reduce){
  dialog#r72PhotoEditor.r72-photo-editor-back[open]{animation:none!important}
}
