/* animations.css — Все transition и @keyframes */

/* === Анимация вентилятора (кнопка в тулбаре) === */
@keyframes fanSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

#fanAnimationBtn.active svg {
  animation: fanSpin 0.8s linear infinite;
  transform-origin: center;
}

/* === Панель слоёв === */
.layers-panel { padding: 8px; }
.layer-item:hover { background: var(--color-hover); border-radius: 4px; }

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* === Spinner для кнопки расчёта === */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.btn-loading svg {
  animation: spin 1s linear infinite;
}

/* === Fade-in для карточки результатов === */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.result-card--updated {
  animation: fadeIn 0.2s ease;
}

/* === Панель свойств первое открытие === */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.panel-content--animate {
  animation: slideInRight 0.2s ease-out;
}

/* === Скролл тулбара === */
.app-toolbar {
  scrollbar-width: none;
}

.app-toolbar::-webkit-scrollbar {
  display: none;
}

/* === Скролл для body (на всякий случай) === */
body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) var(--color-panel);
}

body::-webkit-scrollbar {
  width: 6px;
}

body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

body::-webkit-scrollbar-track {
  background: var(--color-panel);
}
