/* The page behind the canvas, and the loading text and its bar (the bytes that have come). A file of its own, and not a <style> in index.html, because the app is served under a
   content security policy with no inline styles (apps/diacraft-web/_headers): trunk copies this file beside the app. The colours are the theme
   tokens' (crates/ui-egui/src/theme.rs, the canvas and the status text), kept in step by a test (tests/it/html.rs). */
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #181818; }
/* The page's one landmark (what a screen reader jumps to): it is the size of the page, so that the canvas in it is. */
main { display: block; width: 100%; height: 100%; }
#diacraft_canvas { display: block; width: 100%; height: 100%; }
#diacraft_loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; color: #cdcdcd; font: 14px system-ui, sans-serif; pointer-events: none; }
#diacraft_loading p { margin: 0; max-width: 32em; padding: 0 16px; text-align: center; overflow-wrap: anywhere; }
/* The bar: a track and a fill in the page's own two colours (the same as the text and the top bar of the app), a hairline round it so that it shows on the page whatever the scheme. */
#diacraft_loading progress { appearance: none; width: min(280px, 70vw); height: 6px; border: 1px solid #cdcdcd; border-radius: 4px;
  background: #202020; color: #cdcdcd; overflow: hidden; }
#diacraft_loading progress::-webkit-progress-bar { background: #202020; }
#diacraft_loading progress::-webkit-progress-value { background: #cdcdcd; }
#diacraft_loading progress::-moz-progress-bar { background: #cdcdcd; }
#diacraft_loading progress[hidden], #diacraft_loading button[hidden] { display: none; }
#diacraft_loading button { pointer-events: auto; font: inherit; color: #cdcdcd; background: #202020; border: 1px solid #cdcdcd; border-radius: 4px;
  padding: 6px 16px; cursor: pointer; }
#diacraft_loading button:focus-visible { outline: 2px solid #cdcdcd; outline-offset: 2px; }
@media (prefers-color-scheme: light) {
  html, body { background: #e6e6e6; }
  #diacraft_loading { color: #404040; }
  #diacraft_loading progress { border-color: #404040; background: #efefef; color: #404040; }
  #diacraft_loading progress::-webkit-progress-bar { background: #efefef; }
  #diacraft_loading progress::-webkit-progress-value { background: #404040; }
  #diacraft_loading progress::-moz-progress-bar { background: #404040; }
  #diacraft_loading button { color: #404040; background: #efefef; border-color: #404040; }
  #diacraft_loading button:focus-visible { outline-color: #404040; }
}
