
/* UBZ_POS_UPPER_BOUNDARY_STABILITY_R5113_P3 */


/* ==============================================================
   POS SAFE FOUNDATION CANDIDATE

   Base UI:
     Exact R5.10 POS presentation.

   This file changes ONLY:
   - upper POS Counter boundary visibility
   - Deck shadow clearance
   - previously accepted small text polish

   No internal POS layout restructuring.
   ============================================================== */


/* --------------------------------------------------------------
   POS COUNTER UPPER LIMIT
   -------------------------------------------------------------- */

html[data-ubz-r5113-header-active="1"]
.section-page.pos-dedicated-counter-shell {
  margin-block-start:
    16px
    !important;

  border-top:
    2px solid #64748b
    !important;

  border-top-left-radius:
    10px
    !important;

  border-top-right-radius:
    10px
    !important;
}


/* --------------------------------------------------------------
   ACCEPTED MICRO-POLISH
   -------------------------------------------------------------- */

.pos-counter-page--dedicated
.pos-cart-remove-button {
  white-space:
    nowrap
    !important;
}


.pos-counter-page--dedicated
.pos-transaction-completion-card
>
span {
  display:
    none
    !important;
}


.pos-counter-page--dedicated
.pos-print-receipt-button,

.pos-counter-page--dedicated
.pos-transaction-print-card
>
span {
  white-space:
    nowrap
    !important;
}


/* --------------------------------------------------------------
   TABLET
   -------------------------------------------------------------- */

@media (min-width: 768px) and (max-width: 1100px) {

  html[data-ubz-r5113-header-active="1"]
  .section-page.pos-dedicated-counter-shell {
    margin-block-start:
      12px
      !important;
  }

}


/* --------------------------------------------------------------
   MOBILE
   -------------------------------------------------------------- */

@media (max-width: 767px) {

  html[data-ubz-r5113-header-active="1"]
  .section-page.pos-dedicated-counter-shell {
    margin-block-start:
      10px
      !important;

    border-top-width:
      1px
      !important;
  }

}

/* ==============================================================
   UBZ_POS_P3_2_ZERO_LAYOUT_UPPER_BORDER

   Visual POS upper boundary only.

   Direct dedicated-POS outer-shell selector.
   Inset shadow consumes zero physical layout space.
   ============================================================== */

.section-page.pos-dedicated-counter-shell {
  box-shadow:
    inset 0 3px 0 0 #64748b
    !important;
}


/* Mobile: compact visible upper boundary. */

@media (max-width: 767px) {

  .section-page.pos-dedicated-counter-shell {
    box-shadow:
      inset 0 2px 0 0 #64748b
      !important;
  }

}

/* ==============================================================
   UBZ_POS_P3_3_DECK_SAFE_FIXED_SHELL_OFFSET

   Move the COMPLETE fixed Pharmacy POS shell below the Menu Deck.

   Do not move Live POS / Historical POS / Balance individually.

   Preserve P3.2 upper-border styling and all internal POS
   layout/functionality.
   ============================================================== */

html:root body
.section-page.pos-dedicated-counter-shell {
  top:
    104px
    !important;

  margin-block-start:
    0
    !important;
}


/* Tablet */

@media (min-width: 768px) and (max-width: 1100px) {

  html:root body
  .section-page.pos-dedicated-counter-shell {
    top:
      96px
      !important;
  }

}


/* Mobile */

@media (max-width: 767px) {

  html:root body
  .section-page.pos-dedicated-counter-shell {
    top:
      88px
      !important;
  }

}

/* ==============================================================
   UBZ_POS_P3_4_R2_FIRST_MOUNT_LAYOUT_STABILITY

   CSS-only first-mount bridge.

   The approved R5.10 presentation normally receives these desktop
   grid rules through the activated POS presentation root.

   This bridge applies the same approved desktop geometry directly
   to the dedicated POS shell, so SPA route entry does not expose
   the temporary collapsed transaction workspace before activation.

   No business logic or JavaScript is changed.
   ============================================================== */

@media (min-width: 1280px) {

  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-operating-cockpit-v2 {
    display: grid !important;

    grid-template-columns:
      minmax(0, 48fr)
      minmax(0, 52fr)
      !important;

    gap: 8px !important;

    align-items: start !important;
    align-content: start !important;
  }


  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-operating-cockpit-v2
  > .pos-product-stock-section {
    grid-column: 1 !important;
    grid-row: 1 !important;

    align-self: start !important;

    height: fit-content !important;
    min-width: 0 !important;
  }


  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-operating-cockpit-v2
  > .pos-sale-transaction-section {
    grid-column: 2 !important;
    grid-row: 1 !important;

    display: grid !important;

    grid-template-columns:
      minmax(0, 1.14fr)
      minmax(280px, .86fr)
      !important;

    grid-template-areas:
      "cart    metrics"
      "cart    payment"
      "setup   payment"
      "confirm payment"
      "recent  recent"
      !important;

    gap: 8px !important;

    align-items: start !important;
    align-content: start !important;

    width: 100% !important;
    min-width: 0 !important;
  }


  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-sale-transaction-section
  > .pos-sale-cart-section {
    grid-area: cart !important;
    min-width: 0 !important;
  }


  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-sale-transaction-section
  > .ubz-r5-session-metrics {
    grid-area: metrics !important;
    min-width: 0 !important;
  }


  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-sale-transaction-section
  > .pos-transaction-setup-section {
    grid-area: setup !important;

    width: 100% !important;
    min-width: 0 !important;
  }


  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-sale-transaction-section
  > .pos-payment-summary-section {
    grid-area: payment !important;

    width: 100% !important;
    min-width: 0 !important;

    height: auto !important;

    align-self: start !important;
  }


  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-sale-transaction-section
  > .pos-summary-confirmation-card {
    grid-area: confirm !important;

    min-width: 0 !important;
  }


  .section-page.pos-dedicated-counter-shell
  .pos-counter-page--dedicated
  .pos-sale-transaction-section
  > .pos-sales-summary-table-card.pos-recent-transactions-bottom {
    grid-area: recent !important;

    grid-column: 1 / -1 !important;

    position: static !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    height: auto !important;

    margin: 0 !important;

    align-self: start !important;
  }

}


/* ==============================================================
   UBZ_POS_P3_4_R2_PAYMENT_FINANCIAL_AMOUNT_TYPE_SCALE

   Reduce only the monetary-value typography in the financial
   Payment Summary column.

   Existing labels, headings, payment action and calculations are
   unchanged.
   ============================================================== */

.section-page.pos-dedicated-counter-shell
.pos-counter-page--dedicated
.pos-payment-summary-section
.pos-payment-summary-grid-v17
.pos-payment-summary-column--financial
.pos-summary-field-card--financial > strong {
  font-size:
    0.60rem
    !important;
}

/* ==============================================================
   UBZ_POS_P3_5_LIVE_SESSION_MODE_CAPTION_CLEANUP

   Remove only the visible native Live POS "Opening mode" and
   "Closing mode" captions.

   The mode selectors and their fresh-start / handover / final-close
   choices remain mounted and functional.
   ============================================================== */

.section-page.pos-dedicated-counter-shell
.pos-session-control-card
.pos-shift-card--open
> .pos-shift-field:first-child
> span:first-child,

.section-page.pos-dedicated-counter-shell
.pos-session-control-card
.pos-shift-card--close
> .pos-shift-field:first-child
> span:first-child {
  display:
    none
    !important;
}
