/* Prompt-to-game creation: the create view's progress, details form and the
   full-screen playtest overlay. Colours come from the tokens in base.html. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.generation-hint { font-size: 13px; color: var(--muted); line-height: 1.5; }

.generation-feedback {
  position: sticky;
  top: 64px;
  z-index: 5;
  background: var(--cream);
  padding: 1px 0 6px;
}
.generation-status { margin: 12px 0 10px; line-height: 1.6; font-weight: 600; }
/* No error token exists yet; this red reads on --cream. */
.generation-status[data-error="true"] { color: #9b3027; }

#generationProgress { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
#generationProgress progress { flex: 1; height: 8px; accent-color: var(--lime-dark); }
#generationElapsed { font-size: 13px; color: var(--muted); white-space: nowrap; }

.generation-details { margin-top: 28px; }
.generation-details > label,
.generation-fields > label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  font-size: 14px;
  font-weight: 600;
}
.generation-details input:not([type=radio]) {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
  color: var(--ink);
}
.generation-details input:focus { outline: 2px solid var(--lime-dark); outline-offset: 2px; }
.generation-details small { font-weight: 400; color: var(--muted); }
.generation-fields { display: grid; grid-template-columns: 1fr 100px; gap: 16px; }

.generation-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.generation-actions button:disabled,
.idea-submit:disabled { opacity: 0.45; cursor: wait; }

#generationInspiration { margin-top: 28px; }

/* These elements set display above, which would otherwise beat [hidden]. */
.generation-details[hidden],
#generationProgress[hidden],
#generationInspiration[hidden],
.generation-actions [hidden],
.generation-playtest[hidden] { display: none; }

.generation-playtest {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--ink);
}
.generation-playtest-bar {
  width: min(100%, 620px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--white);
}
.generation-playtest-bar strong { flex: 1; }
.generation-playtest-bar button {
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
.generation-playtest-bar button:disabled { opacity: 0.5; cursor: wait; }
.generation-playtest-stage {
  position: relative;
  width: min(100%, 480px);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
}
.generation-playtest-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--white);
}
.generation-playtest p { max-width: 620px; margin: 0; font-size: 13px; line-height: 1.5; color: #eee; }
.generation-playtest .generation-publish { background: var(--lime); font-weight: 700; }
.generation-playtest-close { background: var(--white); color: var(--ink); }

@media (max-width: 600px) {
  .generation-fields { grid-template-columns: 1fr 80px; }
  .generation-playtest {
    padding: 10px 8px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .generation-playtest-stage { border-radius: 8px; }
  .generation-playtest-bar { justify-content: space-between; }
  .generation-playtest-bar strong { display: none; }
}
