/* Existing online-billing preview styles, isolated to the future-task page. */
.future-receipt-preview-host{position:fixed;inset:0;margin:0;padding:0;border:0;border-radius:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;background:transparent;overflow:hidden;animation:none;transform:none;opacity:1;--line:var(--border,#dde4dd);color:var(--ink,#20382f)}
.future-receipt-preview-host::backdrop{background:transparent}
body.modal-open{overflow:hidden}
.receipt-view-button{text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.receipt-view-button:hover{filter:brightness(.94)}
.ledger-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.62);
}

.ledger-preview-modal[hidden] {
  display: none;
}

.ledger-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, 96vw);
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: 10px;
  overflow: hidden;
  background: #f8faf9;
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.34);
}

.ledger-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  background: #fff;
}

.ledger-preview-header strong,
.ledger-preview-title-row strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.ledger-preview-header span,
.ledger-preview-title-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.ledger-preview-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.ledger-preview-loading {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: #0f766e;
  font-weight: 850;
}

.ledger-preview-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.ledger-preview-badges {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.ledger-preview-title-row em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 10px;
  background: #e5f7f3;
  color: #0f766e;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.ledger-preview-title-row em.ledger-preview-source-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.ledger-preview-section {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.ledger-preview-section h4 {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  background: #eefaf7;
  color: #0f5f57;
  font-size: 15px;
}

.ledger-preview-section dl {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.ledger-preview-section dt,
.ledger-preview-section dd {
  min-width: 0;
  border-bottom: 1px solid #edf2f1;
  padding: 9px 12px;
  line-height: 1.45;
}

.ledger-preview-section dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ledger-preview-section dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.ledger-preview-section dl dt:last-of-type,
.ledger-preview-section dl dd:last-of-type {
  border-bottom: 0;
}

.ledger-preview-warn {
  color: #b42318 !important;
  font-weight: 850;
}

.ledger-preview-fees {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ledger-preview-fees span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 750;
}

.ledger-preview-photos {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.ledger-preview-photo-group {
  display: grid;
  gap: 8px;
}

.ledger-preview-photo-group strong {
  color: var(--ink);
  font-size: 14px;
}

.ledger-preview-photo-group em {
  color: var(--muted);
  font-style: normal;
}

.ledger-preview-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ledger-preview-thumb {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  padding: 0;
  appearance: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ledger-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ledger-preview-empty {
  color: var(--muted);
  font-size: 13px;
}

.image-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.ledger-preview-image-lightbox-modal {
  z-index: 1600;
}

.image-lightbox-modal[hidden] {
  display: none;
}

.image-lightbox-card {
  width: min(980px, 96vw);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.28);
}

.image-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-lightbox-stage {
  min-height: 220px;
  max-height: 74vh;
  display: grid;
  place-items: center;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
}

.image-lightbox-stage img {
  max-width: 100%;
  max-height: 74vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}


.future-receipt-preview-host .ledger-preview-card{display:flex;flex-direction:column;min-height:0}
.future-receipt-preview-host .ledger-preview-header,.future-receipt-preview-host .future-receipt-choice{flex:0 0 auto}
.future-receipt-preview-host .ledger-preview-body{flex:1 1 auto}
.future-receipt-preview-host .btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font:inherit;cursor:pointer;white-space:nowrap}
.future-receipt-preview-host .button-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.future-receipt-preview-host .future-receipt-choice{padding:10px 16px;background:#fff;border-bottom:1px solid var(--line)}
.future-receipt-preview-host .future-receipt-choice[hidden]{display:none}
.future-receipt-preview-host .future-receipt-error{padding:24px 12px;color:#b42318}
@media(max-width:600px){
 .future-receipt-preview-host .ledger-preview-modal,.future-receipt-preview-host .image-lightbox-modal{padding:8px}
 .future-receipt-preview-host .ledger-preview-card{width:100%;max-height:calc(100dvh - 16px)}
 .future-receipt-preview-host .ledger-preview-header{padding:12px}
 .future-receipt-preview-host .ledger-preview-header span{font-size:12px}
 .future-receipt-preview-host .ledger-preview-section dl{grid-template-columns:95px minmax(0,1fr)}
 .future-receipt-preview-host .ledger-preview-thumb{width:72px;height:72px}
 .future-receipt-preview-host .ledger-preview-title-row{flex-wrap:wrap}
 .future-receipt-preview-host .ledger-preview-body{padding:8px}
 .future-receipt-preview-host .image-lightbox-card{width:100%;max-height:calc(100dvh - 16px)}
}
