/* OmniVenta V63.28.03 R31
 * 1) Center Sales/Receiving receipts without Bootstrap .row negative-margin bias.
 * 2) Keep dashboard/card content inside its visual container.
 */

/* Receipt wrapper is also a Bootstrap .row; neutralize its negative horizontal margins on screen. */
@media screen {
  body.ov-module-sales #receipt_wrapper,
  body.ov-module-receivings #receipt_wrapper {
    float: none !important;
    width: calc(100% - 30px) !important;
    max-width: 1120px;
    margin: 12px auto 24px auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.ov-module-sales #receipt_wrapper_inner,
  body.ov-module-receivings #receipt_wrapper_inner {
    float: none !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.ov-module-sales #receipt_wrapper > .col-md-12,
  body.ov-module-receivings #receipt_wrapper > .col-md-12 {
    float: none !important;
  }
}

@media screen and (max-width: 767px) {
  body.ov-module-sales #receipt_wrapper,
  body.ov-module-receivings #receipt_wrapper {
    width: calc(100% - 12px) !important;
    margin-top: 6px !important;
    margin-bottom: 14px !important;
  }
}

/* Generic containment for common OmniVenta visual cards/panels. */
.acct-card,
.ov-summary-card,
.restaurant-summary-card,
.restaurant-table-card,
.panel,
.well,
.info-box,
.dashboard-stat {
  min-width: 0;
  max-width: 100%;
}

.acct-card small,
.acct-card strong,
.acct-card p,
.ov-summary-card .k,
.ov-summary-card .s,
.restaurant-summary-card,
.restaurant-table-card,
.panel-heading,
.panel-body,
.panel-footer,
.well {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Accounting money/KPI values: keep the entire value in its card.
 * On normal screens the slightly smaller fluid size prevents the value from crossing the card edge.
 * For unusually long values, wrapping is allowed rather than leaking outside the box.
 */
body.ov-module-accounting .acct-card {
  overflow: hidden;
}

body.ov-module-accounting .acct-card h3 {
  max-width: 100%;
  margin: 4px 0 0 !important;
  font-size: clamp(16px, 1.45vw, 24px) !important;
  line-height: 1.18 !important;
  font-variant-numeric: tabular-nums;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Other summary-value patterns already used in OmniVenta. */
.ov-summary-card .v,
.info-box .info-box-number,
.dashboard-stat .number,
.dashboard-stat .details .number {
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

/* Media should never protrude from a card/panel. */
.acct-card img,
.ov-summary-card img,
.restaurant-summary-card img,
.restaurant-table-card img,
.panel img,
.well img {
  max-width: 100%;
  height: auto;
}
