/* Shared loading controls, positioned relative to each game's splash screen. */
.game-loading-group {
  display: contents;
}

.game-loading-status {
  position: absolute;
  z-index: 1;
  bottom: 82px;
  left: 50%;
  display: grid;
  width: min(420px, calc(100% - 32px));
  gap: 7px;
  transform: translateX(-50%);
}

.game-loading-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #f7f2e9;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 5px #07141b;
}

.game-loading-meta #loading-percent {
  color: #f5cf7a;
  font-variant-numeric: tabular-nums;
}

.game-loading-status .loading-progress {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(245, 207, 122, .34);
  border-radius: 999px;
  background: rgba(3, 12, 22, .82);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .45);
}

.game-loading-status .loading-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #126b4d, #32b77d 58%, #f5cf7a);
  transition: width .2s ease;
}

/* Stone Age keeps its amber fill. */
.game-loading-status:has(+ .is-stone-age) .loading-progress-fill {
  background: linear-gradient(90deg, #c97b31, #ffe09a);
}

.game-loading-group > .game-loading-start {
  position: absolute;
  z-index: 2;
  inset: auto auto 24px 50%;
  translate: -50% 0;
  height: 42px;
  min-height: 42px;
}

.game-loading-start.is-enchanted {
  display: grid;
  place-items: center;
  width: 100px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.game-loading-group > .game-loading-start.is-stone-age {
  width: min(198px, calc(100% - 32px));
}

.game-loading-start.is-stone-age img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-loading-group > .game-loading-start[hidden] {
  display: none;
}

.game-loading-start.is-load-ready:not(:disabled) {
  animation: game-load-ready 1s ease-in-out infinite;
}

@keyframes game-load-ready {
  50% { filter: brightness(1.24) drop-shadow(0 0 6px rgba(255, 223, 145, .65)); }
}

@media (prefers-reduced-motion: reduce) {
  .game-loading-start.is-load-ready:not(:disabled) {
    animation: none;
    filter: drop-shadow(0 0 5px rgba(255, 223, 145, .55));
  }
}
