/* From the download to a game that sells: the Game Maker page's four steps (templates/_publish_steps.html) and the
   /help/publish page (templates/help_publish.html). Colours come from the theme's tokens (theme.css: dark, one glossy blue). */

/* the steps card follows the export card: hidden with it */
#game-export[hidden] ~ .publish-steps { display: none; }

.publish-steps { display: grid; gap: 14px; margin-top: 16px; }
.publish-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.publish-more { font-weight: 700; }
.publish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.publish-list li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, 0.02);
}
.publish-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad-blue); color: #fff; font-weight: 700; font-size: 0.98rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 18px -6px rgba(29, 107, 255, 0.85);
}
.publish-copy { display: grid; gap: 2px; min-width: 0; }
.publish-copy b { font-size: 1rem; font-weight: 600; }
.publish-copy span { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 560px) {
  .publish-list li { grid-template-columns: auto 1fr; }
  .publish-list li .btn { grid-column: 2; justify-self: start; }
}

/* /help/publish: a plain guide in the new look: a big heading, numbered step cards, the questions as the site's accordion */
.help-publish { display: grid; gap: clamp(22px, 3vw, 32px); padding-top: clamp(32px, 6vw, 72px); padding-bottom: 32px; max-width: 860px; }
.help-hero { display: grid; gap: 14px; text-align: center; justify-items: center; }
.help-hero .t-eyebrow { margin: 0; }
.help-publish h1 { margin: 0; font-size: clamp(2.4rem, 6.4vw, 4.6rem); max-width: 16ch; }
.help-hero .lead { margin: 0; max-width: 560px; }
.help-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.help-step { display: grid; gap: 12px; padding: clamp(18px, 3vw, 28px); }
.help-step h2 { display: flex; align-items: center; gap: 14px; margin: 0; font-size: clamp(1.2rem, 2.2vw, 1.45rem); letter-spacing: -0.02em; }
.help-step h2::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad-blue); color: #fff; font-size: 1.05rem; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 22px -8px rgba(29, 107, 255, 0.9);
}
.help-step p, .help-step li { font-size: 1.02rem; line-height: 1.65; color: var(--ink-2); }
.help-step p b, .help-step li b { color: var(--ink); font-weight: 600; }
.help-step p { margin: 0; }
.help-step ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
/* the boxes where a screenshot will go: shown once a picture is in one (until then they would only say "placeholder") */
.help-shot {
  display: grid; place-items: center; min-height: 140px; border: 1px dashed var(--line-2); border-radius: var(--r);
  color: var(--ink-2); font-size: 0.9rem; text-align: center; padding: 12px; background: rgba(255, 255, 255, 0.02);
}
.help-shot:not(:has(img, video)) { display: none; }
.help-shot img, .help-shot video { width: 100%; height: auto; border-radius: 10px; }
.help-step kbd {
  font-family: var(--font-body); font-weight: 600; font-size: 0.88em; padding: 1px 7px; border-radius: 7px;
  border: 1px solid var(--line-2); background: var(--surface-3); color: var(--ink);
}
.help-faq { display: grid; gap: 10px; max-width: none; }
.help-faq > h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 8px 0 6px !important; }
.help-manual h2::before { display: none; }
.help-step ol { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 4px; }
.help-cta { text-align: center; display: grid; justify-items: center; gap: 12px; padding: clamp(28px, 5vw, 48px) 20px; }
.help-cta h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.help-cta p { margin: 0; color: var(--ink-2); max-width: 460px; }
@media (max-width: 560px) { .help-step h2::before { width: 34px; height: 34px; border-radius: 10px; font-size: 0.95rem; } }

