/* Loaded after Unity's Default template stylesheet in the site's copy of the build. */
html,
body {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #151e21;
}

#unity-container,
#unity-container.unity-desktop,
#unity-container.unity-mobile {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 38px;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  transform: none;
  overflow: hidden;
}

/* Override the desktop template's inline 960 x 600 dimensions. Unity keeps its
   render target matched to these fluid client dimensions by default. */
#unity-canvas {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  touch-action: none;
}

/* Keep the original fullscreen button available on desktop and mobile. */
#unity-container #unity-footer {
  grid-column: 1;
  grid-row: 2;
  display: block;
  position: relative;
  height: 38px;
  min-width: 0;
  overflow: hidden;
  color: #202124;
  background: #fff;
}

#unity-build-title {
  max-width: calc(100% - 150px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#unity-fullscreen-button {
  padding: 0;
  border: 0;
  cursor: pointer;
}

#unity-fullscreen-button:focus-visible {
  outline: 3px solid #007d7b;
  outline-offset: -3px;
}

#unity-loading-bar {
  pointer-events: none;
}

#unity-warning {
  z-index: 2;
  box-sizing: border-box;
  max-width: calc(100% - 2rem);
  max-height: calc(100% - 4rem);
  overflow: auto;
  overflow-wrap: anywhere;
}

@supports (height: 100dvh) {
  #unity-container,
  #unity-container.unity-desktop,
  #unity-container.unity-mobile {
    height: 100dvh;
  }
}

#unity-canvas:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
}

#unity-container:fullscreen {
  grid-template-rows: minmax(0, 1fr);
}

#unity-container:fullscreen #unity-footer {
  display: none;
}
