/* Shared motion complements workspace styles without moving table rows or input targets. */
@keyframes ux-menu-enter {
  from { opacity: .5; translate: 0 -3px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes ux-selection {
  from { box-shadow: inset 0 -2px transparent; }
  to { box-shadow: inset 0 -2px var(--accent-sand); }
}
@media (prefers-reduced-motion: no-preference) {
  :is(.theme-menu, .admin-menu, .hub-hidden-pop, .search-dialog) {
    animation: ux-menu-enter 160ms var(--ease) both;
  }
  :is(.employee-tab, .access-seg-btn, .pc-cal-filter, .template-segmented button).is-active {
    animation: ux-selection 180ms ease-out;
  }
  :is(.side-nav-item, .theme-menu-item, .custom-select-option, .template-stage, .template-node-button) {
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  }
  :is(.side-nav-item, .theme-menu-item, .custom-select-option):focus-visible {
    box-shadow: inset 3px 0 var(--accent-sand);
  }
  :is(input:not([type='checkbox']):not([type='radio']), textarea, .custom-select-trigger) {
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
  }
  :is(.checklist-item-box, .custom-select-chevron, details > summary .ti-chevron-down) {
    transition: transform 160ms var(--ease), border-color 150ms ease, background-color 150ms ease;
  }
  :is(.employee-progress-fill, .access-progress-fill, .ach-group-meter-fill, .progress-fill) {
    transition: width 260ms var(--ease), background-color 160ms ease;
  }
  :is(.employee-empty, .pc-plan-empty, .registry-empty, .access-empty) > .ti {
    animation: ux-menu-enter 220ms var(--ease);
  }
  :is(#template-status[data-state='saved'], .cand-field.is-saved, .copy-btn.is-copied) {
    animation: ux-selection 220ms ease-out;
  }
  @media (hover: hover) and (pointer: fine) {
    :is(.theme-menu-item, .custom-select-option, .side-nav-item) > .ti {
      transition: rotate 160ms var(--ease), color 150ms ease;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  /* Includes older workspace effects: movement must also stop mid-session. */
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* Удаление: частицы «рассыпания» и уведомление «Удалено · Вернуть» (public/js/removeFx.js). */
.vc-fx-layer { position: fixed; inset: 0; z-index: 100015; pointer-events: none; overflow: hidden; }
.vc-fx-dot { position: fixed; border-radius: 1px; pointer-events: none; will-change: transform, opacity; }
.vc-undo-host { position: fixed; z-index: 100020; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; max-width: calc(100vw - 24px); }
.vc-undo { position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 240px; padding: 12px 14px 15px; border: 1px solid var(--border-strong); border-radius: var(--r-md, 8px); color: var(--text); background: var(--bg-card); box-shadow: var(--shadow-md); font: 500 14px/1.4 var(--font-text); }
.vc-undo-icon { color: var(--text-secondary); font-size: 18px; }
.vc-undo-text { flex: 1 1 auto; }
.vc-undo-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); background: transparent; font: 600 13px/1.2 var(--font-text); cursor: pointer; }
.vc-undo-btn:hover { background: var(--bg-raised); }
.vc-undo-btn:disabled { opacity: .6; cursor: default; }
.vc-undo-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.vc-undo-bar { height: 100%; background: var(--accent-sand); transform-origin: left center; }
@media (prefers-reduced-motion: no-preference) {
  .vc-undo { animation: vc-undo-in 220ms var(--ease, ease-out) both; }
  .vc-undo.is-leaving { animation: vc-undo-out 200ms ease-in both; }
}
@keyframes vc-undo-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes vc-undo-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Смена темы: круговое раскрытие новой темы от места клика (View Transitions, public/js/themes.js). */
@media (prefers-reduced-motion: no-preference) {
  html.vc-theme-reveal::view-transition-old(root), html.vc-theme-reveal::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
  html.vc-theme-reveal::view-transition-old(root) { z-index: 1; }
  html.vc-theme-reveal::view-transition-new(root) { z-index: 2; }
}
