/* Scoped integration styles. Add `cmn-webgl-host` to the section that owns the background. */
.cmn-webgl-host {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.cmn-webgl-canvas,
.cmn-webgl-fallback {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cmn-webgl-canvas {
  display: block;
}

.cmn-webgl-fallback {
  display: grid;
  place-items: center;
}

.cmn-webgl-fallback img {
  width: min(52%, 34rem);
  height: auto;
  filter: invert(1);
  opacity: 0.55;
}

:root[data-theme="light"] .cmn-webgl-fallback img {
  filter: none;
}

/* Put the website's existing content above the WebGL layer. */
.cmn-webgl-content {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cmn-webgl-canvas {
    animation: none !important;
  }
}
