/* Kiosk presentation at any width; classic keeps the existing responsive POS. */
.mobile-pos-catalog, .mobile-pos-dock, .mobile-pos-back { display: none; }
.mobile-pos-cart { display: contents; }
.mobile-pos-tools { display: none; }
.mobile-pos-customer { display: none; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-layout { overflow: clip; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse { display: flex; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse > div:first-child { flex-shrink: 0; }
  /* One header: the toolbar row collapses and only leaves room for the connection
     notice, which keeps its own compact button and its explanation. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-header > header { height: auto; min-height: 0; padding-block: 0; padding-inline: 8px; border-bottom: 0; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-header > header > *:not(.connection-notice__trigger) { display: none; }
  /* Two-class rules keep the phone values above the shared utilities of the same weight. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-find { gap: 10px; padding: 10px 16px 8px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-search { height: 48px; border: 0; border-radius: 12px; background: var(--color-ink-100); padding-inline: 14px; gap: 10px; color: var(--color-ink-500); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-search > svg { width: 20px; height: 20px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-scan { width: 48px; height: 48px; border-radius: 12px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-scan > svg { width: 24px; height: 24px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-tools { display: flex; width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--color-ink-100); color: var(--color-ink-700); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-tools > svg { width: 24px; height: 24px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-catalog { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
  /* Search and categories share the header surface: no row looks like its own panel. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-categories { display: flex; flex-shrink: 0; gap: 8px; overflow-x: auto; padding: 0 16px 10px; background: var(--color-surface); scrollbar-width: none; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-categories::-webkit-scrollbar { display: none; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-category { flex-shrink: 0; min-height: 40px; padding: 8px 15px; border: 0; border-radius: 999px; background: var(--color-ink-100); color: var(--color-ink-700); font-size: 14px; font-weight: 600; cursor: pointer; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-category[aria-pressed=true] { background: var(--color-teal-600); color: white; }
  /* The star alone marks the shortcuts; the chip itself follows the category system. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-star { margin-inline-end: 6px; color: var(--color-warn-500); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-category[aria-pressed=true] .mobile-pos-star { color: #f7cf86; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-products { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 16px 18px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-window { position: relative; overflow-anchor: none; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-grid { position: absolute; top: 0; inset-inline: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: var(--mobile-pos-card-height); gap: 12px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-product { position: relative; display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 0; border-radius: 14px; background: var(--color-surface); color: var(--color-ink-900); text-align: start; cursor: pointer; box-shadow: 0 1px 2px #14181a14; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-product[data-selected=true] { box-shadow: 0 0 0 2px var(--color-teal-600); }
  /* Moderate photo band (50/31 of the card width): name and price lead the card.
     mobilePosWindow.js reproduces this ratio and its 128 px cap. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-photo { position: relative; display: flex; flex-shrink: 0; width: 100%; aspect-ratio: 50/31; max-height: 128px; align-items: center; justify-content: center; }
  /* A product without a photo keeps the same row height and shows one discreet mark. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-photo-glyph { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: var(--color-ink-50); color: var(--color-ink-300); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-photo img { width: 100%; height: 100%; position: absolute; object-fit: contain; padding: 6px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-badge { position: absolute; top: 6px; inset-inline-end: 6px; min-width: 24px; padding: 1px 6px; border-radius: 999px; background: var(--color-teal-600); color: white; font-size: 12px; line-height: 18px; font-weight: 700; text-align: center; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; margin: 7px 11px 0; font-size: 14px; line-height: 17px; font-weight: 600; overflow-wrap: anywhere; }
  /* Geometry reserves price, a wrapped unit and discount; do not squeeze this block. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-price { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: baseline; gap: 0 5px; margin-top: 2px; padding: 0 11px 10px; font-size: 17px; line-height: 21px; font-weight: 750; font-variant-numeric: tabular-nums; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-price del { order: 2; width: 100%; color: var(--color-ink-500); font-size: 12px; line-height: 15px; font-weight: 400; text-decoration: line-through; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-price del > * { text-decoration: line-through; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-price small { font-size: 11px; line-height: 15px; font-weight: 400; color: var(--color-ink-500); white-space: nowrap; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-empty { padding: 36px 12px; text-align: center; color: var(--color-ink-500); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-more { display: block; min-height: 44px; width: 100%; margin-top: 12px; color: var(--color-teal-700); font-weight: 600; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-cart { display: none; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-layout[data-cart-open=true] .mobile-pos-browse { flex: 0 0 auto; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-layout[data-cart-open=true] .mobile-pos-catalog { display: none; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-layout[data-cart-open=true] .mobile-pos-cart { display: flex; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-back { display: flex; align-items: center; justify-content: center; width: 44px; height: 48px; flex-shrink: 0; border: 0; border-radius: 12px; padding: 0; background: var(--color-surface); color: var(--color-teal-700); cursor: pointer; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-back:hover, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-back:active { background: var(--color-ink-100); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-legacy-dock { display: none; }
  /* One base with the navigation below: only Cobrar carries the strong colour. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-dock { display: flex; align-items: center; gap: 10px; min-height: 68px; padding-block: 8px; padding-inline: 12px; background: var(--color-surface); color: var(--color-ink-900); border-top: 1px solid var(--color-ink-150); box-shadow: 0 -6px 16px #14181a0a; }
  /* Sale customer: one quiet line on the same base as the total, above it, never a panel of its own. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer { display: flex; align-items: center; gap: 4px; padding-block: 4px 0; padding-inline: 8px; background: var(--color-surface); border-top: 1px solid var(--color-ink-150); box-shadow: 0 -6px 16px #14181a0a; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer + .mobile-pos-dock { border-top: 0; box-shadow: none; padding-top: 4px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer-main { display: flex; flex: 1; min-width: 0; align-items: center; gap: 8px; min-height: 44px; padding-inline: 8px; border-radius: 10px; color: var(--color-teal-700); font-size: 14px; font-weight: 600; text-align: start; cursor: pointer; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer-main:active, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer-remove:active { background: var(--color-ink-50); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer[data-sale-customer=selected] .mobile-pos-customer-name { color: var(--color-ink-900); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer-remove { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; color: var(--color-ink-500); cursor: pointer; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer-main:focus-visible, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-customer-remove:focus-visible { outline: 2px solid var(--color-teal-600); outline-offset: -2px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-total { display: flex; flex: 1; min-width: 0; gap: 12px; align-items: center; min-height: 52px; padding-block: 6px; padding-inline: 12px; border-radius: 12px; background: var(--color-ink-50); text-align: start; cursor: pointer; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-total:active { background: var(--color-ink-100); }
  /* One basket carries the count, so the row states the cart once. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-basket { position: relative; display: flex; flex-shrink: 0; align-items: center; justify-content: center; color: var(--color-ink-600); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-count { position: absolute; top: -7px; inset-inline-end: -9px; display: flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--color-teal-600); color: white; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-total-label { display: block; font-size: 12px; font-weight: 600; color: var(--color-ink-500); }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-total-value { display: block; font-size: clamp(18px, 5.2vw, 24px); font-weight: 750; font-variant-numeric: tabular-nums; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-pay { display: flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 5px; min-height: 52px; min-width: 124px; padding-block: 12px; padding-inline: 18px; border-radius: 12px; background: var(--color-teal-600); color: white; text-decoration: none; font-size: 16px; font-weight: 700; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-pay:disabled { background: var(--color-ink-100); color: var(--color-ink-500); opacity: 1; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-total:focus-visible, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-pay:focus-visible, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-tools:focus-visible { outline: 2px solid var(--color-teal-600); outline-offset: 2px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-product:focus-visible, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-category:focus-visible, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-back:focus-visible, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-more:focus-visible { outline: 2px solid var(--color-teal-600); outline-offset: -3px; }
/* Keep every toolbar control comfortable, including the cart's back arrow. */
@media (max-width: 360px) {
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-find { gap: 8px; padding-inline: 12px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-scan, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-tools { width: 44px; height: 44px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-browse .mobile-pos-search { height: 44px; padding-inline: 12px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-back { height: 44px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-categories, :where(html[data-pos-presentation="kiosk"]) .mobile-pos-products { padding-inline: 12px; }
  /* Reserve space for long totals without shrinking the amount or the touch targets. */
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-dock { gap: 8px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-total { gap: 8px; padding-inline: 8px; }
  :where(html[data-pos-presentation="kiosk"]) .mobile-pos-pay { min-width: 104px; padding-inline: 12px; }
}

/* Keep the kiosk's browse/cart navigation and fixed base on wide screens too. */
html[data-pos-presentation="kiosk"] .mobile-pos-layout { flex-direction: column; align-items: stretch; }
html[data-pos-presentation="kiosk"] .mobile-pos-find { display: flex; }
html[data-pos-presentation="kiosk"] .pos-classic-browser { display: none; }
html[data-pos-presentation="kiosk"] .mobile-pos-cart > section { display: flex; }
html[data-pos-presentation="kiosk"] .mobile-pos-browse { flex-basis: 0; }
html[data-pos-presentation="kiosk"] .pos-toast { inset-inline-start: 50%; inset-inline-end: auto; bottom: 90px; transform: translateX(-50%); }
html[dir="rtl"][data-pos-presentation="kiosk"] .pos-toast { transform: translateX(50%); }
.pos-presentation-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pos-presentation-option { position: relative; display: flex; min-width: 0; flex-direction: column; gap: 5px; padding: 10px; border: 1px solid var(--color-ink-150); border-radius: 12px; background: var(--color-surface); cursor: pointer; }
.pos-presentation-option[data-selected=true] { border-color: var(--color-teal-600); background: var(--color-teal-50); }
.pos-presentation-option:focus-within { outline: 2px solid var(--color-teal-600); outline-offset: 3px; }
.pos-presentation-option input { position: absolute; inset-inline-end: 12px; bottom: 38px; width: 18px; height: 18px; accent-color: var(--color-teal-600); cursor: pointer; }
.pos-presentation-preview { width: 100%; height: auto; border: 1px solid var(--color-ink-150); border-radius: 7px; margin-bottom: 5px; }
.pos-presentation-label { padding-inline-end: 26px; color: var(--color-ink-900); font-weight: 600; }
.pos-presentation-description { color: var(--color-ink-500); font-size: 12px; }
.pos-presentation-option[data-mode=auto] { grid-column: 1 / -1; display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 12px; align-items: center; }
.pos-presentation-option[data-mode=auto] .pos-presentation-preview { grid-row: 1 / 3; margin: 0; border: 0; }
.pos-presentation-option[data-mode=auto] .pos-presentation-label { align-self: end; }
.pos-presentation-option[data-mode=auto] .pos-presentation-description { align-self: start; padding-inline-end: 26px; }
.pos-presentation-option[data-mode=auto] input { top: 50%; bottom: auto; transform: translateY(-50%); }
