/* ==================== Ask Veyora, the command bar (js/ask-bar.js) ====================
   Design language phase 5, Sam's mockup 03: a white sheet over the dimmed page,
   the question in its field, the answer, the list it found, its buttons, and
   "You can also say" on mist. Colours from the tokens only (css/veyora-ui.css). */

html.vxa-open{overflow:hidden}
.vxa-back{position:fixed;inset:0;z-index:1000;display:flex;justify-content:center;align-items:flex-start;
  padding:72px 16px 32px;background:rgba(29,29,31,.5);overflow:hidden}
.vxa-back .vxa{width:min(820px,100%);max-width:none;max-height:calc(100vh - 104px);max-height:calc(100dvh - 104px);margin:0;padding:0;
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scroll-padding:104px 0 16px;border-radius:24px;
  background:var(--vx-white);color:var(--vx-ink);box-shadow:0 24px 70px rgba(0,0,0,.22);display:flex;flex-direction:column;
  font-family:inherit;text-align:start}

/* the field */
/* the field stays at the top while the sheet scrolls, so its close does too */
.vxa-head{position:sticky;top:0;z-index:1;flex:none;display:flex;align-items:center;gap:var(--vx-space-3);min-height:72px;padding:0 var(--vx-space-5);
  background:var(--vx-white);border-bottom:1px solid var(--vx-hairline)}
.vxa-ico{flex:none;display:inline-flex;color:var(--vx-ink)}
.vxa-ico svg{width:22px;height:22px}
.vxa-q{flex:1 1 auto;min-width:0;height:44px;margin:14px 0;padding:8px 0;border:0;outline:0;background:transparent;color:var(--vx-ink);resize:none;overflow:hidden;
  font:inherit;font-size:var(--vx-text-heading);font-weight:400;line-height:28px;letter-spacing:-.01em}
.vxa-q::placeholder{color:var(--vx-stone)}
.vxa-esc{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin-inline-end:-6px;
  padding:0;border:0;background:transparent;cursor:pointer;border-radius:var(--vx-radius-field)}
.vxa-esc kbd{padding:3px 8px;border:1px solid var(--vx-hairline);border-radius:6px;background:var(--vx-white);color:var(--vx-graphite);
  font:inherit;font-size:var(--vx-text-label);font-weight:600;line-height:1.3}
.vxa-esc:hover kbd{border-color:var(--vx-ink);color:var(--vx-ink)}
.vxa-x{display:none;color:var(--vx-ink)}
.vxa-esc:focus-visible{outline:2px solid var(--vx-focus);outline-offset:2px}

/* the answer */
.vxa-body{padding:var(--vx-space-5) var(--vx-space-5) var(--vx-space-5);display:flex;flex-direction:column;gap:var(--vx-space-4)}
.vxa-body[hidden]{display:none}
.vxa-answer{color:var(--vx-graphite);font-size:17px;line-height:1.55}
.vxa-answer p{margin:0}
.vxa-answer p + p,.vxa-answer p + ul,.vxa-answer ul + p{margin-top:var(--vx-space-2)}
.vxa-answer strong{color:var(--vx-ink);font-weight:700}
.vxa-answer.is-error,.vxa-answer.vxa-quiet{color:var(--vx-stone)}
.vxa-points{margin:0;padding-inline-start:20px}
.vxa-dots{display:inline-flex;gap:5px;padding:8px 0}
.vxa-dots i{width:7px;height:7px;border-radius:50%;background:var(--vx-stone);animation:vxa-dot 1s infinite ease-in-out}
.vxa-dots i:nth-child(2){animation-delay:.15s}.vxa-dots i:nth-child(3){animation-delay:.3s}
@keyframes vxa-dot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

