/* ============================================================================
 * Image-generation prompt listing — v4 type variant
 * Ported from Sigrix_new/marketplace/Marketplace - Listing Image Prompt v4.html
 *
 * The shell this sits on is `css/sx-listing-v4.css`, which the page loads
 * first: tokens, hero, sections, the unlock panel, details, related, the
 * sticky bar and the reviews module all live there and are shared with every
 * other v4 listing type. What is left here is the markup only a graphic prompt
 * renders — the hero mosaic of real generations, the opened prompt with the
 * buyer's own values, and the sample-output gallery.
 *
 * No token block: the shell's default accent is already this page's teal
 * (derived from --sx-accent, which is theme-flipped), so restating it here
 * would be a second copy that could drift. A type whose accent differs
 * declares it — see `sx-listing-skill.css`.
 * ==========================================================================*/

/* ── hero mosaic ────────────────────────────────────────────────────────── */
.ig-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ig-shot {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--sx-line);
  background: var(--sx-bg-2);
  margin: 0;
}
.ig-shot--square {
  aspect-ratio: 1 / 1;
}
.ig-shot--wide {
  aspect-ratio: 4 / 3;
}
/* The zoom trigger fills the shot. `.ig-shot img` below is `position:absolute;
   inset:0`, and this button is the positioned ancestor it now resolves
   against — the same box `.ig-shot` was — so the picture is unmoved. Border
   and background are cleared here because the frame is `.ig-shot`'s; the
   shared `.ig-zoom` in the shell sheet deliberately declares neither. */
button.ig-shot-fill {
  position: absolute;
  inset: 0;
  border: 0;
  background: none;
}
/* Real <img> elements, not CSS backgrounds — Google Images indexes in-page
   imagery and never og:image (handoff §5). */
.ig-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ig-shot-n {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  pointer-events: none;
  font-family: var(--ig-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ig-shot-badge-ink);
  background: var(--ig-shot-badge-bg);
  border: 1px solid var(--ig-shot-badge-line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 3px 7px;
  border-radius: 6px;
}

/* Prompt highlighting: the segments `highlight_prompt_segments` emits.
   Graphic-prompt-only — a skill's <pre> is its SKILL.md body, which the
   server does not segment. */
.ig-pre .v {
  color: var(--ig-accent);
}
.ig-pre .f {
  color: var(--ig-brand);
}
/* The buyer's own values, between the prompt and its copy buttons. Sits inside
   .ig-open's border, so it uses the same 26px gutter as .ig-pre and .ig-open-foot
   rather than a card of its own. */
.ig-fill {
  padding: 0 26px 20px;
  border-top: 1px solid var(--sx-line);
  padding-top: 18px;
}
.ig-fill-head {
  margin: 0 0 12px;
  font-family: var(--ig-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sx-text-3);
}
.ig-fill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.ig-fill-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ig-fill-field .k {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sx-text);
}
.ig-fill-field input,
.ig-fill-field select {
  width: 100%;
  min-width: 0;
  height: 38px;
  /* css/responsive.css floors every input at 44px site-wide and min-height
     beats height, so a 38px control renders 38x44 without this. */
  min-height: 0;
  padding: 0 11px;
  border: 1px solid var(--sx-line);
  border-radius: 10px;
  background: var(--sx-bg);
  color: var(--sx-text);
  font: inherit;
  font-size: 13.5px;
}
.ig-fill-field input:focus,
.ig-fill-field select:focus {
  outline: none;
  border-color: var(--ig-accent);
}
.ig-fill-field .h {
  font-size: 12px;
  line-height: 1.45;
  color: var(--sx-text-3);
}

/* ── 02 · sample outputs ────────────────────────────────────────────────── */
.ig-gal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ig-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
button.ig-card-img {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--sx-line);
  background: var(--sx-bg-2);
}
.ig-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ig-card-cap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
}
.ig-card-cap .k {
  font-family: var(--ig-mono);
  font-size: 11.5px;
  color: var(--ig-accent);
  flex: none;
}
.ig-card-cap .v {
  color: var(--sx-text-2);
}
/* The owner's caption is a list, not a line, so it drops the flex row above.
   `.ig-card-cap` and this modifier are the same specificity, so this has to
   come after it — which is also why the two sit together rather than in
   separate sections of the sheet. */
.ig-card-cap--vals {
  display: block;
}
/* What the seller typed in for this render, one row per placeholder. Cloned
   verbatim into the lightbox caption, so these rules dress both surfaces from
   one declaration — the zoomed view cannot style a value differently from the
   card it came from. */
.ig-vals {
  display: grid;
  gap: 5px 10px;
  margin: 0;
}
.ig-val {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ig-val dt {
  margin: 0;
  flex: none;
  font-family: var(--ig-mono);
  font-size: 11.5px;
  color: var(--ig-accent);
}
.ig-val dd {
  margin: 0;
  color: var(--sx-text-2);
}
.ig-gal-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px dashed var(--sx-line-2);
  border-radius: 14px;
  font-size: 13px;
  color: var(--sx-text-2);
}
.ig-gal-note svg {
  color: var(--sx-text-3);
  flex: none;
}

/* The gallery's own breakpoint. `.ig-rel` drops to two columns at the same
   width in the shell; only this grid is the graphic page's. */
@media (max-width: 760px) {
  .ig-gal {
    grid-template-columns: repeat(2, 1fr);
  }
}
