/* PryzmWorkspace V7.5 — true independent Notebook Actions popup */
.note-actions-scrim{
  position:fixed;
  inset:0;
  z-index:8490;
  background:transparent;
}
.note-actions-scrim.hidden{display:none!important}

.note-document-menu.note-actions-popover{
  position:fixed!important;
  z-index:8500!important;
  display:grid;
  gap:8px;
  width:min(390px,calc(100vw - 24px));
  max-height:min(720px,calc(100vh - 88px));
  padding:14px!important;
  margin:0!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  border:1px solid color-mix(in srgb,var(--study-line) 92%,transparent)!important;
  border-radius:18px!important;
  background:color-mix(in srgb,var(--study-paper) 97%,transparent)!important;
  box-shadow:0 24px 70px rgba(0,0,0,.30),0 2px 12px rgba(0,0,0,.12)!important;
  backdrop-filter:blur(24px) saturate(1.1);
  -webkit-backdrop-filter:blur(24px) saturate(1.1);
  transform:none!important;
}
.note-document-menu.note-actions-popover.hidden{display:none!important}
.note-document-menu.note-actions-popover .note-menu-title{
  position:sticky;
  top:-14px;
  z-index:2;
  margin:-14px -14px 2px;
  padding:14px;
  background:color-mix(in srgb,var(--study-paper) 98%,transparent);
  border-bottom:1px solid var(--study-line-soft);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.note-document-menu.note-actions-popover .note-menu-primary{
  grid-template-columns:1fr 1fr;
}
.note-document-menu.note-actions-popover .study-button{
  min-height:40px;
}

/* Opening Notebook Actions must never change, resize, or dim the writing dock. */
.note-editor-shell.document-actions-open .inkbar-shell,
.note-editor-shell.document-actions-open .compact-inkbar{
  transform:translateX(-50%)!important;
  opacity:1!important;
  filter:none!important;
  pointer-events:auto!important;
}

@media(max-width:720px){
  .note-actions-scrim{
    background:rgba(0,0,0,.22);
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
  }
  .note-document-menu.note-actions-popover{
    left:max(8px,env(safe-area-inset-left))!important;
    right:max(8px,env(safe-area-inset-right))!important;
    top:auto!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-height:min(72svh,680px)!important;
    border-radius:22px!important;
    padding:14px 14px calc(14px + env(safe-area-inset-bottom))!important;
  }
  .note-document-menu.note-actions-popover .note-menu-title{
    top:-14px;
  }
}


/* V7.5.1 definitive layering fix: popup must always sit above its scrim. */
#noteActionsScrim.note-actions-scrim{position:fixed!important;inset:0!important;z-index:2147483000!important;}
#noteMoreDrawer.note-document-menu.note-actions-popover{
  position:fixed!important;
  z-index:2147483001!important;
  top:var(--actions-top,auto)!important;
  left:var(--actions-left,auto)!important;
  right:auto!important;
  bottom:auto!important;
  pointer-events:auto!important;
  visibility:visible;
}
#noteMoreDrawer.note-document-menu.note-actions-popover.hidden{display:none!important;}
#noteMoreDrawer.note-document-menu.note-actions-popover *{pointer-events:auto;}
@media(max-width:720px){
  #noteMoreDrawer.note-document-menu.note-actions-popover{
    top:auto!important;
    left:max(8px,env(safe-area-inset-left))!important;
    right:max(8px,env(safe-area-inset-right))!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
  }
}
