/* Jaggery v7 · demo page, preview screens (prototypes of features not in the product yet).
   Built from the same mk-* parts as the live demos; only the layout pieces are new. */

/* tabs: live demos on the first row, previews on the second (one scrolling row on small screens) */
@media(min-width:900px){
  .dtabs{flex-wrap:wrap;justify-content:center}
  .dtabs-br{flex-basis:100%;height:0}
}
@media(max-width:899px){.dtabs-br{display:none}}
.dtab .tag{height:20px;font-size:12px}

/* the quiet line above every preview stage */
.pv-note{display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-self:stretch;margin:0;font-size:14px;color:var(--tx-2)}
.pv-note .tag{height:22px;font-size:12px}

/* shell of a tablet preview screen */
.mk.pv{display:flex;flex-direction:column;gap:.8em;height:100%;padding:1em 1.1em;overflow:hidden}
.pv-h{display:flex;justify-content:space-between;align-items:center;gap:.8em;flex-wrap:wrap}
.pv-h b{display:block;font:700 1.25em/1.2 var(--font-d);letter-spacing:-.02em}
.pv-split{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:.8em;flex:1;min-height:0}
.pv-side{display:flex;flex-direction:column;gap:.7em;min-height:0;min-width:0}
.pv-side>.mk-card,.pv-split>.mk-card{display:flex;flex-direction:column;gap:.55em;min-height:0}
.pv .mk-card small{font-size:.8em;color:var(--tx-3)}
.pv-btns{display:flex;flex-wrap:wrap;gap:.4em}
.pv button{font:inherit;color:inherit;cursor:pointer}

/* segmented control and switch */
.pv-seg{display:inline-flex;flex-wrap:wrap;gap:.25em;padding:.2em;border-radius:.6em;background:var(--surface-3);border:1px solid var(--line)}
.pv-seg button{min-height:2em;padding:0 .75em;border:0;border-radius:.45em;background:transparent;font-size:.84em;font-weight:600;color:var(--tx-2)}
.pv-seg button[aria-pressed="true"]{background:var(--surface);color:var(--tx);box-shadow:0 0 0 1px var(--line-2)}
.pv-sw{display:inline-flex;align-items:center;gap:.6em;min-height:2.2em;padding:0;border:0;background:none;font-size:.88em;text-align:left;color:var(--tx-2)}
.pv-sw .tr{position:relative;flex:none;width:2.3em;height:1.3em;border-radius:99px;background:var(--surface-3);border:1px solid var(--line-2);transition:background-color var(--t) var(--ease)}
.pv-sw .tr::after{content:"";position:absolute;top:.12em;left:.12em;width:.9em;height:.9em;border-radius:50%;background:var(--tx-3);transition:transform var(--t-2) var(--ease-out),background-color var(--t) var(--ease)}
.pv-sw[aria-checked="true"]{color:var(--tx)}
.pv-sw[aria-checked="true"] .tr{background:var(--ac-soft);border-color:var(--ac-line)}
.pv-sw[aria-checked="true"] .tr::after{transform:translateX(1em);background:var(--ac)}

/* orders inbox */
.pv-chips{display:flex;flex-wrap:wrap;gap:.4em}
.pv-chips button{min-height:2em;padding:0 .8em;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:.84em;color:var(--tx-2)}
.pv-chips button[aria-pressed="true"]{background:var(--ac-soft);border-color:var(--ac-line);color:var(--ac-tx);font-weight:600}
.pv-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:.7em;flex:1;min-height:0}
.pv-col{display:flex;flex-direction:column;gap:.5em;min-height:0;padding:.6em;border-radius:.7em;background:var(--surface-2);border:1px solid var(--line)}
.pv-col h5{display:flex;align-items:center;gap:.5em;margin:0;font:700 .92em/1.2 var(--font-d)}
.pv-col h5 em{font-style:normal;font-size:.85em;color:var(--tx-3)}
.pv-list{display:grid;gap:.5em;align-content:start;overflow:auto;min-height:0}
.pv-none{color:var(--tx-3);font-size:.85em;text-align:center;padding:1em 0}
.pv-ord{display:grid;gap:.45em;padding:.65em .7em;border-left:.25em solid var(--line-2)}
.pv-ord.ch-swiggy,.pv-ord.ch-zomato{border-left-color:var(--tx-3)}
.pv-ord.ch-qr,.pv-ord.ch-dine{border-left-color:var(--ac)}
.pv-ord .r{display:flex;justify-content:space-between;align-items:center;gap:.5em;flex-wrap:wrap}
.pv-ord .src{font-weight:600;font-size:.86em}
.pv-ord .amt{font-weight:700}
.pv-ord ul{display:grid;gap:.2em;font-size:.84em;color:var(--tx-2)}
.pv-ord li{display:flex;align-items:center;gap:.4em;flex-wrap:wrap}
.pv-ord li small{margin-left:auto;font-size:.85em;color:var(--ac-tx)}
.pv-ord .acts{display:flex;gap:.35em;margin-left:auto}
.pv-ord .mk-btn{min-height:2em;padding:0 .8em;font-size:.84em}
.pv-ord .age{font-size:.76em}
.pv-ord .pv-seg button{padding:0 .5em;font-size:.78em}
.pv-rej{display:grid;gap:.35em;font-size:.82em}
.pv-rej button{min-height:2em;border-radius:.5em;border:1px solid var(--line-2);background:var(--surface-2);text-align:left;padding:0 .6em}

