/* A set of buttons a company makes itself (15.2979): the list's rows - the holder, the icon in its tile, the name over
   where it leads, a press opens the button's settings; the icon grid at its tile; the faces as the client sees them */
.bset-list { display: grid; }
.rg-row.bset-row { display: flex; align-items: center; gap: var(--sp-100); }
.bset-row > .grip { flex: none; color: var(--ink3); cursor: grab; }
.bset-sign {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--h-btn);
  height: var(--h-btn);
  border: none;
  border-radius: var(--r-s);
  background: var(--a-100);
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--dur-pop) var(--ease-out);
}
.bset-sign:hover { background: var(--fill-acc); color: var(--acc-fg); }
.bset-sign.still { cursor: inherit; }
.bset-sign.still:hover { background: var(--a-100); color: var(--ink); }
.rg-split > .rg-press.bset-press { gap: var(--sp-150); }
.bset-press > .rg-main { flex: 1 1 auto; min-width: 0; display: grid; }
.bset-press > .rg-end { flex: none; color: var(--ink3); }
/* a required thing not given: said in the danger's ink */
.bset-none { color: var(--danger-ink); }

/* a button's settings: the template, the proposal's data to put in, the message as it comes */
.bset-text { width: 100%; min-height: calc(var(--h-btn) * 3); resize: vertical; }
.bset-doing { display: contents; }
.bset-tokens { display: flex; flex-wrap: wrap; gap: var(--sp-075); }
button.chip.bset-token { gap: var(--sp-050); border: none; cursor: pointer; }
@media (hover: hover) { button.chip.bset-token:hover { background: var(--a-200); } }
/* a finger: the chip keeps its size, its press area grows to the touch height */
@media (pointer: coarse) {
  .bset-tokens { row-gap: var(--sp-150); }
  button.chip.bset-token { position: relative; }
  button.chip.bset-token::after { content: ""; position: absolute; inset: calc(var(--sp-150) * -1) 0; }
}
.bset-sample {
  justify-self: start;
  max-width: min(100%, calc(var(--sp-600) * 6));
  padding: var(--sp-100) var(--sp-150);
  border-radius: var(--r-l);
  background: var(--a-100);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.rg-row.bset-sample-row { display: grid; }
.bset-full { color: var(--ink2); font-size: var(--fs-s); }

/* the icon grid: 6 tiles a row, the chosen one on the accent */
.cp-pop:has(> .bset-pop) { width: max-content; padding: var(--sp-100); }
.bset-pop-head { padding: 0 var(--sp-050) var(--sp-100); color: var(--ink2); font-size: var(--fs-s); }
.bset-grid { display: grid; grid-template-columns: repeat(6, var(--h-btn)); gap: var(--sp-050); }
.bset-cell {
  display: grid;
  place-items: center;
  width: var(--h-btn);
  height: var(--h-btn);
  border: none;
  border-radius: var(--r-s);
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.bset-cell:hover { background: var(--a-100); }
.bset-cell.on { background: var(--acc-btn); color: var(--acc-btn-ink); }
.bset-cell:focus-visible { outline: calc(var(--bw) * 2) solid var(--acc); outline-offset: calc(var(--bw) * -2); }

/* the faces: as the client sees them - a column or a row, the corners by the shape, the lead one filled */
.bset-faces {
  --bset-paper: #ffffff; /* own colour: the proposal is a light document in either theme of the program */
  --bset-ink: #1d1a17; /* own colour: the proposal's own ink */
  display: flex; flex-direction: column; gap: var(--sp-100); min-width: 0;
}
.bset-faces[data-arrange="row"] { flex-direction: row; flex-wrap: wrap; }
.bset-faces[data-arrange="row"] > .bset-face { flex: 1 1 0; min-width: calc(var(--sp-600) * 2.5); }
.bset-face {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-100);
  min-width: 0;
  min-height: calc(var(--h-btn) * 1.4);
  padding: 0 var(--sp-300);
  border-radius: var(--r-l);
  background: var(--bset-paper);
  color: var(--bset-ink);
  font-weight: var(--fw-med);
}
.bset-face > .ic { flex: none; }
/* the lead one in the chosen colour, the others framed by it */
.bset-face { box-shadow: inset 0 0 0 var(--bw) color-mix(in srgb, var(--bset-color, var(--bset-ink)) 45%, transparent); }
.bset-face.lead { background: var(--bset-color, var(--bset-ink)); box-shadow: none; color: var(--bset-on, var(--bset-paper)); }
.bset-faces[data-shape="pill"] > .bset-face { border-radius: var(--r-full); }
.bset-faces[data-shape="square"] > .bset-face { border-radius: var(--r-xs); }

/* the preview: as wide as a smartphone's column, on the program's ground (the refusal page follows the client's
   theme); the proposal's faces on the proposal page's own ground, light in either theme */
.rg-row.bset-stage { display: grid; justify-items: center; padding: var(--sp-400) var(--sp-200); background: var(--bg); }
.rg-row.bset-stage:has(> .bset-faces) {
  background: #e9e6e0; /* own colour: the proposal page's ground (modules/kp/render.js), the same in either theme */
}
.bset-stage > .bset-faces { width: min(100%, calc(var(--sp-600) * 8)); }

/* a finger: the icon tiles and the way grow to the kit's touch size */
@media (pointer: coarse) {
  .bset-sign, .bset-cell { width: var(--tap, 44px); height: var(--tap, 44px); }
  .bset-grid { grid-template-columns: repeat(6, var(--tap, 44px)); }
}
