/* The receipt shares the storefront's dialog and typography. Scope its layout to this view. */
.hs-dialog.hs-order-view {
  width: min(624px, calc(100% - 32px));
  padding: 24px;
  color: #0f172a;
}
.hs-order-view > header { margin-bottom: 18px; }
.hs-pay-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
}
.hs-pay-summary [data-part="amount-label"] { color: #475569; font-size: 13px; }
.hs-pay-summary strong {
  display: block;
  margin-top: 2px;
  color: #1d4ed8;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.hs-pay-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.hs-pay-badge[data-state="pending"] { color: #92400e; background: #fef3c7; }
.hs-pay-badge[data-state="paid"] { color: #166534; background: #dcfce7; }
.hs-pay-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "details" "actions";
}
.hs-pay-body.hs-with-code {
  grid-template-columns: minmax(0, 1fr) 204px;
  grid-template-areas: "details code" "actions actions";
  column-gap: 24px;
}
.hs-pay-details { grid-area: details; min-width: 0; margin-top: 20px; }
.hs-order-view h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; }
.hs-order-view .hs-pay-product { margin: 7px 0 12px; color: #334155; overflow-wrap: anywhere; }
.hs-pay-costs, .hs-pay-meta { margin: 0; }
.hs-pay-costs > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 5px 0;
}
.hs-pay-costs dt, .hs-pay-meta dt { color: #64748b; font-size: 13px; }
.hs-pay-costs dd { margin: 0; color: #1e293b; font-variant-numeric: tabular-nums; }
.hs-pay-meta { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
.hs-pay-meta > div + div { margin-top: 8px; }
.hs-pay-meta dd {
  margin: 2px 0 0;
  color: #475569;
  font: 13px/1.6 ui-monospace, Consolas, "Microsoft YaHei", monospace;
  overflow-wrap: anywhere;
  user-select: all;
}
.hs-pay-code {
  grid-area: code;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  margin-top: 20px;
}
.hs-qr-frame { padding: 2px; background: white; border: 1px solid #dbe3ee; border-radius: 10px; }
.hs-order-view .hs-qr-frame img {
  display: block;
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
}
.hs-pay-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.hs-pay-actions > * { min-height: 40px; }
.hs-order-view .hs-pay-open { background: #2563eb; border-color: #2563eb; color: #fff; }
.hs-order-view .hs-pay-open:hover { background: #1d4ed8; }
.hs-order-view .hs-status:empty { display: none; }
.hs-order-view .hs-status:not(:empty) { color: #475569; margin-top: 12px; }

@media (max-width: 580px) {
  .hs-dialog.hs-order-view { width: calc(100% - 24px); padding: 16px; max-height: 92dvh; }
  .hs-order-view > header { margin-bottom: 12px; }
  .hs-pay-summary { padding: 10px 14px; }
  .hs-pay-body.hs-with-code {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "code" "actions" "details";
  }
  .hs-pay-code, .hs-pay-details { margin-top: 16px; }
  .hs-pay-actions { flex-wrap: wrap; gap: 8px; }
  .hs-pay-actions > * { flex: 1 1 auto; padding-inline: 10px; }
  .hs-with-code .hs-pay-actions { margin-top: 12px; padding-top: 0; border: 0; }
  .hs-with-code .hs-pay-details { border-top: 1px solid #e2e8f0; padding-top: 12px; }
}

