/* Card grouping and linear step states adapted to this native HTML implementation.
   References: shadcn/vue Card; Reka UI Stepper. No framework code is imported. */
.selection,.payment-card{
  background:color-mix(in srgb,var(--surface) 88%,var(--page));
  border:1px solid var(--line);border-radius:24px;
  box-shadow:0 8px 32px rgb(30 45 40 / 2%);
}
.selection{padding:32px;margin-top:0}
.selection .section-heading{margin-bottom:24px}
.selection .option-list{gap:16px}
.selection .option{background:var(--surface);border-radius:12px}
.selection .option.is-selected{background:var(--selected)}
.selection .selection-outline{border-radius:12px}
.checkout-prep{gap:48px;margin-top:32px;padding:32px 0 0;border-bottom:0}
.setup-heading{min-height:56px}
.setup-heading p{margin-top:8px}
/* A shared delivery slot keeps credentials and controls anchored across specs. */
.product-input-slot{min-height:176px;padding-top:24px}
.product-input-slot .invite-field,.product-input-slot .delivery-fields{margin-top:0}
.product-input-slot .delivery-field{margin:0}
.product-input-slot .multiline-wrap{height:76px!important;min-height:76px}
.product-input-slot textarea{height:74px;min-height:0;resize:none;overflow-y:auto}
.product-input-slot .field-hint{font-size:11px;line-height:1.7;margin:8px 0 0}
.product-input-slot .field-error{margin-top:4px}
.product-input-note{display:flex;align-items:center;gap:16px;min-height:104px;padding:16px 24px;background:var(--page);border:1px dashed var(--line);border-radius:12px}
.product-input-note>svg{width:24px;height:24px;flex:none;fill:none;stroke:var(--muted);stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.product-input-note strong{font-size:12px;font-weight:500;color:var(--ink)}
.product-input-note p{font-size:11px;line-height:1.7;color:var(--muted);margin:8px 0 0}
.lookup-grid{margin-top:0;gap:24px}
.lookup-grid .field label{margin-bottom:8px}
.lookup-grid .input-wrap{background:var(--surface)}
.checkout-summary{padding-left:32px;min-height:336px}
.checkout-summary .selected-product{height:96px}
.checkout-summary .selected-product strong{margin-top:8px;max-width:100%;overflow-wrap:anywhere}
.checkout-summary .selected-product small{margin-top:4px}
.checkout-summary .quantity-control{margin-top:0;height:48px}
.purchase-consent{margin-top:24px;padding-top:16px}
.checkout-action{margin-top:8px}
.next-step{margin-top:16px}
.selection .preview-note{border-top:1px solid var(--line);margin:32px 0 0;padding-top:16px}

/* The payment panel occupies the same main region as the selection panel. */
.payment-page{border:0;padding:0}
.payment-card{width:100%;max-width:none;padding:24px 32px 0;overflow:hidden}
.payment-topline{margin:0 0 24px;min-height:32px}
.payment-topline>span{font-size:11px}
.order-progress{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:0 0 32px;padding:24px 0 32px;border-bottom:1px solid var(--line)}
.order-progress li{display:flex;align-items:center;gap:12px;position:relative;min-width:0;color:var(--muted)}
.order-progress li:not(:last-child)::after{content:'';position:absolute;height:1px;right:0;left:156px;background:var(--line)}
.order-progress li[data-state=completed]:not(:last-child)::after{background:color-mix(in srgb,var(--accent) 50%,var(--line))}
.progress-node{width:32px;height:32px;display:grid;place-items:center;flex:none;border-radius:50%;border:1px solid var(--line);font-family:Consolas,monospace;font-size:11px;background:var(--surface);transition:background-color 240ms,border-color 240ms,color 240ms}
.order-progress strong{display:block;font-size:12px;font-weight:550;line-height:1.5}
.order-progress small{display:block;font-size:10px;line-height:1.6;margin-top:4px;color:var(--muted)}
.order-progress li[data-state=active]{color:var(--ink)}
.order-progress li[data-state=active] .progress-node{color:var(--accent);border-color:var(--accent);box-shadow:0 0 0 4px var(--selected)}
.order-progress li[data-state=completed] .progress-node{background:var(--accent);border-color:var(--accent);color:var(--surface);font-size:0}
.order-progress li[data-state=completed] .progress-node::after{content:'';width:10px;height:5px;border-left:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-1px) rotate(-45deg)}
.payment-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:64px;align-items:start;padding-bottom:32px}
.payment-scan,.payment-bill{min-width:0}
.payment-scan{max-width:440px;width:100%}
.payment-card-heading{margin-bottom:24px;min-height:56px}
.payment-card-heading h2{font-size:24px;letter-spacing:-.035em;line-height:1.4}
.payment-card-heading p{font-size:11px;color:var(--muted);margin:8px 0 0}
.payment-card-heading strong{font-size:34px}
.payment-code-panel{padding:24px 24px 0;background:var(--page);border-radius:16px}
.payment-visual{min-height:288px;display:grid;place-items:center}
#payment-qr img{width:min(100%,224px);height:auto;aspect-ratio:1;margin-inline:auto;background:white;border-radius:8px}
.qr-label{margin:16px 0;font-size:11px}
.payment-code-status{padding:16px 0;gap:8px}
.payment-code-status>span{white-space:nowrap}
.payment-channel-note{font-size:10px;line-height:1.7;text-align:center;color:var(--muted);margin:16px 0 0}
.payment-result{text-align:center;max-width:280px;animation:feedback-in 240ms var(--ease)}
.result-symbol{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 24px;background:var(--selected);color:var(--accent);border-radius:50%;border:1px solid color-mix(in srgb,var(--accent) 20%,transparent)}
.result-symbol svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.payment-result h3{margin:0;font-size:20px;letter-spacing:-.025em;font-weight:600}
.payment-result p{margin:12px 0 0;font-size:12px;line-height:1.8;color:var(--muted)}
.bill-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;min-height:32px;margin-bottom:16px}
.bill-heading h3{font-size:17px;font-weight:600;margin:0;letter-spacing:-.025em}
.payment-bill{padding-left:32px;border-left:1px solid var(--line)}
.payment-details-list{margin-top:0}
.payment-details-list>div,.payment-details-list #payment-delivery-fields>div{font-size:12px;padding:8px 0;gap:16px}
.payment-details-list dd{color:var(--ink)}
.payment-sum{margin-top:16px;padding-top:16px!important}
.payment-sum dd{font-size:18px;font-variant-numeric:tabular-nums}
.payment-warning{font-size:11px;padding:8px 12px;margin-top:16px}
.bill-progress{margin-top:24px;border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--page)}
.bill-progress-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.bill-progress h3{font-size:12px;font-weight:550;margin:0}
.status-pill{font-size:10px;white-space:nowrap;color:var(--muted);display:flex;align-items:center;gap:6px}
.status-pill::before{content:'';width:5px;height:5px;flex:none;border-radius:50%;background:currentColor}
.payment-page:not([data-stage=awaiting]) .status-pill{color:var(--accent)}
.bill-progress>p{font-size:11px;line-height:1.8;color:var(--muted);margin:12px 0 16px;min-height:40px}
.bill-timeline{display:flex;justify-content:space-between;gap:12px;list-style:none;margin:0;padding:0}
.bill-timeline li{font-size:10px;line-height:1.8;color:var(--muted);border-top:2px solid var(--line);padding-top:8px;flex:1;transition:border-color 240ms,color 240ms}
.bill-timeline li[data-state=completed],.bill-timeline li[data-state=active]{border-color:var(--accent);color:var(--accent)}
.bill-actions{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-top:24px}
.bill-actions .secondary-button{padding:8px 16px;min-height:40px;font-size:11px}
.bill-actions .refresh-button{margin:0;min-height:40px}
.payment-bill .payment-message{text-align:left;margin-top:12px}
.demo-flow-controls{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:24px 32px;margin:0 -32px;background:var(--page);border-top:1px solid var(--line)}
.demo-flow-label{font-size:11px;font-weight:550}
.demo-flow-controls .payment-message{text-align:left;margin:8px 0 0;font-size:11px}
.demo-flow-controls .secondary-button{min-width:156px;min-height:44px;font-size:11px;padding:8px 16px;white-space:nowrap}
@media(min-width:1001px){.lookup-grid .field{min-height:104px}}
@media(max-width:1000px){
 .selection{padding:24px}.checkout-prep{gap:32px;grid-template-columns:minmax(0,1fr) 288px}.checkout-summary{padding-left:24px}
 .payment-card{padding:24px 24px 0}.payment-columns{gap:32px}.payment-bill{padding-left:24px}.payment-card-heading strong{font-size:30px}
 .demo-flow-controls{margin:0 -24px;padding:24px}.order-progress li:not(:last-child)::after{left:148px}
}
@media(max-width:760px){
 .checkout-prep{grid-template-columns:1fr;gap:32px}.checkout-summary{padding:24px 0 0;min-height:0;grid-template-columns:minmax(0,1fr) auto;column-gap:24px}
 .checkout-summary .selected-product{height:96px}.checkout-summary .quantity-control{height:48px}.purchase-consent{margin-top:0}
 .checkout-action{margin-top:8px}.checkout-action .primary-button{min-width:128px}.next-step{margin-top:16px}
 .payment-columns{grid-template-columns:1fr;gap:32px}.payment-scan{max-width:440px;margin-inline:auto}.payment-bill{padding:24px 0 0;border-left:0;border-top:1px solid var(--line)}
 .payment-code-panel{padding:24px 24px 0}.order-progress{gap:16px;padding:16px 0 24px;margin-bottom:24px}
 .order-progress li{flex-direction:column;align-items:flex-start;gap:12px}.order-progress li:not(:last-child)::after{left:48px;top:16px;right:0}
 .demo-flow-controls{align-items:flex-start}
}
@media(max-width:650px){
 .selection{padding:24px 16px;border-radius:20px}.selection .section-heading{margin-bottom:16px}.selection .option-list{gap:8px}
 .checkout-prep{padding-top:24px;margin-top:24px}.lookup-grid{gap:24px;margin:0}.setup-heading{min-height:56px}
 .product-input-slot{min-height:184px}.product-input-note{padding:16px;gap:12px}.product-input-note strong{font-size:11px}
 .checkout-summary{display:block;position:relative;padding-top:24px}.checkout-summary .selected-product{padding-right:120px;height:104px}
 .checkout-summary .quantity-control{position:absolute;top:24px;right:0}.checkout-summary .stepper button{width:36px}.checkout-summary .stepper output{min-width:24px}
 .selection .preview-note{margin-top:24px;padding-top:16px;font-size:10px;line-height:1.8}
 .payment-card{padding:16px 16px 0;border-radius:20px}.payment-topline{margin-bottom:16px}.payment-topline>span{font-size:10px}
 .order-progress{gap:12px}.order-progress strong{font-size:11px}.order-progress small{font-size:9px}.order-progress li{gap:12px}
 .payment-card-heading{gap:12px;margin-bottom:16px}.payment-card-heading h2{font-size:22px}.payment-card-heading strong{font-size:28px}
 .payment-code-panel{padding:16px 16px 0}.payment-visual{min-height:280px}.payment-code-status{font-size:10px}
 .payment-details-list>div,.payment-details-list #payment-delivery-fields>div{grid-template-columns:72px minmax(0,1fr);font-size:11px;gap:12px}
 .bill-heading h3{font-size:16px}.demo-flow-controls{margin:0 -16px;padding:24px 16px;flex-direction:column;gap:16px}.demo-flow-controls .secondary-button{width:100%}
}
@media(max-width:360px){
 .selection{padding-inline:12px}.checkout-summary .selected-product{padding-right:112px;height:120px}.checkout-summary .stepper button{width:32px}.checkout-action .primary-button{min-width:112px}
 .payment-card{padding-inline:12px}.demo-flow-controls{margin-inline:-12px;padding-inline:12px}.order-progress{gap:8px}.progress-node{width:28px;height:28px}.order-progress li:not(:last-child)::after{top:14px;left:40px}.order-progress strong{font-size:10px}
 .payment-card-heading strong{font-size:25px}.payment-code-panel{padding-inline:12px}.payment-visual{min-height:256px}.product-input-note{padding:12px}
}
@media(prefers-reduced-motion:reduce){.payment-result,.product-input-slot .delivery-fields,.product-input-slot .invite-field{animation:none}.progress-node,.bill-timeline li{transition:none}}