/* "Publish to Roblox, shop included" (templates/_roblox_publish.html, static/js/shopsetup.js) */
.roblox-publish { display: grid; gap: 16px; margin-top: 16px; border-color: rgba(52, 211, 153, 0.45); }
.roblox-publish[hidden] { display: none; }
.rp-lead { color: var(--ink-2); margin-top: 4px; max-width: 64ch; }
.rp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rp-step {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, 0.02);
}
.rp-step .publish-num { margin-top: 2px; }
.rp-how { margin-top: 6px; }
.rp-how summary { cursor: pointer; font-weight: 700; color: var(--blue); }
.rp-how-list { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink); font-size: 0.95rem; }
.rp-how-list ul { margin: 4px 0; padding-left: 18px; }
.rp-how code, .help-step code {
  font-size: 0.85em; padding: 0 5px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line);
}
.rp-form { display: grid; gap: 10px; margin-top: 8px; }
.rp-field { display: grid; gap: 4px; }
.rp-field .input { width: 100%; min-width: 0; }
.rp-check { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.rp-check input { margin-top: 3px; }
.rp-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.rp-safe { display: inline-flex; align-items: center; gap: 6px; }
.rp-safe .i { width: 14px; height: 14px; }
.rp-err { color: var(--red); font-weight: 700; }
.rp-run { display: grid; gap: 12px; }
.rp-run[hidden], .rp-result[hidden] { display: none; }
.rp-progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rp-progress li {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center;
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line);
}
.rp-progress li b { font-size: 0.92rem; }
.rp-progress .rp-text { grid-column: 2; font-size: 0.8rem; color: var(--ink-3); min-height: 1em; }
.rp-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line-2); }
.rp-progress li[data-state="running"] .rp-dot { background: var(--blue); animation: rp-pulse 1s var(--ease) infinite alternate; }
.rp-progress li[data-state="done"] .rp-dot { background: var(--green); }
.rp-progress li[data-state="failed"] .rp-dot { background: var(--red); }
.rp-progress li[data-state="skipped"] .rp-dot { background: var(--accent); }
.rp-progress li[data-state="done"] { border-color: var(--green); }
.rp-progress li[data-state="failed"] { border-color: var(--red); }
@keyframes rp-pulse { from { transform: scale(0.8); opacity: 0.6; } to { transform: scale(1.1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rp-progress li[data-state="running"] .rp-dot { animation: none; } }
.rp-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px; }
@media (max-width: 560px) { .rp-items { grid-template-columns: 1fr; } .rp-item { padding: 6px 10px; grid-template-columns: minmax(0, 1fr) auto auto; } .rp-kind { display: none; } }
.rp-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 2px 8px; align-items: center;
  padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface);
}
.rp-kind { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--ink-3); }
.rp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-price { font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }
.rp-state {
  justify-self: end; white-space: nowrap; font-size: 0.78rem; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2);
}
.rp-note { grid-column: 1 / -1; font-size: 0.8rem; color: var(--ink-3); }
.rp-item[data-state="created"] .rp-state, .rp-item[data-state="exists"] .rp-state,
.rp-item[data-state="updated"] .rp-state { background: var(--green-soft); color: var(--green-d); }
.rp-item[data-state="failed"] { border-color: var(--red); }
.rp-item[data-state="failed"] .rp-state { background: var(--red-soft); color: var(--red-d); }
.rp-item[data-state="skipped"] { opacity: 0.75; }
.rp-result { display: grid; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--green-soft); }
.rp-result[data-status="partial"], .rp-result[data-status="failed"], .rp-result[data-status="interrupted"] { background: var(--accent-soft); }
.rp-result-text { font-weight: 700; color: var(--ink); }
.rp-result-go { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-result-go [hidden] { display: none; }
.rp-next { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink); }
.rp-next[hidden] { display: none; }
/* "Connect your Roblox shop" (game/shopconnect.py): the no-key way, first; the key way folded under it */
.rp-connect {
  display: grid; gap: 12px; padding: 14px 16px; border: 1px solid rgba(74, 144, 255, 0.5); border-radius: var(--r);
  background: var(--surface);
}
.rp-connect-copy { display: grid; gap: 4px; }
.rp-connect-title { font-size: 1.1rem; }
.rp-connect-sub { color: var(--ink-2); max-width: 64ch; }
.rp-badge {
  justify-self: start; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-d);
}
.rp-connect-off, .rp-connect-on { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.rp-connect-on { display: grid; gap: 10px; }
.rp-connect-off[hidden], .rp-connect-on[hidden], .rp-note-line[hidden] { display: none; }
.rp-connected { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green-d); }
.rp-connected .i { width: 16px; height: 16px; }
.rp-connect .rp-field { max-width: 420px; }
.rp-note-line { font-weight: 700; color: var(--ink); }
.rp-note-line[data-tone="bad"] { color: var(--red); }
.rp-keyway { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; background: rgba(255, 255, 255, 0.02); }
.rp-keyway > summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.rp-keyway[open] > summary { margin-bottom: 10px; }
.rp-keyway .rp-step { background: var(--surface); }
@media (max-width: 560px) { .rp-connect-off .btn, .rp-connect-on .rp-go .btn-lg { width: 100%; justify-content: center; } }
@media (max-width: 760px) { .rp-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .rp-step { grid-template-columns: auto 1fr; }
  .rp-step > .btn { grid-column: 2; justify-self: start; }
  .rp-go .btn { width: 100%; justify-content: center; }
}
