/* components.css: the shared primitives of the Quoting System Mockup. It starts as kit/shell/base.css and keeps every class name of it; the foundation lane owns it and refines it here.
   Tokens only: shared/theme.css and quote-tokens.css. No hex value in this file. Prefix q- is the shared system; a lane writes its own classes under its own prefix.
   Every primitive and every state is drawn on components.html, in both themes. */
.q-root, .q-root *{ box-sizing:border-box; }
.q-root{ font-family:var(--font); color:var(--text); font-size:14px; line-height:20px; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
.q-num{ font-family:var(--font-num); font-variant-numeric:tabular-nums lining-nums; text-align:right; white-space:nowrap; }
.q-muted{ color:var(--text-muted); } .q-fine{ font-size:var(--type-fine-size); line-height:var(--type-fine-lh, 1.4); } .q-strong{ font-weight:600; }
.q-h{ font-size:16px; line-height:24px; font-weight:600; margin:0; } .q-h-lg{ font-size:20px; line-height:28px; font-weight:650; margin:0; letter-spacing:-.01em; }
.q-row{ display:flex; align-items:center; gap:var(--space-1); } .q-row-between{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-2); }
.q-stack{ display:flex; flex-direction:column; gap:var(--space-2); } .q-grow{ flex:1 1 auto; min-width:0; }
.q-icon{ line-height:0; } .q-icon svg{ display:block; }
.q-mark{ display:inline-flex; flex:none; line-height:0; } .q-mark svg{ display:block; }
.q-divider{ height:1px; background:var(--border); border:0; margin:0; }

/* ---- buttons: 36 tall on the shop side; .q-btn-lg is 48 for the customer page and for a screen's one primary action ---- */
.q-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; height:36px; padding:0 14px; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--surface); color:var(--text);
  font:600 14px/20px var(--font); cursor:pointer; white-space:nowrap; text-decoration:none; transition:background var(--bws-motion), border-color var(--bws-motion), box-shadow var(--bws-motion), transform .08s; }
.q-btn:hover{ background:var(--surface-hi); border-color:var(--border-strong); } .q-btn:active{ transform:translateY(1px); }
.q-btn:focus-visible, .q-chip:focus-visible, .q-input:focus-visible, .q-select:focus-visible, .q-textarea:focus-visible, .q-seg button:focus-visible, .q-link:focus-visible, .q-toggle:focus-visible, .q-info:focus-visible, .q-fig:focus-visible, .q-menu-item:focus-visible{
  outline:var(--focus-ring-width, 2px) solid var(--focus-ring-color, var(--accent)); outline-offset:2px; }
.q-btn-primary{ background:var(--accent-deep); border-color:var(--accent-deep); color:var(--on-accent); box-shadow:var(--elev-1); } .q-btn-primary:hover{ background:var(--accent); border-color:var(--accent); }
.q-btn-quiet{ border-color:transparent; background:transparent; } .q-btn-quiet:hover{ background:color-mix(in srgb, var(--text) 8%, transparent); border-color:transparent; }
/* HIS ITEM 6 (lane q1125-his-six, 11/25/2026: "that just looks like text. That doesn't look like a button to me"): on the shop side every action looks like a button. The quiet kind keeps
   no fill but always has a visible border there. The rule is scoped to the module root's data-side, and reaches a dialog on the body beside that root; the customer side keeps the rule
   above, and customer.css restyles its own band. */
.qm-root[data-side="shop"] .q-btn-quiet, body:has(.qm-root[data-side="shop"]) .q-scrim .q-btn-quiet{ border-color:var(--border); }
.qm-root[data-side="shop"] .q-btn-quiet:hover, body:has(.qm-root[data-side="shop"]) .q-scrim .q-btn-quiet:hover{ border-color:var(--border-strong); }
.q-btn-danger{ color:var(--danger); } .q-btn-danger:hover{ background:var(--danger-soft); border-color:var(--danger); }
.q-btn-lg{ height:48px; padding:0 22px; font-size:16px; border-radius:var(--radius-md); } .q-btn-sm{ height:28px; padding:0 10px; font-size:13px; }
.q-btn[disabled], .q-btn[aria-disabled="true"]{ opacity:.5; cursor:not-allowed; transform:none; box-shadow:none; }
.q-link{ color:var(--accent-deep); font-weight:600; text-decoration:underline; text-underline-offset:3px; cursor:pointer; background:none; border:0; padding:0; font:inherit; font-weight:600; }
.q-link:hover{ text-decoration-thickness:2px; }

