/* ════════════════════════════════════════════════════════════════════════════
   RESERVE PAGE (reserve-page.js; Devin, 2026-10-13, Round 2 of
   X:\SRSW\MASTER-PROMPT-RESERVE-SETTINGS.md): layout B, three columns.
   The Settings page's family: flat rows on hairlines, mono uppercase group
   titles, no boxes, no helper lines under headings (rules 35, 38, 54). A fine
   state is ink, never green (2026-09-04). Brass marks the one pending choice.
   Everything is scoped under .rsp; Inventory's Reserve and Staff pick cells
   reuse .rsp-switch and .rsp-pick at the bottom of this file. The design
   review (2026-10-13): plain words in place of framed controls, the reasons
   in sentence case, 44px taps on a phone.
   ════════════════════════════════════════════════════════════════════════════ */

.rsp {
  --rsp-brass: #8A6516;
  --rsp-brass-line: #C9A25C;
  --rsp-mono: "IBM Plex Mono", ui-monospace, monospace;
  max-width: 1480px;
}
:root[data-theme="dark"] .rsp {
  --rsp-brass: #E0AA55;
  --rsp-brass-line: #8A6516;
}

/* ── status line ─────────────────────────────────────────────────────────── */
.rsp-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-height: 44px;
  margin: 0 0 var(--space-6);
}
.rsp-mark { flex: none; display: inline-flex; width: 26px; height: 26px; }
.rsp-mark:empty { display: none; }
.rsp-mark svg { width: 100%; height: 100%; stroke: var(--adm-text); }
.rsp-mark.is-warn svg { stroke: var(--adm-status-pending-fg); }
.rsp-mark.is-busy svg { stroke: var(--rsp-brass); }
.rsp-mark.is-mute svg { stroke: var(--adm-text-mute); }
.rsp-status-word { font-size: var(--adm-text-xl); font-weight: 800; letter-spacing: -0.01em; color: var(--adm-text); }
.rsp-status-meta { font-size: var(--adm-text-base); color: var(--adm-text-dim); }
.rsp-status-meta:empty { display: none; }
.rsp-open {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border-color: transparent;
}
.rsp-open svg { width: 14px; height: 14px; stroke: currentColor; }

/* ── columns ─────────────────────────────────────────────────────────────── */
.rsp-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 0.92fr);
  gap: 0 var(--space-8);
  align-items: start;
}
.rsp-col { min-width: 0; }

/* ── groups and rows ─────────────────────────────────────────────────────── */
.rsp-group { margin: 0 0 var(--space-6); }
.rsp-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0;
  padding: 0 0 var(--space-2);
  border-bottom: 1px solid var(--adm-border-strong);
  font-family: var(--rsp-mono);
  font-size: var(--adm-text-2xs);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--adm-text-mute);
}
.rsp-title .rsp-mini {
  min-height: 32px;
  margin-bottom: -6px;
  padding: 0 var(--space-2);
  border-color: transparent;
  font-family: "Schibsted Grotesk", -apple-system, "Segoe UI", system-ui, sans-serif;
  font-size: var(--adm-text-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--adm-text-dim);
}
.rsp-title .rsp-mini[hidden] { display: none; }
@media (max-width: 899px), (pointer: coarse) {
  .rsp-title .rsp-mini { min-height: 44px; margin-bottom: -12px; }
}
.rsp-rows { display: flex; flex-direction: column; }
.rsp-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--adm-border);
}
.rsp-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rsp-row-label { font-size: var(--adm-text-base); font-weight: 600; color: var(--adm-text); overflow-wrap: anywhere; }
.rsp-row-meta { font-size: var(--adm-text-2xs); color: var(--adm-text-mute); overflow-wrap: anywhere; }
.rsp-row-end { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: var(--space-1); }
.rsp-row.is-quiet .rsp-row-label { font-weight: 500; color: var(--adm-text-dim); }
.rsp-tight { min-height: 46px; }
.rsp-value { font-size: var(--adm-text-sm); color: var(--adm-text); white-space: nowrap; }
.rsp-value.is-bad { color: var(--bad); white-space: normal; text-align: right; }
.rsp-tag {
  font-family: var(--rsp-mono);
  font-size: var(--adm-text-2xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-text-mute);
  white-space: nowrap;
}
.rsp-note { margin: var(--space-2) 0 0; font-size: var(--adm-text-sm); color: var(--adm-text-dim); }
.rsp-note:empty { display: none; }
.rsp-note.is-error { color: var(--bad); }
.rsp-loading,
.rsp-empty { padding: var(--space-4) 0; font-size: var(--adm-text-sm); color: var(--adm-text-mute); }
.rsp-loading[hidden] { display: none; }
.rsp-more { margin-top: var(--space-2); min-height: 44px; padding: 0 var(--space-2); border-color: transparent; }
.rsp-more[hidden] { display: none; }