/* Ask Mr.Owl input */
.pv-ask{display:flex;gap:.4em}
.pv-ask input{flex:1;min-width:0;min-height:2.4em;padding:0 .8em;border-radius:99px;border:1px solid var(--line-2);background:var(--surface);color:var(--tx);font:inherit;font-size:.88em}
.pv-ask .mk-btn{border-radius:99px}

/* diner's phone */
.pv-phone .qr-pay{margin-top:auto}
.pv-phone .qr-cart{justify-content:space-between}
.pv-phone .qr-cart:disabled{opacity:.7}
.pv-opts{display:grid;gap:.5em}
.pv-opt{display:grid;grid-template-columns:1.6em 1fr;column-gap:.6em;align-items:start;padding:.75em;border:1px solid var(--line-2);border-radius:.8em;background:var(--surface);text-align:left;width:100%}
.pv-opt .i{width:1.3em;height:1.3em;color:var(--tx-3);grid-row:span 2}
.pv-opt b{font-size:.92em}
.pv-opt small{font-size:.74em;color:var(--tx-3)}
.pv-opt[aria-checked="true"]{border-color:var(--ac-line);background:var(--ac-soft)}
.pv-gw{display:flex;gap:.5em;align-items:flex-start;font-size:.76em;color:var(--tx-2)}
.pv-gw .i{width:1.2em;height:1.2em;flex:none;color:var(--ok)}
.pv-fail{display:grid;gap:.2em;padding:.75em;border-radius:.8em;border:1px solid var(--bad);background:var(--surface);font-size:.86em}
.pv-fail b{color:var(--bad)}
.pv-wa{display:grid;gap:.35em;max-width:92%;padding:.7em .85em;border-radius:.9em .9em .9em .25em;background:var(--ok-soft);color:var(--tx);font-size:.88em;line-height:1.45}
.pv-wa b{font-size:.92em;color:var(--ok)}
.pv-wa small{font-size:.8em;color:var(--tx-3)}

/* payments */
.pv-k3{grid-template-columns:repeat(3,minmax(0,1fr))}
.pv-line{display:flex;flex-wrap:wrap;align-items:center;gap:.5em .7em;padding:.6em .8em;border:1px dashed var(--line-2);border-radius:.7em;font-size:.86em}
.pv-line>div{display:grid}
.pv-line b{font-size:.95em}
.pv-line .i{width:1em;height:1em;color:var(--tx-3)}
.pv-line .pv-us{margin-left:auto;color:var(--tx-3);font-size:.9em}
.pv-tbl{overflow:hidden}
.pv-rows{display:grid;gap:.25em;overflow:auto;min-height:0}
.pv-row{display:grid;grid-template-columns:5.2em minmax(0,1fr) 3.4em auto;gap:.6em;align-items:center;min-height:2.4em;padding:0 .6em;border:1px solid transparent;border-radius:.5em;background:none;text-align:left;font-size:.86em}
.pv-row:hover{background:var(--surface-2)}
.pv-row[aria-pressed="true"]{border-color:var(--ac-line);background:var(--ac-soft)}
.pv-row .m{color:var(--tx-3)}
.pv-row.bad b{color:var(--bad);font-weight:600}
.pv-det div{display:flex;justify-content:space-between;gap:.6em;font-size:.88em;color:var(--tx-2)}
.pv-det div b{color:var(--tx);text-align:right}
.pv-det .mk-btn{margin-top:auto}

/* stock and costing */
.pv-dishes{display:grid;gap:.35em;align-content:start;overflow:auto}
.pv-dish{display:flex;justify-content:space-between;align-items:center;gap:.6em;min-height:2.6em;padding:0 .8em;border:1px solid var(--line);border-radius:.6em;background:var(--surface);text-align:left;font-size:.9em}
.pv-dish .n{display:flex;align-items:center;gap:.45em;font-weight:600}
.pv-dish[aria-pressed="true"]{border-color:var(--ac-line);background:var(--ac-soft)}
.pv-recipe .r b{font:700 1.05em/1.2 var(--font-d)}
.pv-ing{display:grid;gap:.25em;padding-bottom:.5em;border-bottom:1px dashed var(--line-2)}
.pv-ing div{display:grid;grid-template-columns:minmax(0,1fr) 4em 5em;gap:.5em;font-size:.86em;color:var(--tx-2)}
.pv-ing b{text-align:right;color:var(--tx);font-weight:500}
.pv-ing .num:nth-child(2){text-align:right;color:var(--tx-3)}
.pv-sum{display:grid;gap:.3em}
.pv-sum div{display:flex;justify-content:space-between;align-items:center;gap:.6em;font-size:.9em}
.pv-sum div:last-child b{color:var(--ok)}
.pv-price .qty span{min-width:3.2em}
.pv-srow{display:grid;grid-template-columns:minmax(0,1.4fr) 1fr 1fr 3.4em;gap:.5em;align-items:center;min-height:2.1em;font-size:.86em;border-bottom:1px solid var(--line)}
.pv-srow.h{font-size:.76em;font-weight:600;color:var(--tx-3)}
.pv-srow .st{justify-self:start;padding:.1em .55em;border-radius:99px;background:var(--ok-soft);color:var(--ok);font-size:.86em;font-weight:600}
.pv-srow.low .st{background:var(--surface-3);color:var(--bad)}
.pv-tbl{overflow:auto}
.pv-btns .mk-btn{min-height:2.1em;font-size:.84em}
.pv-waste .r{display:flex;flex-wrap:wrap;gap:.4em}
.pv-log{display:grid;gap:.15em;font-size:.82em;color:var(--tx-3)}

