/* Entry feedback only: native close/cancel/focus and form actions stay immediate.
   Keep equipment controls out of the scope. No fill-mode leaves a transformed
   containing block after entry (important for fixed children and canvas tools). */
@keyframes lims-dialog-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes lims-overlay-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  dialog:is(.request-plan-popup, .staff-details-dialog,
    #plan-read-view, #plan-comment-editor, #plan-row-editor, #plan-editor,
    #plan-week-editor, #whats-new-dialog, #metrology-archive-dialog,
    #mail-contacts-popup)[open] {
    animation: lims-dialog-enter 160ms cubic-bezier(.2,.8,.2,1);
  }
  /* A glass surface must not change opacity: on Chromium that changes its
     backdrop boundary. Fade only the content, keeping the glass stationary. */
  #workspace-sections[open] > :is(.workspace-dialog-heading, .workspace-section-search, .workspace-section-list, .workspace-dialog-footer) {
    animation: lims-overlay-enter 140ms ease-out;
  }
  /* Photo editing is direct manipulation: fade only, so pointer coordinates
     and crop handles remain stationary from the first interactive frame. */
  dialog:is(.photo-editor, .request-photo-viewer)[open] {
    animation: lims-overlay-enter 140ms ease-out;
  }
  dialog:is(.request-plan-popup, .staff-details-dialog,
    #plan-read-view, #plan-comment-editor, #plan-row-editor, #plan-editor,
    #plan-week-editor, #whats-new-dialog, #metrology-archive-dialog,
    #mail-contacts-popup, .photo-editor, .request-photo-viewer)[open]::backdrop {
    animation: lims-overlay-enter 140ms ease-out;
  }
  .request-tool-window:not([hidden]) {
    animation: lims-dialog-enter 140ms cubic-bezier(.2,.8,.2,1);
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog:is(.request-plan-popup, .staff-details-dialog,
    #plan-read-view, #plan-comment-editor, #plan-row-editor, #plan-editor,
    #plan-week-editor, #whats-new-dialog, #metrology-archive-dialog,
    #mail-contacts-popup, .photo-editor, .request-photo-viewer)[open],
  dialog:is(.request-plan-popup, .staff-details-dialog,
    #plan-read-view, #plan-comment-editor, #plan-row-editor, #plan-editor,
    #plan-week-editor, #whats-new-dialog, #metrology-archive-dialog,
    #mail-contacts-popup, .photo-editor, .request-photo-viewer)[open]::backdrop,
  .request-tool-window:not([hidden]),
  #workspace-sections[open] > :is(.workspace-dialog-heading, .workspace-section-search, .workspace-section-list, .workspace-dialog-footer) {
    animation: none;
  }
}
@media print {
  dialog[open], .request-tool-window { animation: none !important; }
}
