/* THE GENERATE BOX (ui/GenerateBox.astro, which brings this file; Maayan, 2026-11-08, the miniature maker's panel as the one
   generate interface): a dark panel on the surface, the fields in a grid of twelve (each its span and rows), the
   Reference's slot at the end, the full height, a plus and "Add image" in it (the picture fills it once added); the red
   CTA centred under the panel; the error line under that. The fields are the kit's own (ui.css .g-field, .g-select);
   the radios a question and its answers on one line. Tokens only, square; a phone: one column. */
.g-genbox { display: grid; justify-items: center; gap: var(--g-5); margin: 0; }
.g-genbox__panel { box-sizing: border-box; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--g-8) * 3); gap: var(--g-5); padding: var(--g-5); background: var(--g-surface); text-align: start; }
.g-genbox__panel--noref { grid-template-columns: minmax(0, 1fr); }
.g-genbox__fields { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--g-4) var(--g-5); align-content: start; min-width: 0; }
.g-genbox__f { grid-column: span var(--gb-span, 12); grid-row: span var(--gb-rows, 1); min-width: 0; }
.g-genbox__f--tall { display: flex; flex-direction: column; }
.g-genbox__f--tall .g-field__input--tall { flex: 1; }
.g-genbox .g-field__label { font-size: var(--g-t-sub); color: var(--g-text); }
.g-genbox .g-field__input { background-color: var(--g-fill-strong); }   /* the colour only: a select keeps its chevron (ui.css .g-select__input) */
/* radios: the question, then the answers, on one line where there is room */
.g-genbox__radios { display: flex; flex-wrap: wrap; align-items: center; gap: var(--g-2) var(--g-5); margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.g-genbox__radios[hidden] { display: none; }
.g-genbox__radios legend { float: inline-start; padding: 0; margin-inline-end: var(--g-2); }
.g-genbox__radio { display: flex; align-items: center; gap: var(--g-3); cursor: pointer; }
.g-genbox__radio input { appearance: none; width: var(--g-6); height: var(--g-6); margin: 0; border-radius: var(--g-r-round); background: var(--g-fill-strong); cursor: pointer; }
.g-genbox__radio input:checked { background: radial-gradient(circle, var(--g-text) 0 36%, var(--g-fill-strong) 40%); }
.g-genbox__radio input:focus-visible { box-shadow: var(--g-ring); }
/* the Reference: its slot the column's full height, the picture covering it once added */
.g-genbox__ref { display: flex; flex-direction: column; gap: var(--g-2); min-height: calc(var(--g-8) * 3); }
.g-genbox__refhead { display: flex; align-items: center; justify-content: space-between; gap: var(--g-2); min-height: var(--g-icon); }
.g-genbox__refhead .g-iconbtn { margin-block: calc((var(--g-icon) - var(--g-touch)) / 2); }   /* the row's height its label's */
.g-genbox__thumb { flex: 1; display: grid; place-items: center; align-content: center; gap: var(--g-2); width: 100%; min-height: calc(var(--g-8) * 2); padding: var(--g-3); box-sizing: border-box; border: 0; border-radius: var(--g-r-sm);
  background: var(--g-fill-strong) no-repeat center / cover; color: var(--g-text); font: inherit; font-size: var(--g-t-sub); cursor: pointer; }
.g-genbox__thumb:hover, .g-genbox__thumb:focus-visible { outline: none; box-shadow: var(--g-ring); }
.g-genbox__plus { font-size: var(--g-t-large); font-weight: var(--g-w-bold); line-height: 1; }
.g-genbox__thumb.has-pic :is(.g-genbox__plus, .g-genbox__thumb-t) { visibility: hidden; }
/* a picture in: a pencil at its bottom corner, so the whole slot reads as "tap to change it" (Maayan, 2026-11-19) */
.g-genbox__thumb { position: relative; }
.g-genbox__edit { display: none; position: absolute; inset: auto var(--g-2) var(--g-2) auto; width: var(--g-6); height: var(--g-6); place-items: center; border-radius: 50%; background: var(--g-bg); color: var(--g-text); border: var(--g-hair) solid var(--g-text-2); pointer-events: none; }
.g-genbox__edit > svg { width: 60%; height: 60%; }
.g-genbox__thumb.has-pic .g-genbox__edit { display: grid; }
.g-genbox__thumb.is-sheet { background-size: contain; }
.g-genbox__cta { display: flex; justify-content: center; }
/* the links under the CTA (fields with below: true), centred, side by side */
.g-genbox__below { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--g-4); margin-top: var(--g-2); }
/* row: the CTA at the start, the links at the end of the same row */
.g-genbox__row { justify-self: stretch; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--g-3); }
.g-genbox__row > .g-genbox__below { margin-top: 0; }
.g-genbox__err { margin: calc(-1 * var(--g-3)) 0 0; color: var(--g-danger); font-size: var(--g-t-sub); font-weight: var(--g-w-semibold); text-align: center; }
.g-genbox__err[hidden] { display: none; }
@media (max-width: 699px) {
  .g-genbox__panel { grid-template-columns: minmax(0, 1fr); padding: var(--g-4); }
  .g-genbox__f { grid-column: 1 / -1; grid-row: auto; }
  .g-genbox__ref { min-height: 0; }
  .g-genbox__thumb { min-height: calc(var(--g-8) * 2); }
}
/* a link at a field's place (GenerateBox kind "link"): the kit's text button at its end (right, or left right to left) */
.g-genbox__link { display: flex; justify-content: flex-end; align-items: flex-start; }
/* SIDE BY SIDE (refs; the growl creator, Maayan's mocks 2026-11-19): the reference slots in a row, each a plus in a framed box,
   then the CTA in a darker panel of its own, centred in it */
.g-genbox--side { grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; align-items: stretch; gap: var(--g-gc-gap, var(--g-6)); }
.g-genbox__refs { display: flex; gap: var(--g-5); }
.g-genbox__thumb--ref { flex: 0 0 var(--g-gc-ref); height: var(--g-gc-ref-h); min-height: 0; border: var(--g-hair) solid var(--g-text-2); border-radius: var(--g-r-sm); background-color: transparent; }
.g-genbox__thumb--ref .g-genbox__plus { font-weight: normal; font-size: var(--g-t-hero); }
.g-genbox__side { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--g-4); padding: var(--g-5); border-radius: var(--g-fold-r); background: var(--g-bg); }
.g-genbox__side .g-btn { min-width: min(100%, var(--g-gc-cta)); }
.g-genbox--side > .g-genbox__err { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) { .g-genbox--side { grid-template-columns: minmax(0, 1fr); } .g-genbox__thumb--ref { flex: 1 1 0; } }
