/* v0.77.1 — keep the invoice/credit approval record wholly inside the viewport. */
@media (min-width: 1101px) {
  #detailDialog:has(> #detailContent.invoice-record-shell) {
    box-sizing: border-box;
    width: min(1440px, calc(100vw - 24px)) !important;
    height: calc(100dvh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    margin: 12px auto !important;
    overflow: hidden !important;
    zoom: 1 !important;
  }

  #detailDialog > #detailContent.invoice-record-shell {
    box-sizing: border-box;
    width: 100%;
    height: 100% !important;
    max-height: 100% !important;
    padding: .75rem .85rem 1rem !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 1100px) {
  #detailDialog:has(> #detailContent.invoice-record-shell) {
    box-sizing: border-box;
    width: calc(100vw - 16px) !important;
    height: calc(100dvh - 16px) !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 16px) !important;
    margin: 8px auto !important;
    overflow: hidden !important;
  }

  #detailDialog > #detailContent.invoice-record-shell {
    box-sizing: border-box;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
}
