/* Bufff common */
.messages {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1000;
}

.message {
  background-color: #cfc;
  width: 90%;
  margin: 10px auto;
  padding: 10px;
  border: solid 1px #8a8;
  border-radius: 10px;
  text-align: center;
  transition: all 1s;
  pointer-events: auto;
  color: #000;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
th, td {
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  text-align: left;
}
th {
  background: var(--base-color-light);
  font-weight: 600;
}
tr:nth-child(even) td {
  background: #f3f4f6;
}
/* common layout */

.header ul {
  text-align: right;
}

.header ul li {
  display: inline-block;
}

/* new_game */

.game_creation .selected_image {
  max-width: 150px;
  max-height: 150px;
}

#image_picker_modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
}

#image-picker-contents {
  position: fixed;
  overflow-y: scroll;
  top: 15vw;
  left: 5vw;
  width: 90vw;
  height: calc(100vh - 20vw);
  background: rgba(255, 255, 255);
  border: solid 1px var(--border-color);
}

#image_picker_title {
  color: #000;
}

.image_picker_image img {
  max-width: 150px;
  max-height: 150px;
}

#image-picker-contents .page_link {
  margin-right: 10px;
}


/* new_game_completed */
.created-game-image.big {
  max-width: 350px;
  max-height: 350px;
}

.created-game-image.small {
  max-width: 250px;
  max-height: 250px;
}

/* unity */

#game-frame {
  z-index: 10;
  position: fixed;
  width: 100svw;
  height: calc(100svh - 70px);
  top: 70px;
  left: 0;
  background-color: #000;
  overflow: hidden;
}

#game-frame #unity-container {
  display: none;
  /*z-index: 11;*/
  position: absolute;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%);
  background: linear-gradient(to bottom, #cc0000 0%, #660000 40%, #000000 100%);
}

#game-frame #unity-container #unity-canvas {
  background: linear-gradient(to bottom, #cc0000 0%, #660000 40%, #000000 100%);
  width: 100%;
  height: 100%;
}

#unity-back-filter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 1);
  pointer-events: none;
  z-index: 1;
  width: 100%;
  height: 100%;
}

#game-frame #unity-container #unity-loading-bar {
  position: fixed;
  left: 50%;
  top: 78%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 20px;
  display: none;
}

#game-frame #unity-container #unity-progress-bar-back {
  width: 100%;
  height: 100%;
  margin: auto;
  background-color: rgba(0, 0, 0, 0.6);
  border: 3px solid #ffcc00;
  border-radius: 10px;
  box-shadow: 0px 5px 10px #000000;
  overflow: hidden;
}

#game-frame #unity-container #unity-progress-bar-front {
  position: absolute;
  width: 1%;
  height: 100%;
  background: linear-gradient(to bottom, #ff6666 0%, #cc0000 49%, #990000 51%, #660000 100%);
  border-radius: 0;
}

#game-frame #unity-container #unity-progress-bar-front::after {
  content: none;
}

#game-frame #unity-container #unity-loading-text {
  color: #fff;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
}

#game-frame #unity-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 40%;
  background: url('/static/img/load-logo.png');
  background-repeat: no-repeat;
  background-size: contain;
}

#unity-container #permission-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  background: url('/static/img/dialog-background.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: top;
  width: 80%;
  height: 30%;
  padding: 20px 0;
}

#unity-container #permission-dialog #permission-dialog-message {
  position: absolute;
  left: 50%;
  top: 35%;
  background: url('/static/img/dialog-message.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transform: translate(-50%, -50%);
  width: 80%;
  padding: 5% 5%;
  color: #fff;
  font-size: 100%;
  display: flex;
  text-align: center;
  justify-content: center;
  align-items: center;
}

#permission-dialog-button {
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 20%;
}

#unity-container #permission-dialog #permission-dialog-button button {
  border: none;
  outline: none;
  background: url('/static/img/dialog-button.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 150%;
}