/* the list it found */
.vxa-rows{display:flex;flex-direction:column;border:1px solid var(--vx-hairline);border-radius:var(--vx-radius-card);background:var(--vx-white);overflow:hidden}
.vxa-row{display:grid;grid-template-columns:minmax(0,1fr) 7.5rem 5.5rem 7rem;align-items:center;
  column-gap:var(--vx-space-5);min-height:64px;padding:var(--vx-space-3) var(--vx-space-4) var(--vx-space-3) var(--vx-space-4);
  color:var(--vx-ink);text-decoration:none;font-variant-numeric:tabular-nums}
.vxa-row + .vxa-row{border-top:1px solid var(--vx-hairline)}
a.vxa-row:hover{background:var(--vx-mist)}
a.vxa-row:focus-visible{outline:2px solid var(--vx-focus);outline-offset:-2px}
.vxa-row-who{display:flex;flex-direction:column;gap:2px;min-width:0}
.vxa-row-title{font-size:var(--vx-text-body);font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.vxa-row-sub{font-size:13px;line-height:1.3;color:var(--vx-stone);overflow-wrap:anywhere}
.vxa-row-ref{font-size:var(--vx-text-body);color:var(--vx-graphite);white-space:nowrap}
.vxa-row-note{font-size:13px;font-weight:600;color:var(--vx-graphite);white-space:nowrap}
.vxa-row-note.is-late{color:var(--vx-needs-you)}
.vxa-row-note.is-ok{color:var(--vx-ready)}
.vxa-row-fig{font-size:16px;font-weight:700;text-align:end;white-space:nowrap}

/* what can be done with it: the language's buttons (board 01), drawn here so
   the EU admin, which does not load the shop's parts, has them too */
.vxa-actions{display:flex;flex-wrap:wrap;align-items:center;gap:var(--vx-space-3) var(--vx-space-4);padding-top:var(--vx-space-1)}
.vxa-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--vx-space-2);min-height:44px;padding:0 22px;border:0;
  border-radius:var(--vx-radius-button);background:var(--vx-ink);color:var(--vx-white);font:inherit;font-size:var(--vx-text-body);font-weight:600;
  line-height:1.2;text-align:center;cursor:pointer;transition:background .15s var(--vx-ease)}
.vxa-btn:hover{background:var(--vx-black)}
.vxa-btn:focus-visible{outline:2px solid var(--vx-focus);outline-offset:3px}
.vxa-btn:disabled{opacity:.45;cursor:default}
.vxa-btn.vxa-btn--secondary{background:var(--vx-white);color:var(--vx-ink);box-shadow:inset 0 0 0 1px var(--vx-ink)}
.vxa-btn.vxa-btn--secondary:hover{background:var(--vx-mist)}
.vxa-btn.vxa-btn--quiet{background:transparent;color:var(--vx-ink)}
.vxa-btn.vxa-btn--quiet:hover{background:var(--vx-white)}
.vxa-link{display:inline-flex;align-items:center;min-height:44px;padding:0;color:var(--vx-ink);font-size:var(--vx-text-body);font-weight:600;
  text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
.vxa-link:hover{text-decoration-thickness:2px}
.vxa-note{margin:0;color:var(--vx-stone);font-size:13px;line-height:1.5}

/* the second press: who gets what, or whom to give it to */
.vxa-panel:empty{display:none}
.vxa-panel{display:flex;flex-direction:column;gap:var(--vx-space-3);padding:var(--vx-space-4);border-radius:var(--vx-radius-card);background:var(--vx-mist)}
.vxa-panel-h,.vxa-panel-done{margin:0;font-size:var(--vx-text-body);font-weight:600;color:var(--vx-ink)}
.vxa-panel-done{font-weight:500;color:var(--vx-graphite)}
/* one set of columns for every line (subgrid), so the figures line up before and after sending */
.vxa-checks{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) auto auto;column-gap:var(--vx-space-4)}
.vxa-check{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:center;column-gap:var(--vx-space-4);
  min-height:44px;padding:var(--vx-space-2) 0;font-size:14px;font-variant-numeric:tabular-nums}
