/* Единые правила движения портала.
   Анимируются только transform/opacity и цвета; отклик 150–200 мс,
   появление разделов ~200 мс, закрытие быстрее открытия.
   Подключается последним, поэтому переопределяет старые правила. */

:root {
  --motion-fast: .15s;
  --motion-base: .2s;
  --motion-ease: cubic-bezier(.2, .7, .2, 1);
}

/* «transition: all» анимировал и размеры, и отступы — из-за этого
   наведение на строки и кнопки слегка подтормаживало. */
.transition-all,
select.styled-select, .styled-select,
.glass-button, .schema-card, .doc-tab, .glass, .system-btn,
.photo-thumb, .page-btn, .schema-thumb-card, .theme-btn-main {
  transition-property: color, background-color, border-color, box-shadow, opacity, transform !important;
  transition-duration: var(--motion-base) !important;
  transition-timing-function: var(--motion-ease) !important;
}
tr.transition-all { transition-duration: var(--motion-fast) !important; }

/* Капли под кнопками меню: были 0,5 с + задержки до 0,18 с (≈0,7 с) — теперь ≈0,35 с. */
.nav-blobs > i { transition: transform .28s var(--motion-ease) !important; }
.nav-blobs > i:nth-child(2) { transition-delay: .025s !important; }
.nav-blobs > i:nth-child(3) { transition-delay: .05s !important; }
.nav-blobs > i:nth-child(4) { transition-delay: .075s !important; }
body .nav-blob { transition-duration: var(--motion-base) !important; }

/* Реестр: при переходе уже раскрывается круг страницы, второй подъём таблицы
   давал двойное движение. Оставлено лёгкое проявление. */
#page-registry.is-active .registry-command,
#page-registry.is-active .registry-table-area { animation: registry-fade .18s ease-out both !important; }
@keyframes registry-fade { from { opacity: 0; } to { opacity: 1; } }

/* Панели и превью — короче и без «прыжка». */
.map-layers:not([hidden]) { animation-duration: .2s !important; }
.map-preview:not([hidden]) { animation-duration: .22s !important; }

/* Для тех, у кого в системе включено «Уменьшить движение». */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
