/* ORDNT POS navigation primitives: one button + one contextual heading.
 * Owners: posWorkspaceHeading()/posBackButtonMarkup() in sales-view.js.
 * Actions, permissions, active orders and checkout remain unchanged.
 */
body.ordnt-pos-live {
  --pos-context-bg:#eaf3ff;
  --pos-context-border:#d3e2f5;
  --pos-context-ink:#173960;
  --pos-context-muted:#63768f;
  --pos-heading-size:15px;
  --pos-caption-size:11px;
}
/* One button identity across Caja, Mesas, Pedidos, availability,
 * configurators, checkout, and cash subflows. No per-screen variants. */
body.ordnt-pos-live button.ordnt-pos-back-control {
  box-sizing:border-box!important;
  display:inline-flex!important;
  flex:0 0 auto;
  align-items:center!important;
  justify-content:center!important;
  justify-self:start!important;
  gap:8px!important;
  width:max-content!important;
  min-width:0!important;
  min-height:44px!important;
  height:auto!important;
  max-width:100%;
  margin:0!important;
  padding:6px 12px 6px 7px!important;
  border:1px solid #b5cef0!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f7faff 100%)!important;
  box-shadow:0 1px 3px rgba(22,73,139,.08)!important;
  color:#164b8f!important;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.2!important;
  letter-spacing:0!important;
  text-decoration:none!important;
  text-align:center;
  white-space:nowrap;
  cursor:pointer!important;
  touch-action:manipulation;
  transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
body.ordnt-pos-live button.ordnt-pos-back-control > span[aria-hidden="true"] {
  box-sizing:border-box;
  display:inline-grid!important;
  flex:0 0 27px;
  place-items:center;
  width:27px;
  height:27px;
  border-radius:8px;
  background:#e6efff;
  color:#1d5ed0;
  font-family:inherit;
  font-size:19px!important;
  font-weight:750;
  line-height:1!important;
}
body.ordnt-pos-live button.ordnt-pos-back-control:hover:not(:disabled) {
  border-color:#82aeeb!important;
  background:#f1f7ff!important;
  box-shadow:0 3px 9px rgba(22,73,139,.12)!important;
}
body.ordnt-pos-live button.ordnt-pos-back-control:active:not(:disabled) {
  transform:translateY(1px);
}
body.ordnt-pos-live button.ordnt-pos-back-control:focus-visible {
  outline:3px solid #8bb5fc!important;
  outline-offset:2px!important;
}
body.ordnt-pos-live button.ordnt-pos-back-control:disabled {
  cursor:not-allowed!important;
  opacity:.52!important;
}

/* One structural owner for Mesas, Pedidos, Caja, Estado de productos,
 * Producto and other in-POS workspaces. Equal 1fr sides keep titles
 * centered on the full workspace (never centered after the back button).
 */
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title,
body.ordnt-pos-live .poscore-native-cash-layout > .ordnt-pos-workspace-title {
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  flex:0 0 auto;
  min-width:0;
  min-height:54px!important;
  margin:0!important;
  padding:4px 10px!important;
  background:var(--pos-context-bg)!important;
  border:0!important;
  border-bottom:1px solid var(--pos-context-border)!important;
  border-radius:0!important;
}
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title > strong,
body.ordnt-pos-live .poscore-native-cash-layout > .ordnt-pos-workspace-title > strong {
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  min-width:0;
  width:100%;
  margin:0!important;
  overflow:hidden;
  color:var(--pos-context-ink)!important;
  font:800 var(--pos-heading-size)/1.15 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  letter-spacing:0!important;
  text-align:center!important;
  white-space:nowrap!important;
  text-overflow:ellipsis;
}
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title .ordnt-pos-workspace-description,
body.ordnt-pos-live .poscore-native-cash-layout .ordnt-pos-workspace-title .ordnt-pos-workspace-description {
  display:block!important;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  overflow:hidden;
  margin:0;
  color:var(--pos-context-muted)!important;
  font:500 var(--pos-caption-size)/1.25 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  text-align:center!important;
  white-space:nowrap!important;
  text-overflow:ellipsis;
}
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title > .ordnt-pos-workspace-spacer {
  display:block!important;
  width:100%!important;
}
body.ordnt-pos-live .poscore-native-cash-layout > .ordnt-pos-workspace-title {
  height:54px!important;
  flex-basis:54px!important;
}

/* Product availability is now rendered with the SAME markup/typography,
 * with its existing filter buttons occupying the balanced right column. */
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-availability-context-head > .ordnt-sales-availability-filters {
  display:flex!important;
  justify-content:flex-end!important;
  justify-self:end;
  align-items:center;
  gap:6px;
  min-width:0;
  max-width:100%;
}
body.ordnt-pos-live .ordnt-pos-availability-context-head .ordnt-sales-availability-filters > button {
  min-height:44px!important;
  font-size:12px!important;
  padding:5px 9px!important;
  white-space:nowrap;
}
/* The native Caja hub already has a distinct 'Turno de caja' section title.
 * Its old separate 'Volver a ventas' is redundant beside the shared header.
 * Hide only inside the inline POS workspace; standalone device flow retains it.
 */
body.ordnt-pos-live .poscore-native-cash-layout .ordnt-pos-cash-hub-head > [data-pos-tools-cancel],
body.ordnt-pos-live .poscore-native-cash-layout .ordnt-pos-temporary-cash-select .ordnt-pos-cash-hub-head > [data-pos-temporary-back] {
  display:none!important;
}
body.ordnt-pos-live .poscore-native-cash-layout .ordnt-pos-cash-hub-head {
  padding:13px 16px;
}
body.ordnt-pos-live .poscore-native-cash-layout .ordnt-pos-cash-hub-head h1 {
  font-size:19px;
}
@media (max-width:1100px) {
  body.ordnt-pos-live {
    --pos-caption-size:10px;
  }
  body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title,
  body.ordnt-pos-live .poscore-native-cash-layout > .ordnt-pos-workspace-title {
    min-height:52px!important;
    padding:4px 8px!important;
    gap:5px!important;
  }
  body.ordnt-pos-live .poscore-native-cash-layout > .ordnt-pos-workspace-title {
    height:52px!important;
    flex-basis:52px!important;
  }
  body.ordnt-pos-live .ordnt-pos-availability-context-head .ordnt-sales-availability-filters > button {
    padding-inline:7px!important;
    font-size:11px!important;
  }
}
@media (max-width:700px) {
  /* Narrow iPhones use an internal second filter row rather than clipping
   * button labels or the centered heading; no page-level scrolling. */
  body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-availability-context-head {
    grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr)!important;
  }
  body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-availability-context-head > .ordnt-sales-availability-filters {
    grid-column:1/-1;
    justify-self:center;
  }
  body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title > strong {
    --pos-heading-size:14px;
  }
}
@media (max-width:410px) {
  body.ordnt-pos-live button.ordnt-pos-back-control {
    gap:5px!important;
    padding:5px 8px 5px 5px!important;
    font-size:12px!important;
  }
  body.ordnt-pos-live button.ordnt-pos-back-control > span[aria-hidden="true"] {
    flex-basis:26px;
    width:26px;
    height:26px;
  }
  body.ordnt-pos-live .ordnt-pos-workspace-description {font-size:10px!important;}
}
@media (prefers-reduced-motion:reduce) {
  body.ordnt-pos-live button.ordnt-pos-back-control {transition:none!important}
}


