/* Shared styles for the rscad browser entrypoints (web/index.html and
   web/index-gui.html). Kept in one file so the loader overlay and canvas
   sizing can't drift between the lanes. Trunk inlines this via
   `<link data-trunk rel="css" href="rscad.css">` in each entrypoint. */

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1e1e1e;
}
/* Bevy/winit attaches to this canvas (selector `#rscad-canvas`, see
   rscad-platform/src/web.rs). `fit_canvas_to_parent` keeps it sized. */
#rscad-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  outline: none;
}

/* Loading overlay: static HTML so it paints before the (large) wasm even
   finishes downloading. Removed by rscad-gui's wasm `hide_loading_overlay`
   system once the first frame has rendered (it adds `.hidden`). */
#rscad-loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #1e1e1e;
  color: #e0e0e0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: opacity 300ms ease;
}
#rscad-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.rscad-loader__brand {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #f5f5f5;
}
.rscad-loader__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #3a3a3a;
  border-top-color: #6ea8fe;
  border-radius: 50%;
  animation: rscad-spin 0.9s linear infinite;
}
.rscad-loader__label {
  font-size: 0.9rem;
  color: #9a9a9a;
}
@keyframes rscad-spin {
  to {
    transform: rotate(360deg);
  }
}