/* ── what the website shows ──────────────────────────────────────────────── */
.rsp-nums {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-7);
  margin: var(--space-4) 0 var(--space-3);
}
.rsp-num { display: flex; align-items: baseline; gap: 8px; }
.rsp-num b { font-size: 28px; line-height: 1; font-weight: 800; letter-spacing: -0.01em; color: var(--adm-text); font-variant-numeric: lining-nums; }
.rsp-num span { font-size: var(--adm-text-sm); color: var(--adm-text-dim); }
.rsp-num.is-quiet b { color: var(--adm-text-mute); font-weight: 700; }
.rsp-next { margin: calc(-1 * var(--space-1)) 0 var(--space-3); font-size: var(--adm-text-sm); color: var(--adm-text-dim); }
.rsp-bar { display: flex; gap: 2px; height: 8px; margin-bottom: var(--space-2); }
.rsp-bar .rsp-seg { display: block; height: 100%; min-width: 3px; }
/* Ink for on the website, then lighter greys for each reason held back. */
.rsp-seg.s0 { background: var(--adm-text); }
.rsp-seg.s1 { background: var(--adm-text-dim); }
.rsp-seg.s2 { background: var(--adm-text-mute); }
.rsp-seg.s3 { background: var(--adm-border-strong); }
.rsp-seg.s4,
.rsp-seg.s5,
.rsp-seg.s6 { background: var(--adm-border); }

/* The two rules: dropdowns, each change confirmed before it is saved. */
.rsp-rules { display: flex; flex-direction: column; gap: var(--space-5); margin: var(--space-6) 0 var(--space-3); }
.rsp-rule-head { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 4px var(--space-2); }
.rsp-rule-label { font-size: var(--adm-text-base); font-weight: 600; color: var(--adm-text); }
.rsp-rule-scope { font-size: var(--adm-text-2xs); color: var(--adm-text-mute); }
.rsp-select {
  grid-column: 1 / -1;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 0 28px 0 0;
  border: 0;
  border-bottom: 1px solid var(--adm-border-strong);
  border-radius: 0;
  background: transparent;
  color: var(--adm-text);
  font: inherit;
  font-size: var(--adm-text-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.rsp-rule-head { position: relative; }
.rsp-rule-head::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 18px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--adm-text-dim);
  border-bottom: 1.5px solid var(--adm-text-dim);
  transform: rotate(45deg);
  pointer-events: none;
}
.rsp-select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.rsp-select:disabled { color: var(--adm-text-mute); cursor: default; }
.rsp-confirm { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 2px solid var(--rsp-brass-line); }
.rsp-confirm[hidden] { display: none; }
.rsp-confirm-title { margin: 0; font-size: var(--adm-text-base); font-weight: 700; color: var(--adm-text); }
.rsp-confirm-body { margin: 4px 0 0; font-size: var(--adm-text-sm); line-height: 1.45; color: var(--adm-text-dim); }
.rsp-confirm-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.rsp-fixed {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-6);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--adm-border);
  font-size: var(--adm-text-sm);
  color: var(--adm-text-dim);
}
.rsp-fixed b { font-weight: 600; color: var(--adm-text); margin-right: 6px; }

/* How the store runs: quieter labels, the value at the right. */
.rsp-facts .rsp-row { min-height: 40px; }
.rsp-facts .rsp-row-label { font-size: var(--adm-text-sm); font-weight: 500; color: var(--adm-text-dim); }