/* ---- chips. A state is never shown by color alone: every state chip carries a glyph (QUI.stateChip adds it). ---- */
.q-chip{ display:inline-flex; align-items:center; gap:6px; height:24px; padding:0 10px; border-radius:var(--radius-pill); border:1px solid var(--border); background:var(--surface); color:var(--text); font:600 12px/16px var(--font); white-space:nowrap; }
/* a soft fill is light in both themes, so everything on one is written in its ink, never in the page's text color (which is light in Midnight Oak) */
.q-chip-ok{ background:var(--ok-soft); border-color:var(--ok); color:var(--ok-ink); } .q-chip-warn{ background:var(--warn-soft); border-color:var(--warn); color:var(--warn-ink); } .q-chip-danger{ background:var(--danger-soft); border-color:var(--danger); color:var(--danger-ink); }
.q-chip-accent{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink); } .q-chip-mock{ border-style:dashed; color:var(--text-muted); background:transparent; }
button.q-chip{ cursor:pointer; } button.q-chip:hover{ border-color:var(--border-strong); } button.q-chip[aria-pressed="true"]{ background:var(--accent-soft); border-color:var(--accent-deep); color:var(--accent-ink); }
.q-cat{ display:inline-flex; align-items:center; gap:6px; height:24px; white-space:nowrap; } .q-cat i{ width:10px; height:10px; border-radius:50%; flex:none; } .q-cat b{ font-weight:600; font-size:12px; letter-spacing:.02em; }

/* ---- cards and tiles. A border, never a shadow, for anything that is always present. ---- */
.q-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:var(--space-2); }
.q-card-hi{ background:var(--surface-hi); } .q-tile{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 12px; }
.q-tile .q-tile-label{ font-size:12px; line-height:16px; color:var(--text-muted); font-weight:600; } .q-tile .q-tile-value{ font:600 20px/24px var(--font-num); font-variant-numeric:tabular-nums; }
.q-band{ padding:10px 14px; border-radius:var(--radius-sm); background:var(--accent-soft); border:1px solid var(--accent); color:var(--accent-ink); } .q-band-warn{ background:var(--warn-soft); border-color:var(--warn); color:var(--warn-ink); } .q-band-danger{ background:var(--danger-soft); border-color:var(--danger); color:var(--danger-ink); } .q-band-ok{ background:var(--ok-soft); border-color:var(--ok); color:var(--ok-ink); }

/* ---- inputs ---- */
.q-input, .q-select, .q-textarea{ height:36px; padding:0 10px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text); font:400 14px/20px var(--font); transition:border-color var(--bws-motion); }
.q-input:hover, .q-select:hover, .q-textarea:hover{ border-color:var(--border-strong); } .q-input::placeholder, .q-textarea::placeholder{ color:var(--text-muted); }
.q-input[disabled], .q-select[disabled], .q-textarea[disabled]{ opacity:.55; cursor:not-allowed; background:var(--surface-hi); }
.q-select{ padding-right:28px; cursor:pointer; }
.q-textarea{ height:auto; padding:10px; resize:vertical; width:100%; } .q-input.q-num{ text-align:right; } .q-field{ display:flex; flex-direction:column; gap:4px; } .q-field > span{ font-size:12px; font-weight:600; color:var(--text-muted); }
.q-seg{ display:inline-flex; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; background:var(--surface); }
.q-seg button{ height:32px; padding:0 12px; border:0; border-right:1px solid var(--border); background:transparent; color:var(--text); font:600 13px/18px var(--font); cursor:pointer; white-space:nowrap; } .q-seg button:last-child{ border-right:0; }
.q-seg button:hover{ background:var(--surface-hi); } .q-seg button[aria-disabled="true"]{ cursor:not-allowed; }
.q-seg button[aria-pressed="true"], .q-seg button[aria-pressed="true"]:hover{ background:var(--accent-soft); color:var(--accent-ink); box-shadow:inset 0 -2px 0 var(--accent-ink); }
.q-toggle{ position:relative; width:40px; height:24px; border-radius:12px; border:1px solid var(--border-strong); background:var(--surface-hi); cursor:pointer; flex:none; padding:0; }
.q-toggle::after{ content:""; position:absolute; top:2px; left:2px; width:18px; height:18px; border-radius:50%; background:var(--text-muted); transition:transform var(--bws-motion); }
.q-toggle[aria-checked="true"]{ background:var(--accent-deep); border-color:var(--accent-deep); } .q-toggle[aria-checked="true"]::after{ transform:translateX(16px); background:var(--surface); }
.q-toggle[aria-disabled="true"]{ opacity:.5; cursor:not-allowed; }

