/* css/artgen.css -- NFT GALLERY (NCO Artgen DLC)
 *
 * App styles for js/modes/artgen.js. Written against the LEGACY variables
 * (--fg, --cyan, --amber, --border, --bg-dim), not the --nos-* ones: inside
 * GHOST OS desktop.css remaps those legacy names onto the OS palette, so a
 * sheet written this way follows the player's theme instead of fighting it.
 * Do not hardcode colours here. The one exception is the launcher accent,
 * which lives in desktop.css with the other per-app accents.
 *
 * The gallery is GHOST-only, so these classes never appear in the legacy UI.
 */

.ag-panel { padding: 10px; }

/* ---- header stats ---- */
.ag-head {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 9px 11px; margin-bottom: 8px;
  border: 1px solid var(--border); background: var(--bg-dim);
  font-size: 12px; color: var(--fg-dim);
}
.ag-stat { display: flex; flex-direction: column; gap: 2px; }
.ag-stat strong { color: var(--cyan); font-weight: 600; font-size: 13px; }

/* ---- mint control ---- */
.ag-mint {
  padding: 10px 11px; margin-bottom: 8px;
  border: 1px solid var(--border); background: var(--bg-dim);
}
.ag-mint.is-ready { border-color: var(--amber); }
.ag-mint-label { font-size: 12px; color: var(--fg); margin-bottom: 8px; }
.ag-mint.is-ready .ag-mint-label { color: var(--amber); }

.ag-mint-row { display: flex; gap: 8px; align-items: center; }

.ag-select {
  padding: 6px 8px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--fg); font-family: inherit; font-size: 13px;
}
.ag-mint-btn { border-color: var(--amber); color: var(--amber); }
.ag-mint-btn:disabled { opacity: 0.45; cursor: default; }

.ag-mint-note { margin-top: 8px; font-size: 11px; line-height: 1.5; }

.ag-link-btn { border-color: var(--cyan); color: var(--cyan); }

.ag-locked {
  padding: 12px; font-size: 12px; line-height: 1.6; color: var(--fg-dim);
  border: 1px solid var(--border); background: var(--bg-dim);
}

.ag-msg { min-height: 16px; margin-bottom: 8px; font-size: 12px; }
.ag-msg.is-ok  { color: var(--cyan); }
.ag-msg.is-bad { color: var(--red); }

/* ---- tabs ---- */
.ag-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.ag-tab {
  flex: 1; padding: 7px 10px; cursor: pointer;
  border: 1px solid var(--border); background: transparent;
  color: var(--fg-dim); font-family: inherit; font-size: 12px;
  letter-spacing: 0.08em;
}
.ag-tab:hover { border-color: var(--fg-dim); }
.ag-tab.is-active { border-color: var(--cyan); color: var(--cyan); }

/* ---- the wall ---- */
.ag-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.ag-card {
  margin: 0; padding: 0;
  border: 1px solid var(--border); background: var(--bg-dim);
}
/* A player's own piece is marked on the public wall too -- the wall is
   where you go to see whether yours made it. */
.ag-card.is-mine { border-color: var(--amber); }

.ag-thumb {
  display: block; width: 100%; height: auto;
  /* The render is a square pixel grid; keeping the box square stops the
     grid reflowing every time an image finishes loading. */
  aspect-ratio: 1 / 1; object-fit: cover;
  background: var(--bg);
  image-rendering: pixelated;
}
.ag-cap {
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 8px; font-size: 11px; line-height: 1.4;
}
.ag-no { color: var(--cyan); font-weight: 600; font-size: 12px; }
.ag-alias {
  color: var(--fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ag-meta, .ag-votes { color: var(--fg-dim); }

.ag-empty { padding: 14px 4px; font-size: 12px; line-height: 1.6; }

/* Narrow phones: two columns still beat one huge tile per row. */
@media (max-width: 420px) {
  .ag-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .ag-head { gap: 10px; }
}