/* ── bottles ─────────────────────────────────────────────────────────────── */
.rsp-list-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5); margin: var(--space-3) 0 var(--space-2); }
/* The three lists are words, the one shown underlined in ink; no framed segment control. */
.rsp .rsp-seg-control { gap: var(--space-5); padding: 0; background: transparent; border: 0; border-radius: 0; }
.rsp .rsp-seg-control .seg-btn {
  min-height: 40px;
  padding: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  font-size: var(--adm-text-base);
}
.rsp .rsp-seg-control .seg-btn.is-active { background: transparent; box-shadow: none; color: var(--adm-text); border-bottom-color: var(--adm-text); }
.rsp .seg-btn .rsp-n { margin-left: 6px; font-weight: 500; color: var(--adm-text-mute); font-variant-numeric: tabular-nums; }
.rsp .seg-btn.is-active .rsp-n { color: var(--adm-text-dim); }
/* Find a bottle: a line to write on, not a box. */
.rsp .rsp-find.inv-search {
  flex: 1 1 180px;
  max-width: none;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--adm-border-strong);
  border-radius: 0;
}
.rsp .rsp-find.inv-search:focus-within { border-color: var(--adm-text); box-shadow: inset 0 -1px 0 var(--adm-text); }
/* The reasons under Held back: words with their count, the chosen one in ink. */
.rsp-chips { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); margin: 0 0 var(--space-1); }
.rsp-chips[hidden] { display: none; }
.rsp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--adm-text-dim);
  font: inherit;
  font-size: var(--adm-text-sm);
  cursor: pointer;
}
.rsp-chip .rsp-n { color: var(--adm-text-mute); font-variant-numeric: tabular-nums; }
.rsp-chip.is-active { color: var(--adm-text); font-weight: 600; border-bottom-color: var(--adm-text); }
.rsp-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) {
  .rsp-chip:hover { color: var(--adm-text); }
}
.rsp-bottle { min-height: 64px; }
.rsp-thumb { flex: none; width: 30px; height: 48px; object-fit: contain; }
.rsp-thumb-empty { display: inline-flex; align-items: center; justify-content: center; }
.rsp-thumb-empty svg { width: 22px; height: 34px; stroke: var(--adm-text-mute); stroke-width: 1.3; }
.rsp-why { font-size: var(--adm-text-sm); color: var(--adm-text-dim); white-space: nowrap; }
.rsp-bottle .rsp-row-end { gap: var(--space-3); }
.rsp-bottle .rsp-pick { padding: 0 4px; }

/* ── store side ──────────────────────────────────────────────────────────── */
.rsp-act { min-height: 50px; }
.rsp-act .rsp-row-label { font-weight: 500; }
.rsp-tasting .rsp-armed { min-height: 44px; padding: 0 var(--space-3); border-color: transparent; font-size: var(--adm-text-sm); }
.rsp-armed.is-armed { color: var(--bad); }
.rsp-form { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--adm-border); }
.rsp-form[hidden] { display: none; }
.rsp-form-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2); }
.rsp-field { display: flex; flex-direction: column; gap: 4px; }
.rsp-field-label { font-size: var(--adm-text-2xs); color: var(--adm-text-mute); }
.rsp-input.set-input { border-radius: 0; }
.rsp-form-acts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }

/* ── the switch and the pick (the Reserve page and Inventory) ────────────── */
.rsp-switch,
.rsp-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--adm-text-dim);
  font: inherit;
  font-size: var(--adm-text-sm);
  cursor: pointer;
}
.rsp-switch:focus-visible,
.rsp-pick:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.rsp-switch:disabled,
.rsp-pick:disabled { opacity: 0.5; cursor: default; }
.rsp-box {
  flex: none;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1.5px var(--adm-text-mute);
  background: var(--adm-surface);
}
.rsp-switch.is-on .rsp-box { background: var(--adm-text); box-shadow: none; }
.rsp-box svg { width: 14px; height: 14px; stroke: var(--adm-surface); stroke-width: 2.4; }
.rsp-switch.is-on { color: var(--adm-text); }
.rsp-switch-word { min-width: 2em; text-align: left; }
.rsp-pick { justify-content: center; color: var(--adm-text-mute); }
.rsp-pick svg { width: 18px; height: 18px; stroke: currentColor; }
.rsp-pick.is-on { color: var(--adm-text); font-weight: 600; }
.rsp-pick.is-on svg { fill: currentColor; }