/* growth booster */
.pv-fun div,.pv-bills div{display:grid;grid-template-columns:minmax(0,9em) 1fr 2.6em;gap:.6em;align-items:center;font-size:.86em}
.pv-bills div{grid-template-columns:minmax(0,12em) 1fr 3em}
.pv-fun i,.pv-bills i{display:block;height:.45em;border-radius:99px;background:var(--ac);width:var(--w)}
.pv-bills div:nth-of-type(2) i{background:var(--tx-3)}
.pv-fun b,.pv-bills b{text-align:right}
.pv-set{gap:.4em!important}
.pv-dish-r div{display:grid;grid-template-columns:minmax(0,1fr) auto 4.5em;gap:.6em;align-items:center;font-size:.86em}
.pv-dish-r small{text-align:right}
.pv .stars{display:inline-flex;gap:.1em;color:var(--line-2)}
.pv .stars .i{width:.95em;height:.95em;fill:none}
.pv .stars .i.on{color:var(--tx-2);fill:currentColor}
.pv-invite p{font-weight:600}
.pv-invite .mk-btn{align-self:flex-start}
.pv-rule{display:flex;justify-content:space-between;align-items:center;gap:.8em;padding:.5em 0;border-bottom:1px solid var(--line)}
.pv-rule>div{display:grid;gap:.15em;font-size:.9em}

/* whatsapp */
.pv-sel,.pv-ta{width:100%;min-height:2.3em;padding:.4em .6em;border-radius:.5em;border:1px solid var(--line-2);background:var(--surface);color:var(--tx);font:inherit;font-size:.88em}
.pv-ta{resize:vertical;line-height:1.45}
.pv-chat{display:flex;flex-direction:column;gap:.6em;padding:.85em;border-radius:.7em;background:var(--surface-2);border:1px solid var(--line)}
.pv-hist div{display:grid;gap:.1em;font-size:.88em;padding:.3em 0;border-bottom:1px solid var(--line)}
.pv-wa-c .pv-side{overflow:auto}

.mk input:focus-visible,.mk textarea:focus-visible,.mk select:focus-visible{outline:2px solid var(--ac-tx);outline-offset:2px}

/* narrow: everything stacks, nothing is clipped */
@container (max-width:559px){
  .mk.pv{height:auto;overflow:visible}
  .pv-split,.pv-board{grid-template-columns:1fr;grid-template-rows:none}
  .pv-list,.pv-rows,.pv-dishes,.pv-tbl{overflow:visible}
  .pv-k3{grid-template-columns:1fr}
  .pv-line .pv-us{margin-left:0}
}
@media(max-width:699px){
  .stage .tablet .screen{height:auto}
  .pv button{min-height:40px}
  .pv-seg button{min-height:40px}
}
.stage{scroll-margin-top:150px}
.dtabs-lbl{flex:none;display:inline-flex;align-items:center;padding:0 4px 0 8px}
.dtabs-lbl .tag{height:24px;font-size:12px}
.dtab{position:relative} /* keeps the screen-reader-only "(preview)" text inside the scrolling tab row */

/* KOT and thermal printing: the ticket and the bill as printed */
.pv-paper{display:grid;gap:.2em;align-self:center;width:100%;max-width:26em;padding:.8em 1em;border:1px dashed var(--line-2);border-radius:.3em;background:var(--surface);font-size:.82em;line-height:1.35}
.pv-paper .c{text-align:center}
.pv-paper .r{display:flex;justify-content:space-between;gap:.6em}
.pv-paper .r>:last-child{flex:none;white-space:nowrap}
.pv-paper .r.g{font-weight:700}
.pv-paper hr{width:100%;margin:.25em 0;border:0;border-top:1px dashed var(--line-2)}
.mk.pv>.pv-seg{align-self:flex-start}
/* API and webhooks */
.pv-key{display:flex;justify-content:space-between;align-items:center;gap:.6em;padding:.35em 0;border-bottom:1px solid var(--line);font-size:.88em}
.pv-key>div{display:grid;gap:.1em;min-width:0}
.pv-code{margin:0;min-height:0;max-height:14em;overflow:auto;padding:.6em .75em;border-radius:.6em;background:var(--surface-2);border:1px solid var(--line);font:500 .76em/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;word-break:break-word;color:var(--tx-2)}
