/* Lead-to-Booking, consultations: cards to choose one thing from, a reference brought in from another page, and
   the list of what a request still needs. Colours, radius and the display face are the business's own tokens. */

/* ---- cards to choose from: each a radio, with room for a few lines ---- */
.xb-cc { display: grid; gap: 8px; min-width: 0; max-width: 46rem; }
.xb-cc--3 { max-width: none; }
.xb-cc-legend { margin-bottom: 8px; font-weight: 700; }
.xb-cc-list { display: grid; gap: 10px; }
@media (min-width: 45em) { .xb-cc--3 .xb-cc-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.xb-cc-item { position: relative; display: block; cursor: pointer; }
.xb-cc-item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.xb-cc-face { position: relative; display: grid; align-content: start; gap: 6px; height: 100%; min-height: 64px; padding: 14px 48px 14px 16px; border: 1px solid var(--x-line); border-radius: var(--x-radius, 8px); background: var(--x-surface); transition: background-color var(--x-fast) ease, border-color var(--x-fast) ease; }
/* The mark of a choice: an empty ring until it is taken, then filled and ticked. */
.xb-cc-face::before { content: ""; position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; border: 1.5px solid var(--x-line); border-radius: 50%; background: var(--x-bg); }
.xb-cc-title { font: var(--x-display-weight, 600) 1.125rem/var(--x-lh-head) var(--x-display, var(--x-text)); }
.xb-cc-title:lang(th) { font-family: "x-figures", var(--x-display, var(--x-text)); font-weight: var(--x-th-display-weight, 600); }
/* A point stands before each fact, in a margin that is cut away: the first fact of a line shows none, however the line wraps. */
.xb-cc-meta { display: flex; flex-wrap: wrap; gap: 2px 0; margin-inline-start: -16px; clip-path: inset(0 0 0 16px); color: var(--x-muted); font-size: .8125rem; font-weight: 600; line-height: var(--x-lh-label); letter-spacing: var(--x-caps-track); text-transform: var(--x-caps); }
.xb-cc-meta > span { position: relative; padding-inline-start: 16px; }
.xb-cc-meta > span::before { content: "\00B7"; position: absolute; inset-inline-start: 0; width: 16px; font-weight: 400; letter-spacing: 0; text-align: center; }
/* A card's sentences are spans inside a label: they are given what the kit gives a paragraph, no last line of one short word. */
.xb-cc-text { font-size: .9375rem; text-wrap-style: pretty; }
.xb-cc-foot { padding-top: 8px; border-top: 1px solid var(--x-hair); color: var(--x-muted); font-size: .875rem; text-wrap-style: pretty; }
.xb-cc-why { display: flex; gap: 8px; font-size: .875rem; font-weight: 600; }
.xb-cc-why > .x-i { flex: none; margin-top: .3em; }
.xb-cc-item input:checked + .xb-cc-face { border-color: var(--x-accent); background: color-mix(in srgb, var(--x-accent) 9%, var(--x-surface)); box-shadow: inset 0 0 0 1px var(--x-accent); }
.xb-cc-item input:checked + .xb-cc-face::before { border-color: var(--x-accent); background: var(--x-accent); }
.xb-cc-item input:checked + .xb-cc-face::after { content: ""; position: absolute; top: 18px; right: 21px; width: 5px; height: 10px; border: solid var(--x-on-accent); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.xb-cc-item input:focus-visible + .xb-cc-face { outline: 2px solid var(--x-focus); outline-offset: 2px; }
.xb-cc-item--off { cursor: default; }
.xb-cc-item--off .xb-cc-face { border-style: dashed; background: var(--x-surface-2); }
.xb-cc-item--off .xb-cc-face::before { display: none; }
.xb-cc-item--off .xb-cc-title { color: var(--x-muted); }

/* ---- the picture beside the first step: the place a way of meeting happens in ---- */
.xb-c-place { display: grid; gap: 10px; }
.xb-c-place .x-img { width: 100%; border-radius: var(--x-radius, 8px); }
.xb-c-place-cap { display: grid; gap: 2px; padding-inline-start: 12px; border-inline-start: 3px solid var(--x-accent); }
.xb-c-place-k, .xb-ref-kicker, .xb-chk-h, .xb-c-part-h { color: var(--x-muted); font: 600 .8125rem/var(--x-lh-label) var(--x-text); letter-spacing: var(--x-caps-track); text-transform: var(--x-caps); }
.xb-c-place-t { font-weight: 700; }
.xb-c-place-n { color: var(--x-muted); font-size: .9375rem; }

/* ---- a step made of several small questions ---- */
.xb-c-fields { display: grid; gap: 18px; max-width: 46rem; }
.xb-c-fields > * { min-width: 0; }
.xb-c-fields .x-field { max-width: 30rem; }
/* On a very narrow screen, or one whose text has been made much larger, the strip of choices would cover a third of
   the page if it stayed in view: there it scrolls away with the step. */
@media (max-width: 20em) { .xb-side.x-stick { position: static; } }
/* The last field of the details is a tall one: when it takes focus at the foot of the screen it is brought clear
   of the edge. A browser left to itself shows its first line and leaves the rest below. */
html:has(#f-details) { scroll-padding-bottom: 9rem; }

/* ---- a reference: a sample project or a sample piece somebody pointed at ---- */
.xb-ref { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 14px; align-items: start; max-width: 44rem; padding: 12px 14px 12px 12px; border: 1px solid var(--x-hair); border-inline-start: 3px solid var(--x-accent); border-radius: var(--x-radius, 8px); background: var(--x-surface); }
.xb-ref-media .x-img { width: 100%; border-radius: var(--x-radius, 8px); }
.xb-ref-body { display: grid; gap: 3px; min-width: 0; }
.xb-ref-title { font-weight: 700; overflow-wrap: anywhere; }
.xb-ref-code { font-family: var(--x-stack-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.xb-ref-data { color: var(--x-muted); font-size: .875rem; }
.xb-ref-text { font-size: .9375rem; }
.xb-ref-act { margin: 2px 0 -6px -12px; }
/* The way to the thing itself: under the panel's own lines and as wide as the panel, so its words have room on a phone. */
.xb-ref-to { grid-column: 1 / -1; display: grid; gap: 6px; justify-items: start; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--x-hair); }
.x-dialog .xb-ref { background: var(--x-bg); }

/* ---- what a request still needs ---- */
.xb-chk { display: grid; gap: 8px; }
.xb-chk-list { display: grid; }
.xb-chk-item { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--x-hair); justify-items: start; }
.xb-chk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; width: 100%; }
.xb-chk-label { font-weight: 700; }
.xb-chk-text { font-size: .9375rem; }

/* ---- the staff queue: two lists, and what staff can switch ---- */
.xb-c-queue { display: grid; gap: 16px; }
.xb-c-queue > h2 { margin-top: 12px; }
.xb-c-switches { display: grid; gap: 4px; max-width: 46rem; padding: 14px 16px; border: 1px dashed var(--x-line); border-radius: var(--x-radius, 8px); }
.xb-c-switches > h2 { margin-bottom: 4px; font-size: 1.125rem; }
.xb-c-cell { display: grid; gap: 2px; justify-items: start; }
.xb-c-cell > span:nth-child(n+3) { color: var(--x-muted); font-size: .875rem; }
.xb-c-code { font-family: var(--x-stack-mono); font-size: .875rem; font-variant-numeric: tabular-nums; }
/* Six columns: the two that say what a row is about get the room the engine gives to its status and actions. */
@media (min-width: 37.5em) {
  .xb-c-queue .xb-table thead th:first-child { width: 11%; }
  .xb-c-queue .xb-table thead th:nth-child(2) { width: 14%; }
  .xb-c-queue .xb-table thead th:nth-last-child(2) { width: 17%; }
  .xb-c-queue .xb-table thead th:last-child { width: 21%; }
}
/* On a phone a row is three lines: a cell's own lines run on, with a point between them. */
@media (max-width: 37.49em) {
  .xb-c-cell, .xb-c-cell > span { display: inline; font-size: inherit; }
  .xb-c-cell > span + span::before { content: "\00B7"; margin-inline: 7px; color: var(--x-muted); }
  /* Who, what and which project each have a line of their own, so no line begins with a point. */
  .xb-c-queue .xb-table.xb-table--compact td:not(:nth-last-child(-n+2)) { flex: 0 0 100%; }
  .xb-c-queue .xb-table.xb-table--compact td:not(:nth-last-child(-n+2))::before { content: none; }
}

@media (hover: hover) and (pointer: fine) {
  .xb-cc-item:not(.xb-cc-item--off):hover .xb-cc-face { border-color: var(--x-ink); }
}
@media (forced-colors: active) {
  .xb-cc-item input:checked + .xb-cc-face { outline: 2px solid Highlight; outline-offset: -2px; }
}
