/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/*
 * Стартовый splash-лоадер (#518). Рендерится сервером внутри <div id="app"> и
 * виден ДО загрузки/выполнения JS-бандла и монтирования Vue — чтобы при жёсткой
 * перезагрузке не было вспышки пустого белого экрана. Vue при mount('#app')
 * очищает контейнер, поэтому splash убирается автоматически после гидрации.
 *
 * Стили живут здесь (а не в токенах toolkit) намеренно: application.css грузится
 * синхронно в <head> ещё до vite-бандла с дизайн-токенами, поэтому splash
 * оформлен сразу. Значения продублированы из tokens.css (--bg-base, --accent) —
 * иначе на этом этапе переменные ещё недоступны.
 */
.app-splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  z-index: 2147483647;
}

.app-splash__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(79, 70, 229, 0.25);
  border-top-color: #4f46e5;
  border-radius: 999px;
  animation: app-splash-spin 0.6s linear infinite;
}

@keyframes app-splash-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash__spinner {
    animation-duration: 0s;
  }
}

@media (prefers-color-scheme: dark) {
  .app-splash {
    background: #0b0b0f;
  }
}