/* Approved POS 3–7: single-pill Back navigation, no inner square. */
body.ordnt-pos-live {
  --pos-context-bg:#fafbfd;
  --pos-context-border:#e1e8f0;
  --pos-context-ink:#182f4e;
  --pos-context-muted:#75859b;
  --pos-heading-size:16px;
  --pos-caption-size:10px;
}
body.ordnt-pos-live button.ordnt-pos-back-control {
  min-height:44px!important;
  min-width:92px!important;
  padding:8px 15px!important;
  gap:9px!important;
  border:1px solid #dce5ee!important;
  border-radius:999px!important;
  background:#f0f3f7!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#263b53!important;
  font-size:13px!important;
  font-weight:750!important;
  justify-self:start!important;
}
body.ordnt-pos-live button.ordnt-pos-back-control > span[aria-hidden="true"] {
  display:inline-grid!important;
  place-items:center!important;
  flex:0 0 18px!important;
  width:18px!important;
  height:18px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:inherit!important;
  font-size:21px!important;
  font-weight:550!important;
}
body.ordnt-pos-live button.ordnt-pos-back-control:hover:not(:disabled) {
  border-color:#c9d7e6!important;
  background:#e7eef6!important;
  box-shadow:none!important;
}
body.ordnt-pos-live button.ordnt-pos-back-control:active:not(:disabled) {
  transform:scale(.98)!important;
  background:#dce8f6!important;
}
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title,
body.ordnt-pos-live .poscore-native-cash-layout > .ordnt-pos-workspace-title {
  background:#fafbfd!important;
  border-bottom:1px solid #e1e8f0!important;
  min-height:62px!important;
  padding:8px 15px!important;
}
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title > strong,
body.ordnt-pos-live .poscore-native-cash-layout > .ordnt-pos-workspace-title > strong {
  font-weight:850!important;
  letter-spacing:-.015em!important;
  color:#172f4f!important;
}
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title .ordnt-pos-workspace-description,
body.ordnt-pos-live .poscore-native-cash-layout .ordnt-pos-workspace-title .ordnt-pos-workspace-description {
  white-space:normal!important;
  line-height:1.25!important;
  max-width:100%!important;
}
@media(max-width:700px) {
  body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title {
    padding:6px 9px!important;
  }
  body.ordnt-pos-live button.ordnt-pos-back-control {
    min-width:78px!important;
    padding:7px 11px!important;
    font-size:12px!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  body.ordnt-pos-live button.ordnt-pos-back-control {transition:none!important;transform:none!important;}
}

/* Single POS workspace Volver style owner; preserves the previously rendered values. */
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title>button.ordnt-pos-back-control,
body.ordnt-pos-live .poscore-native-cash-layout>.ordnt-pos-workspace-title>button.ordnt-pos-back-control {
  width:auto!important;min-width:97px!important;min-height:44px!important;
  padding:8px 14px!important;display:inline-flex!important;
  align-items:center!important;justify-content:center!important;gap:8px!important;
  border:1px solid #dee6ef!important;border-radius:999px!important;
  background:#edf2f7!important;background-image:none!important;
  box-shadow:none!important;color:#233b54!important;
  font:750 13px/1.2 Inter,system-ui,sans-serif!important;
}
body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title>button.ordnt-pos-back-control>span[aria-hidden="true"],
body.ordnt-pos-live .poscore-native-cash-layout>.ordnt-pos-workspace-title>button.ordnt-pos-back-control>span[aria-hidden="true"] {
  display:inline!important;width:auto!important;height:auto!important;flex:0 0 auto!important;
  padding:0!important;background:transparent!important;border:0!important;
  border-radius:0!important;box-shadow:none!important;
  font-size:20px!important;line-height:1!important;color:inherit!important;
}

body.ordnt-pos-live .ordnt-pos-canonical .ordnt-pos-workspace-title>button.ordnt-pos-back-control:hover:not(:disabled),
body.ordnt-pos-live .poscore-native-cash-layout>.ordnt-pos-workspace-title>button.ordnt-pos-back-control:hover:not(:disabled){
  background:#e0eaf5!important;border-color:#cbd9e8!important;
}
