/* ERP Comercial Chile v10.25.7 — POS altura completa aislada
   IMPORTANTE: el bloqueo de scroll se aplica únicamente al Punto de venta.
   Dashboard, documentos, clientes, reportes, inventario, integraciones,
   Mercado Libre y administración conservan el scroll normal del documento. */

@media (min-width: 1024px) {
  /* Sólo el documento del POS queda bloqueado. La clase en <html> es gestionada
     por layout-scroll-seguro-v10257.js y se limpia al salir de ?tab=ventas. */
  html.erp-pos-document-lock,
  body.erp-pos-active,
  body.erp-pos-active #root,
  body.erp-pos-active #root > div.flex,
  body.erp-pos-active #root > div.flex > main.flex {
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  body.erp-pos-active #root > div.flex > main.flex {
    display: flex !important;
    flex-direction: column !important;
  }

  body.erp-pos-active #root > div.flex > main.flex > header.no-print {
    flex: 0 0 auto !important;
  }

  body.erp-pos-active #root main > .responsive-workspace {
    height: auto !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    overflow: hidden !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  body.erp-pos-active .erp-ventas.pos19-root {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.erp-pos-active .pos19-shell {
    display: grid !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    flex: 1 1 0% !important;
    grid-template-columns: minmax(0, 1fr) minmax(350px, 405px) !important;
    grid-template-rows: var(--pos252-toolbar-h, 48px) minmax(0, 1fr) auto !important;
    grid-template-areas:
      "search cash"
      "cart checkout"
      "client checkout" !important;
    align-content: stretch !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  body.erp-pos-active .pos19-cart-card {
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  body.erp-pos-active .pos19-cart-card > div:last-child {
    min-height: 0 !important;
    max-height: none !important;
    flex: 1 1 0% !important;
  }

  body.erp-pos-active .pos19-cart-scroll-desktop {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 1 1 0% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.erp-pos-active .pos19-cart-card > div:last-child:not(.pos19-cart-scroll-desktop) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.erp-pos-active .pos19-client-card {
    align-self: end !important;
    width: 100% !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
  }

  body.erp-pos-active .pos19-checkout,
  body.erp-pos-active .pos19-checkout-card {
    align-self: stretch !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  body.erp-pos-active .pos19-checkout-card {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.erp-pos-active .pos19-checkout-body {
    display: flex !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.erp-pos-active .pos19-checkout-empty {
    display: flex !important;
    min-height: 0 !important;
    flex: 1 1 0% !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.erp-pos-active .pos19-checkout-actions {
    flex: 0 0 auto !important;
    margin-top: auto !important;
  }
}

@media (min-width: 1440px) {
  body.erp-pos-active .pos19-shell {
    grid-template-columns: minmax(0, 1fr) 405px !important;
  }
}

/* v10.25.8 — Estado vacío de Finalizar venta, centrado y legible. */
@media (min-width: 1024px) {
  body.erp-pos-active .pos19-checkout-empty {
    flex-direction: column !important;
    gap: 0 !important;
    padding: 32px 24px !important;
    text-align: center !important;
  }

  body.erp-pos-active .pos19-checkout-empty > div {
    flex: 0 0 auto !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }

  body.erp-pos-active .pos19-checkout-empty > p {
    display: block !important;
    width: 100% !important;
    max-width: 290px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    text-align: center !important;
    white-space: normal !important;
  }

  body.erp-pos-active .pos19-checkout-empty > p:nth-of-type(1) {
    margin-top: 14px !important;
    line-height: 1.35 !important;
  }

  body.erp-pos-active .pos19-checkout-empty > p:nth-of-type(2) {
    margin-top: 6px !important;
    line-height: 1.55 !important;
  }
}
