/* OmniVenta V63.28.04 R232
 * Receiving return workspace: give the merchandise grid more room.
 * Completed receiving receipt: use the available screen width while keeping print rules untouched.
 */

/* Return entry workspace — presentation only; Bootstrap columns are also adjusted in receiving.php. */
@media screen and (min-width: 1200px) {
  body.ov-module-receivings .register.receiving-return-layout .receiving-main-column {
    padding-right: 8px !important;
  }
  body.ov-module-receivings .register.receiving-return-layout .receiving-side-column {
    padding-left: 8px !important;
  }
  body.ov-module-receivings .register.receiving-return-layout .receiving-side-column .register-right {
    border-radius: 12px !important;
    overflow: visible !important;
  }
}

/* Completed receiving receipt — override the older 1120px cap only for Receiving. */
@media screen and (min-width: 992px) {
  body.ov-module-receivings #receipt_wrapper {
    width: calc(100% - 24px) !important;
    max-width: 1480px !important;
    margin: 12px auto 26px auto !important;
  }
  body.ov-module-receivings #receipt_wrapper_inner {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }
  body.ov-module-receivings #receipt_wrapper_inner > .panel-piluku {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 12px !important;
    border-color: #e1dbea !important;
    box-shadow: 0 6px 24px rgba(45,31,74,.07) !important;
    overflow: hidden !important;
  }
  body.ov-module-receivings #receipt_wrapper_inner > .panel-piluku > .panel-body.panel-pad {
    padding: 18px 24px 10px !important;
  }
  body.ov-module-receivings #receipt_wrapper .invoice-address,
  body.ov-module-receivings #receipt_wrapper .invoice-detail {
    line-height: 1.35;
  }
  body.ov-module-receivings #receipt_wrapper #receipt-table {
    margin-top: 12px !important;
  }
  body.ov-module-receivings #receipt_wrapper #receipt-table .invoice-head,
  body.ov-module-receivings #receipt_wrapper #receipt-table .invoice-content {
    padding-left: 5px;
    padding-right: 5px;
  }
  body.ov-module-receivings #receipt_wrapper .invoice-footer.panel-pad {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  body.ov-module-receivings #receipt_wrapper {
    width: calc(100% - 16px) !important;
    max-width: none !important;
    margin: 8px auto 18px auto !important;
  }
}

/* Structured supplier-return / credit-note summary on /receivings/complete. */
.ov-complete-credit-summary {
  margin: 12px 14px 2px;
  padding: 11px 12px;
  border: 1px solid #d9d1e9;
  border-left: 4px solid #6845a5;
  border-radius: 10px;
  background: #faf8fd;
  color: #433854;
}
.ov-complete-credit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.ov-complete-credit-head > div {
  min-width: 0;
}
.ov-complete-credit-head strong {
  display: inline-block;
  margin-right: 10px;
  font-size: 13px;
  color: #372b4d;
}
.ov-complete-credit-head span {
  font-size: 10px;
  color: #746c7f;
}
.ov-complete-credit-grid {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 7px;
}
.ov-complete-credit-grid > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e8e2f0;
  border-radius: 8px;
  background: #fff;
}
.ov-complete-credit-grid span {
  display: block;
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 700;
  color: #777082;
  line-height: 1.2;
}
.ov-complete-credit-grid strong {
  display: block;
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
  color: #3f3454;
  overflow-wrap: anywhere;
}
.ov-complete-credit-reason {
  margin-top: 7px;
  font-size: 10px;
  color: #655c70;
}
.ov-complete-credit-reason span {
  font-weight: 800;
  color: #4a4058;
}

