/* Page around the Avalonia canvas; colours as DeviceManagement/docs/design/smart2i-main.css (grounding, on-primary). */
:root {
  color-scheme: light dark;
  --pva-background: #f5f5f5;
  --pva-text: #272727;
  --pva-muted: #727272;
  --pva-error: #e1000b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pva-background: #1e1e1e;
    --pva-text: #ffffff;
    --pva-muted: #8e8e8e;
    --pva-error: #ff6b70;
  }
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--pva-background);
  color: var(--pva-text);
  font-family: "Public Sans", system-ui, sans-serif;
}

#out {
  position: fixed;
  inset: 0;
}

.avalonia-splash {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--pva-background);
  transition: opacity 0.3s;
}

/* Gone after fading out: the canvas does not cover every pixel, a half-visible splash would show through. */
.avalonia-splash.splash-close {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0s 0.3s;
}

.splash-title {
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 600;
}

.splash-hint {
  margin: 0;
  max-width: 28rem;
  padding: 0 16px;
  text-align: center;
  color: var(--pva-muted);
}

.splash-error {
  color: var(--pva-error);
}

.noscript {
  margin: 20vh auto;
  max-width: 28rem;
  text-align: center;
}

/* The hidden input Avalonia types into (mobile-input.js): at 16 px iOS does not zoom the page when a
   text field gets the focus (it does below 16 px). The input is invisible, the size only matters to iOS. */
.avalonia-input-element {
  font-size: 16px;
}

/* No grey flash on tap, no double-tap zoom delay on the app surface. */
#out {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