/* ---- tables: the plain table. The tree grid of the Cost tab is the desk lane's QUI.grid and shares these cell rules. ---- */
.q-table{ width:100%; border-collapse:collapse; } .q-table th{ height:36px; padding:0 12px; text-align:left; font-size:var(--type-fine-size); font-weight:600; color:var(--text-muted); border-bottom:1px solid var(--border); white-space:nowrap; }
.q-table td{ height:32px; padding:4px 12px; border-bottom:1px solid var(--border); vertical-align:middle; } .q-table th.q-num, .q-table td.q-num{ text-align:right; } .q-table tbody tr:hover td{ background:var(--surface-hi); }
.q-table tfoot td{ font-weight:600; border-top:2px solid var(--border-strong); border-bottom:0; height:36px; }

/* ---- was and now: the old in red, the new in green, each with its glyph, everywhere a change is shown ---- */
.q-was{ background:var(--q-diff-old); color:var(--danger-ink); text-decoration:line-through; text-decoration-color:var(--q-diff-old-ink); padding:1px 6px; border-radius:4px; }
.q-now{ background:var(--q-diff-new); color:var(--ok-ink); padding:1px 6px; border-radius:4px; font-weight:600; }
.q-fig{ font-family:var(--font-num); font-variant-numeric:tabular-nums; white-space:nowrap; border:0; border-bottom:1px dotted var(--text-muted); background:none; color:inherit; font-size:inherit; line-height:inherit; font-weight:600; padding:0 2px; cursor:pointer; }
/* THE FIGURE RULE (fix 3 of card P4195, F1): a figure with nothing to open is plain text. QUI.figure draws it as span.q-fig-text: the chip's weight and its figures, no pointer, no underline.
   F4 (same fix): no toast sits over an open dialog; every toast lane is held, unseen, while a dialog's scrim is open and not under a newer one. Both are q- component rules, so they
   live here, not in mock.css (the Opus check: foundation.test keeps mock.css to qm- selectors). */
.q-fig-text{ font-weight:600; font-variant-numeric:tabular-nums; cursor:inherit; text-decoration:none; border:0; white-space:nowrap; }
body:has(> .q-scrim:not([inert])) .q-toasts{ visibility:hidden; }
.q-fig:hover, .q-fig[aria-expanded="true"]{ border-bottom-style:solid; background:var(--accent-soft); color:var(--accent-ink); }
.q-info{ display:inline-flex; width:18px; height:18px; border-radius:50%; border:1px solid var(--border-strong); align-items:center; justify-content:center; font:600 11px/1 var(--font); color:var(--text-muted); cursor:help; background:transparent; padding:0; flex:none; }
.q-info:hover{ color:var(--text); background:var(--surface-hi); }
.q-mock-tag{ display:inline-flex; align-items:center; height:20px; padding:0 8px; border:1px dashed var(--border-strong); border-radius:var(--radius-pill); font:600 11px/1 var(--font); color:var(--text-muted); letter-spacing:.02em; white-space:nowrap; flex:none; }