@media screen and (max-width: 1100px) {
  .ov-complete-credit-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media screen and (max-width: 767px) {
  .ov-complete-credit-summary { margin: 8px 6px 2px; padding: 9px; }
  .ov-complete-credit-head { align-items: flex-start; }
  .ov-complete-credit-head strong { display: block; margin: 0 0 3px; }
  .ov-complete-credit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media screen and (max-width: 420px) {
  .ov-complete-credit-grid { grid-template-columns: 1fr; }
}

/* Do not alter paper width or legacy thermal/A4 print behavior. */
@media print {
  .ov-complete-credit-summary {
    margin: 4px 0 6px !important;
    padding: 5px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #999 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #000 !important;
  }
  .ov-complete-credit-grid {
    display: block !important;
  }
  .ov-complete-credit-grid > div {
    display: inline-block !important;
    width: 32% !important;
    padding: 2px 4px !important;
    border: 0 !important;
    background: transparent !important;
    vertical-align: top;
  }
}


/* OmniVenta R233 — fully fluid / auto-adjusting receiving receipt for PC, tablets and mobile. */
@media screen {
  body.ov-module-receivings #receipt_wrapper {
    width: calc(100% - 12px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  body.ov-module-receivings #receipt_wrapper_inner {
    width: 100% !important;
    max-width: none !important;
  }
  body.ov-module-receivings #receipt_wrapper_inner > .panel-piluku {
    width: 100% !important;
    max-width: none !important;
  }
  body.ov-module-receivings #receipt_wrapper .panel-body.panel-pad {
    padding: clamp(10px, 1.9vw, 24px) !important;
  }
  body.ov-module-receivings #receipt_wrapper .invoice-address,
  body.ov-module-receivings #receipt_wrapper .invoice-detail,
  body.ov-module-receivings #receipt_wrapper .invoice-address.invoiceto {
    margin-bottom: 10px;
  }
  body.ov-module-receivings #receipt_wrapper .company-title {
    font-size: clamp(16px, 2vw, 22px) !important;
    line-height: 1.15 !important;
  }
  body.ov-module-receivings #receipt_wrapper .invoice-address li,
  body.ov-module-receivings #receipt_wrapper .invoice-detail li,
  body.ov-module-receivings #receipt_wrapper .invoiceto li,
  body.ov-module-receivings #receipt_wrapper #receipt-table .invoice-content,
  body.ov-module-receivings #receipt_wrapper #receipt-table .invoice-head,
  body.ov-module-receivings #receipt_wrapper .invoice-footer-value,
  body.ov-module-receivings #receipt_wrapper .invoice-footer-heading {
    font-size: clamp(11px, .95vw, 15px) !important;
    line-height: 1.35 !important;
  }
  body.ov-module-receivings #receipt_wrapper .invoice-footer.panel-pad {
    padding-left: clamp(10px, 1.9vw, 24px) !important;
    padding-right: clamp(10px, 1.9vw, 24px) !important;
  }
  body.ov-module-receivings #receipt_wrapper #receipt-table .invoice-content.item-name,
  body.ov-module-receivings #receipt_wrapper #receipt-table .invoice-content.item-name * {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  body.ov-module-receivings #receipt_wrapper #receipt-table tbody td,
  body.ov-module-receivings #receipt_wrapper #receipt-table tbody tr {
    vertical-align: top;
  }
}

@media screen and (min-width: 1280px) {
  body.ov-module-receivings #receipt_wrapper {
    width: calc(100% - 20px) !important;
    margin-top: 10px !important;
    margin-bottom: 24px !important;
  }
}

@media screen and (min-width: 992px) and (max-width: 1279px) {
  body.ov-module-receivings #receipt_wrapper {
    width: calc(100% - 14px) !important;
    margin-top: 8px !important;
    margin-bottom: 18px !important;
  }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
  body.ov-module-receivings #receipt_wrapper {
    width: calc(100% - 10px) !important;
    margin-top: 6px !important;
    margin-bottom: 14px !important;
  }
  body.ov-module-receivings #receipt_wrapper .panel-body > .row > [class*="col-"] {
    margin-bottom: 12px;
  }
  .ov-complete-credit-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

@media screen and (max-width: 767px) {
  body.ov-module-receivings #receipt_wrapper {
    width: calc(100% - 6px) !important;
    margin-top: 4px !important;
    margin-bottom: 10px !important;
  }
  body.ov-module-receivings #receipt_wrapper_inner > .panel-piluku {
    border-radius: 10px !important;
  }
  body.ov-module-receivings #receipt_wrapper .panel-body.panel-pad {
    padding: 10px !important;
  }
  body.ov-module-receivings #receipt_wrapper .panel-body > .row {
    margin-left: -4px !important;
    margin-right: -4px !important;
  }
  body.ov-module-receivings #receipt_wrapper .panel-body > .row > [class*="col-"] {
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin-bottom: 10px;
  }
  body.ov-module-receivings #receipt_wrapper #receipt-table {
    table-layout: fixed;
    width: 100% !important;
  }
  body.ov-module-receivings #receipt_wrapper #receipt-table .invoice-head,
  body.ov-module-receivings #receipt_wrapper #receipt-table .invoice-content {
    padding-left: 3px !important;
    padding-right: 3px !important;
  }
  body.ov-module-receivings #receipt_wrapper .invoice-footer-value,
  body.ov-module-receivings #receipt_wrapper .invoice-footer-heading {
    font-size: 12px !important;
  }
  .ov-complete-credit-summary {
    margin: 6px 4px 2px !important;
    padding: 8px !important;
  }
  .ov-complete-credit-head {
    flex-direction: column;
    align-items: stretch;
  }
  .ov-complete-credit-head .btn {
    width: 100%;
  }
  .ov-complete-credit-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}
