html {
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;

  font: 14px "Arial", sans-serif;
}

body {
  background: black;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

body.loading > #glRoom {
  opacity: 0;
}

html, body, #room {
  height: 100%;
}

#room {
  overflow: hidden;
  position: relative;
}

.door {
  --depth: 0vw;

  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  overflow: hidden;
}

.door iframe {
  display: none;
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  border: none;
}

#glRoom {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  opacity: 1;
  transition: opacity 1s;
}

#glPlayerView {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: 25vh;
  height: 25vh;
  border-bottom-right-radius: 1em;
  transform: scale(-1, 1);
}

#captions {
  position: absolute;
  bottom: 0;
  left: 0em;
  right: 0em;
}

#captions:not(.visible) {
  display: none;
}

#captions > div {
  font-size: 2em;
  margin: 1em;
  padding: 0.5em;
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
  color: white;
  font-weight: bold;
}

#captions > div:not(.visible) {
  display: none;
}

@font-face {
    font-family: "Apotek Wide";
    font-weight: 100;
    src: url("/media/splash/fonts/Apotek Wide ExtraLight.woff2") format('woff');
}

#splash {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  margin: 0;
  border: none;

  background: rgba(0, 0, 0, 0.7);
  font: 20px "Apotek Wide", Arial, sans-serif;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: white;
  height: 100vh;
  overflow: auto;
  pointer-events: auto;

  opacity: 1;
  transition: opacity 0.25s ease-in;
}

#splash:not(.visible) {
  display: none;
}

#splash.hiding {
  opacity: 0;
  pointer-events: none;
}

#splashContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  padding: 1em;
  flex-shrink: 0;
}

#splashContent #instructions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#splashContent > * {
  flex-shrink: 0;
}

#credits {
  max-width: 25em;
  margin: 0 auto;
}

#credits dl {
  text-align: left;
}

#credits dl > dt {
  float: left;
  clear: both;
  padding: 0;
  margin: 0;
}

#credits dl > dt::after {
  content: ':\a0';
}

#credits dl > dd {
  margin: 0.5em 0;
}

#splash #subtitle {
  text-align: left;
  margin-left: 45%;;
}

#splash #subtitle h3 {
  margin: 0;
  font-size: 1em;
  color: #c2c1a5;
}

#splash #author {
  font-size: 0.9em;
  margin-top: -0.5em;
}

#splash #icons {
  display: flex;
  flex-direction: row;
  margin: 1em 0;
}

#splash #icons > img {
  flex-shrink: 0;
}

#splash footer > img {
  display: block;
}

#splash #icons > img {
  display: block;
  margin: 0 1em;
}

#splash #notes {
  color: #dcdcd4;
  display: flex;
  font-weight: 200;
  flex-wrap: wrap;
  justify-content: center;
  flex-shrink: 0;
}

#splash.splashed #notes {
  display: none;
}

#splash.splashed #options {
  margin-bottom: 2em;
}

#splash:not(.splashed) #credits {
  display: none;
}

#splash #notes > p {
  margin: 1.5em;
}

#splash header h1 {
  color: #afa924;
  font-size: 3.5em;
  font-weight: 600;
  margin-bottom: 0;
}

#splash header h2 {
  color: #dcdcd4;
  font-weight: 200;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: -0.7em;
  text-align: right;
}

#splash a {
  color: inherit;
}

#splash #captioningLabel {
  font-size: 1.5em;
}

#buttons {
  position: absolute;
  top: 1.5em;
  right: 1.5em;
  display: flex;
}

#buttons > button:not(:last-child) {
  margin-right: 1.5em;
}

#buttons > button {
  display: block;
  outline: none;
  border: none;
  cursor: pointer;
  pointer-events: auto;
  width: 3.25em;
  height: 3.25em;
  font: inherit;
  background: none;
  color: white;
}

#buttons > #toggleSplashButton {
  background: url(/media/splash/svg/sg-compass.svg);
  border-radius: 1em;
}

#buttons > #toggleVRButton {
  border: 0.15em solid white;
  border-radius: 1em;
}

#buttons > #toggleVRButton:not(.visible) {
  display: none;
}

.fancyCheckbox {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  visibility: hidden;
}

.fancyCheckbox + label {
  display: flex;
  align-items: center;
}

.fancyCheckbox + label .thumb {
  display: block;
  position: relative;
  width: 3.1em;
  height: 1.6em;
  border: 0.1em solid white;
  border-radius: 1.65em;
  margin: 0 1em;
  box-sizing: border-box;

}

.fancyCheckbox:checked + label .thumb::before {
  left: 1.65em;
  background: rgba(255, 255, 255, 0.5);
}

.fancyCheckbox + label .thumb::before {
  content: "";
  display: block;
  border: 0.1em solid white;
  position: absolute;
  top: 0.15em;
  left: 0.15em;
  width: 1.1em;
  height: 1.1em;
  border-radius: 1.25em;
  box-sizing: border-box;
  transition: all 0.25s ease-in-out;
}

@media only screen and (max-width: 400px) {
  body {
    padding: 2em 1em;
  }
  head #instructions {
    padding: 1em;
    margin: 2em 0;
  }
  #splash header h1 {
    font-size: 2.5em;
  }
  #splash header h2 {
    font-size: 1em;
  }
  #splash #icons {
    flex-wrap: wrap;
    justify-content: center;
    flex-shrink: 0;
  }
}