.vxa-check + .vxa-check{border-top:1px solid var(--vx-hairline)}
.vxa-check-who{font-weight:600;overflow-wrap:anywhere}
.vxa-check-to{color:var(--vx-graphite);overflow-wrap:anywhere}
.vxa-check-fig{font-weight:600;white-space:nowrap;text-align:end}
.vxa-check-state{font-size:13px;font-weight:600;text-align:end}
.vxa-check-state.is-ok{color:var(--vx-ready)}
.vxa-check-state.is-late{color:var(--vx-needs-you)}
.vxa-panel-btns,.vxa-give{display:flex;flex-wrap:wrap;align-items:center;gap:var(--vx-space-3)}
.vxa-select{min-height:44px;min-width:min(260px,100%);padding:0 var(--vx-space-3);border:1px solid var(--vx-hairline);border-radius:var(--vx-radius-field);
  background:var(--vx-white);color:var(--vx-ink);font:inherit;font-size:var(--vx-text-body)}
.vxa-select:focus-visible{outline:2px solid var(--vx-focus);outline-offset:2px}

/* you can also say */
.vxa-also{padding:var(--vx-space-5);background:var(--vx-mist);border-top:1px solid var(--vx-hairline)}
.vxa-also[hidden]{display:none}
.vxa-also-h{margin-bottom:var(--vx-space-3);color:var(--vx-stone);font-size:var(--vx-text-label);font-weight:600;letter-spacing:.1em;text-transform:uppercase}
.vxa-chips{display:flex;flex-wrap:wrap;gap:var(--vx-space-3)}
.vxa-chip{display:inline-flex;align-items:center;min-height:40px;padding:0 var(--vx-space-4);border:1px solid var(--vx-hairline);border-radius:var(--vx-radius-button);
  background:var(--vx-white);color:var(--vx-ink);font:inherit;font-size:14px;line-height:1.3;text-align:start;cursor:pointer}
.vxa-chip:hover{border-color:var(--vx-ink)}
.vxa-chip:focus-visible{outline:2px solid var(--vx-focus);outline-offset:2px}

/* a tablet: the list keeps its four columns, a little closer */
@media (max-width:900px){
  .vxa-back{padding-top:40px}
  .vxa-row{column-gap:var(--vx-space-4)}
}
/* a phone: the sheet fills the screen's width; each row is the customer and
   the figure, with the reference and the note under the customer */
@media (max-width:600px){
  .vxa-back{padding:8px}
  .vxa-back .vxa{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
  .vxa-back .vxa{border-radius:20px}
  .vxa-head{min-height:60px;padding:0 var(--vx-space-4);gap:var(--vx-space-2)}
  .vxa-q{margin:8px 0;font-size:17px;line-height:26px}
  .vxa-esc kbd{display:none}
  .vxa-x{display:inline-flex}
  .vxa-body{padding:var(--vx-space-4)}
  .vxa-answer{font-size:16px}
  .vxa-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who fig" "ref note";row-gap:4px;column-gap:var(--vx-space-3);padding:var(--vx-space-3)}
  .vxa-row-who{grid-area:who}
  .vxa-row-fig{grid-area:fig;align-self:start}
  .vxa-row-ref{grid-area:ref;font-size:13px}
  .vxa-row-note{grid-area:note;text-align:end}
  .vxa-row--noref{grid-template-areas:"who fig" "who note"}
  .vxa-row--noref .vxa-row-ref{display:none}
  .vxa-actions .vxa-btn{flex:1 1 100%}
  .vxa-checks{grid-template-columns:minmax(0,1fr)}
  .vxa-check{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"who fig" "to to" "state state";row-gap:2px}
  .vxa-check-who{grid-area:who}.vxa-check-to{grid-area:to}.vxa-check-fig{grid-area:fig}.vxa-check-state{grid-area:state;text-align:start}
  .vxa-check-state:empty{display:none}
  .vxa-select{width:100%}
  .vxa-chip{min-height:44px}
  .vxa-also{padding:var(--vx-space-4)}
}
@media (prefers-reduced-motion:reduce){.vxa-back *{transition:none!important}.vxa-dots i{animation:none;opacity:.6}}
.vxa .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
