/* Align the receipt editor with the fixed photo and the shared capture dock. */
html:root body #wdAssetCamera:has(#wdReceiptInline:not([hidden])) {
  --wd-receipt-panel-end: calc(var(--wd-capture-dock) - 49px);
  --wd-receipt-photo-top: min(var(--wd-capture-top), max(16px, calc(var(--wd-receipt-panel-end) - 270px)));
  --wd-receipt-photo-height: clamp(64px, calc(var(--wd-receipt-panel-end) - var(--wd-receipt-photo-top) - 158px), var(--wd-capture-height));
  overflow: hidden !important;
}
html:root body #wdAssetCamera:has(#wdReceiptInline:not([hidden])) .wd-asset-camera-frame {
  top: var(--wd-receipt-photo-top) !important;
  height: var(--wd-receipt-photo-height) !important;
}
html:root body #wdAssetCamera:has(#wdReceiptInline:not([hidden])) #wdAssetCapturedPreview {
  object-fit: contain !important;
}
#wdAssetCamera #wdReceiptInline[hidden] { display: none !important; }
html:root body #wdAssetCamera #wdReceiptInline:not([hidden]) {
  position: fixed;
  top: calc(var(--wd-receipt-photo-top) + var(--wd-receipt-photo-height) + 10px);
  bottom: auto;
  height: max(0px, calc(var(--wd-receipt-panel-end) - var(--wd-receipt-photo-top) - var(--wd-receipt-photo-height) - 10px));
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, 89vw) !important;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 8px 10px !important;
  gap: 6px 10px !important;
  grid-auto-rows: max-content !important;
  align-content: start;
  overflow: auto;
  overscroll-behavior: contain;

}
html:root body #wdAssetCamera #wdReceiptInline > label {
  gap: 3px !important;
  display: grid !important;
  grid-template-rows: max-content 34px;
  align-items: start !important;
  line-height: 15px;
  font-weight: 650;
  color: #25384b;
}
html:root body #wdAssetCamera #wdReceiptInline > label > span {
  display: block;
  min-width: 0;
}
html:root body #wdAssetCamera #wdReceiptInline > label > input {
  appearance: none;
  height: 34px !important;
  min-height: 34px !important;
  padding: 4px 7px !important;
  font-size: 16px !important;
  text-align: start;
  border: 1px solid #d5e0e9;
  border-radius: 8px !important;
  background: #fff;
  color: #17283b;
}
#wdReceiptDate::-webkit-date-and-time-value { text-align: start; }
#wdAssetCamera #wdReceiptScanStatus {
  margin: 0;
  line-height: 1.3;
  color: #596c7b;
}
#wdAssetCamera:has(#wdReceiptInline:not([hidden])) .wd-asset-camera-pane { overflow: hidden !important; }

html:root body :is(#wdAssetCamera #wdReceiptInline:not([hidden]), #inspectionView .wd-car-note-slot:has(.wd-fail-note:not([hidden])), :is(#hseView,#hseCamera) .wd-note-slot:has(.wd-fail-note:not([hidden]))) {
  box-sizing: border-box;
  border: 1px solid #d5e0e9 !important;
  border-radius: 14px;
  background: #f8fafc !important;
}

html:root body #inspectionView .wd-car-note-slot:has(.wd-fail-note:not([hidden])),
html:root body.wd-icon-inspection :is(#hseView,#hseCamera) .wd-note-slot:has(.wd-fail-note:not([hidden])) {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: calc(var(--wd-capture-dock) - 49px) !important;
  bottom: auto !important;
  transform: translate(-50%, -100%) !important;
  width: min(500px, 89vw) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 8px 10px !important;
  margin: 0 !important;
  z-index: 6 !important;
  box-shadow: none !important;
}
html:root body :is(#inspectionView,#hseView,#hseCamera) .wd-note-slot .wd-failure-caption {
  white-space: nowrap;
  font-size: 12px;
  line-height: 15px;
  font-weight: 650;
}
html:root body :is(#inspectionView,#hseView,#hseCamera) .wd-note-slot > .wd-fail-note:not([hidden]) {
  position: static !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  box-sizing: border-box;
  border: 1px solid #d5e0e9 !important;
  border-radius: 8px !important;
  padding: 4px 7px !important;
  margin: 0 !important;
  font-size: 16px !important;
}

html:root body #wdAssetCamera:has(#wdReceiptInline:not([hidden])) :is(#wdAssetCameraBack,#wdAssetCameraDone,#wdReceiptAdd,#wdReceiptReject,#wdReceiptFinish):not([hidden]) {
  display: grid !important;
  place-items: center;
  border: 1px solid #d5e0e9 !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #17283b !important;
  font-size: 23px !important;
  line-height: 1 !important;
}
html:root body #wdAssetCamera #wdReceiptReject:not([disabled]) {color:#c93344 !important;}
#wdAssetCamera .wd-receipt-scan-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: fill;
  touch-action: none;
}
#wdAssetCamera .wd-receipt-scan-submit {
  grid-column: 1 / -1;
  min-height: 40px;
  border: 1px solid #97b9d2;
  border-radius: 8px;
  background: #fff;
  color: #17283b;
  font-weight: 650;
}
html:root body #wdAssetCamera:has(#wdReceiptInline:not([hidden])) #wdAssetCameraDone[data-receipt-saved] {
  background: #00a1e0 !important;
  border-color: #00a1e0 !important;
  color: #fff !important;
  opacity: 1 !important;
}
html:root body #wdAssetCamera :is(#wdReceiptAdd,#wdReceiptReject,#wdReceiptFinish)[hidden] {display:none !important;}

html:root body #wdAssetCamera #wdReceiptInline > label.wd-receipt-card-row {
  grid-column: 1 / -1 !important;
}
html:root body #wdAssetCamera #wdReceiptDate {width:100% !important;}
html:root body #wdAssetCamera:has(#wdReceiptInline input:focus) {
  --wd-receipt-photo-top: 8px;
  --wd-receipt-photo-height: clamp(52px, 17svh, 100px);
}
.wd-card-statement-page {display:block;width:100%;max-width:794px;height:auto;margin:0 auto 12px;border:1px solid #d5e0e9;}