/* ---- dialog, popover, menu, toast, tooltip (QUI draws them); each names its layer of shared/layers.css, and frame.css lists the module's layers (card P4412) ---- */
.q-scrim{ position:fixed; inset:0; background:color-mix(in srgb, var(--text) 40%, transparent); display:flex; align-items:center; justify-content:center; z-index:var(--layer-dialog); }
.q-dialog{ background:var(--surface); color:var(--text); border-radius:var(--radius-lg); border:1px solid var(--border); box-shadow:var(--elev-3); width:min(640px, calc(100vw - 48px)); max-height:calc(100vh - 96px); display:flex; flex-direction:column; }
.q-dialog > header{ padding:16px 20px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; } .q-dialog > .q-dialog-body{ padding:20px; overflow:auto; } .q-dialog > footer{ padding:12px 20px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:8px; }
.q-pop{ position:absolute; z-index:var(--layer-popover); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); box-shadow:var(--elev-2); padding:12px; width:320px; }
.q-menu{ position:fixed; z-index:var(--layer-menu); min-width:232px; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:var(--radius-md); box-shadow:var(--elev-2); padding:6px; display:flex; flex-direction:column; gap:2px; }
.q-menu-item{ display:flex; align-items:center; gap:8px; min-height:36px; padding:6px 10px; border:0; border-radius:var(--radius-xs); background:transparent; color:var(--text); font:500 14px/20px var(--font); text-align:left; cursor:pointer; }
.q-menu-item:hover{ background:var(--surface-hi); } .q-menu-item[aria-disabled="true"]{ color:var(--text-muted); cursor:not-allowed; } .q-menu-item[aria-current="true"]{ font-weight:600; }
.q-menu-gap{ width:14px; flex:none; } .q-menu-heading{ padding:8px 10px 4px; font:600 12px/16px var(--font); color:var(--text-muted); } .q-menu-block{ padding:4px 10px 8px; }
.q-toasts{ position:fixed; left:50%; bottom:24px; transform:translateX(-50%); display:flex; flex-direction:column; gap:8px; z-index:var(--layer-toast); align-items:center; }
/* --q-toast-max (card P4391, the second fix round): a message is 640 px wide at most, as approved. On the shop side the stack sets this on itself when no clear place that wide is left
   on the screen, so its messages wrap narrower and it fits where nothing that is pressed sits (ui.js, THE STACK'S SEAT ON THE SHOP SIDE). Unset, every message is as it was. */
.q-toast{ background:var(--text); color:var(--bg); padding:10px 16px; border-radius:var(--radius-sm); font:600 14px/20px var(--font); box-shadow:var(--elev-2); max-width:var(--q-toast-max, 640px); animation:q-rise 180ms ease-out 1; }
/* a button a toast carries (Keep on a move of the price you set, Undo on Make All; lane quotes-finish-1123, card P4254): it sits beside the words and reads on the toast's own
   ink in both themes (a quiet button drew its words in the toast's own background color, so Keep and Undo could not be seen) */
.q-toast:has(> .q-btn){ display:flex; align-items:center; gap:12px; flex-wrap:wrap; max-width:var(--q-toast-max, 760px); }
.q-toast > .q-btn{ background:var(--bg); color:var(--text); border-color:var(--bg); flex:0 0 auto; }
.q-tip{ position:fixed; z-index:var(--layer-teaching-tip); background:var(--text); color:var(--bg); padding:6px 10px; border-radius:6px; font:500 12px/16px var(--font); max-width:320px; pointer-events:none; }
.q-empty{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:48px 24px; color:var(--text-muted); text-align:center; }
.q-notyet{ gap:12px; min-height:100%; } .q-notyet .q-h-lg{ color:var(--text); } .q-notyet-glyph{ display:inline-flex; align-items:center; justify-content:center; width:48px; height:48px; border-radius:50%; border:1px dashed var(--border-strong); color:var(--text-muted); }
.q-notyet-words{ max-width:520px; margin:0; } .q-notyet-actions{ margin-top:8px; gap:8px; flex-wrap:wrap; justify-content:center; }
.q-kbd-row{ display:inline-flex; gap:4px; } .q-kbd{ display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:24px; padding:0 6px; border:1px solid var(--border-strong); border-bottom-width:2px; border-radius:6px; background:var(--surface-hi); font:600 12px/1 var(--font); color:var(--text); }
.q-progress{ display:inline-block; width:96px; height:6px; border-radius:3px; background:var(--border); overflow:hidden; flex:none; } .q-progress i{ display:block; height:100%; background:var(--accent-deep); border-radius:3px; transition:width var(--bws-motion); }
.q-pulse{ animation:q-pulse 900ms ease-out 1; } @keyframes q-pulse{ 0%{ box-shadow:0 0 0 0 var(--accent); } 100%{ box-shadow:0 0 0 12px transparent; } }
@keyframes q-rise{ 0%{ opacity:0; transform:translateY(6px); } 100%{ opacity:1; transform:none; } }
/* a sized still that is not there yet: a calm block that says what goes here, never a diagram (QKitchen.picture) */
.q-still{ position:relative; overflow:hidden; background:var(--surface-hi); }
.q-still img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; transition:opacity 220ms; } .q-still img[data-on="1"]{ opacity:1; }
.q-still-wait{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; text-align:center; padding:16px; color:var(--text-muted); font-weight:600;
  background:linear-gradient(160deg, var(--surface-hi), var(--surface)); }
.q-still-wait small{ font-weight:500; font-size:var(--type-fine-size); }
@media (prefers-reduced-motion: reduce){ .q-root *, .q-pulse, .q-toast{ animation:none !important; transition:none !important; } }