/* ── width ───────────────────────────────────────────────────────────────── */
/* Between the phone and a wide screen: the store side goes under the rules,
   and the bottle list keeps the right-hand column to itself. */
@media (min-width: 900px) and (max-width: 1279px) {
  .rsp-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .rsp-cols > .rsp-col:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
  .rsp-cols > .rsp-col:nth-child(3) { grid-column: 1; grid-row: 2; }
}
@media (max-width: 899px) {
  .rsp-cols { grid-template-columns: minmax(0, 1fr); }
  /* One column: what the website shows, the store side, the bottles, Activity, then the facts. */
  .rsp-cols > .rsp-col { display: contents; }
  .rsp-shows { order: 1; }
  .rsp-hours { order: 2; }
  .rsp-tastings { order: 3; }
  .rsp-bottles { order: 4; }
  .rsp-activity { order: 5; }
  .rsp-facts { order: 6; }
  .rsp .rsp-seg-control { width: 100%; gap: var(--space-4); }
  .rsp .rsp-seg-control .seg-btn { min-height: 44px; }
  .rsp-chip { min-height: 44px; }
  .rsp-status-word { font-size: 20px; }
  .rsp-open { margin-left: 0; padding: 0 var(--space-2); }
  .rsp-num b { font-size: 24px; }
  .rsp-nums { gap: var(--space-2) var(--space-5); }
  .rsp-select { font-size: 16px; }
  .rsp-input.set-input { font-size: 16px; }
}
/* A phone gives the bottle's name the whole width; the switch, the pick or the reason sit under it. */
@media (max-width: 599px) {
  .rsp-bottle { flex-wrap: wrap; row-gap: 0; padding-bottom: var(--space-1); }
  .rsp-bottle .rsp-row-text { flex-basis: calc(100% - 30px - var(--space-3)); }
  .rsp-bottle .rsp-row-end { flex: 1 1 100%; justify-content: flex-start; padding-left: calc(30px + var(--space-3)); }
  .rsp-bottle .rsp-switch { order: -1; padding-left: 0; }
}

/* ── Inventory's Reserve and Staff pick cells (admin-sections.js invReserveFill,
   invPickFill) and the product page's Reserve on/off note ────────────────── */
.inv-res-td { white-space: nowrap; }
.inv-res-td .rsp-switch,
.inv-res-td .rsp-pick { min-height: 32px; min-width: 32px; padding: 0 4px; vertical-align: middle; }
@media (pointer: coarse) {
  .inv-res-td .rsp-switch,
  .inv-res-td .rsp-pick { min-height: 44px; min-width: 44px; }
}
.inv-res-why,
.inv-res-none { color: var(--adm-text-mute); }
.inv-res-who { margin-left: 4px; font-size: var(--adm-text-2xs); color: var(--adm-text-dim); }
.inv-card-res {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-4);
  margin-top: var(--space-2);
  padding-top: var(--space-1);
  border-top: 1px solid var(--adm-border);
  font-size: var(--adm-text-sm);
}
.inv-card-res-part { display: inline-flex; align-items: center; gap: 2px; }
.inv-card-res-part:empty { display: none; }
.inv-card-res .rsp-pick { gap: 6px; padding: 0 6px; }
.inv-venue-err.inv-res-note { color: var(--adm-text-mute); }
.inv-venue-err.inv-res-note.is-error { color: var(--bad); }
/* The product page's Reserve and Staff pick buttons: the table's check square and ribbon, in ink
   (a fine state is never green). The Tasting room button beside them keeps its own look. */
.inv-venue-btn.inv-res-btn.is-on { color: var(--adm-text); border-color: var(--adm-border-strong); background: var(--adm-surface-2); }
.inv-res-btn .rsp-box { width: 18px; height: 18px; }
.inv-res-btn.is-on .rsp-box { background: var(--adm-text); box-shadow: none; }
.inv-res-btn .rsp-box svg { width: 12px; height: 12px; stroke: var(--adm-surface); stroke-width: 2.4; }
.inv-res-pick.is-on svg { fill: currentColor; }
