@layer theme, base, ag-grid, components, utilities;
@layer components.serval-ag-grid-base, components.serval-ag-grid-theme, components.serval-ag-grid-instance;

#root > .initial-loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: Canvas;
  color-scheme: dark;
}

#root > .initial-loading span {
  box-sizing: border-box;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid GrayText;
  border-top-color: CanvasText;
  border-radius: 50%;
  animation: initial-loading-spin 1s linear infinite;
}

#root > .initial-loading img {
  display: none;
  width: 8rem;
  margin-block-end: 1.5rem;
  filter: invert(1);
  animation: initial-loading-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

html[data-initial-branding="serval"] #root > .initial-loading img {
  display: block;
}

html[data-initial-branding="serval"] #root > .initial-loading span {
  display: none;
}

@keyframes initial-loading-pulse {
  50% {
    opacity: 0.5;
  }
}

@keyframes initial-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #root > .initial-loading span,
  #root > .initial-loading img {
    animation: none;
  }
}
