/* Receipts popup. The only place popup styling lives — the demo harness links this file too. */
.rcpt {
  --ink: #1d2433;
  --muted: #6b7180;
  --paper: #fbfaf6;
  --rule: #d9d5c8;
  --found: #1f7a4d;
  --partial: #b7791f;
  --conflict: #c0392b;
  --missing: #8a8f98;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  width: 380px;
  box-sizing: border-box;
  padding: 16px 16px 12px;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.rcpt *, .rcpt *::before, .rcpt *::after { box-sizing: border-box; }
.rcpt-body { margin: 0; }

.rcpt-head { display: flex; align-items: center; gap: 8px; }
.rcpt-head h1 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
/* A torn-receipt edge as the mark */
.rcpt-mark {
  width: 16px; height: 20px; background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 85%, 83% 100%, 67% 85%, 50% 100%, 33% 85%, 17% 100%, 0 85%);
}
.rcpt-plan {
  margin-left: auto; font: 600 10px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 4px 6px;
}

.rcpt-query {
  margin: 10px 0 12px; padding-bottom: 12px; color: var(--muted); font-size: 13px;
  border-bottom: 1px dashed var(--rule);
}
.rcpt-query b { color: var(--ink); font-weight: 600; }

.rcpt-btn {
  width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--ink); color: #fff; font: 600 14px/1.2 inherit; font-family: inherit;
}
.rcpt-btn:hover:not(:disabled) { background: #2c3650; }
.rcpt-btn:disabled { opacity: 0.45; cursor: default; }
.rcpt-btn:focus-visible, .rcpt-link:focus-visible, .rcpt-claim summary:focus-visible {
  outline: 2px solid var(--partial); outline-offset: 2px;
}
.rcpt-status { min-height: 1.2em; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.rcpt-status.rcpt-error { color: var(--conflict); }

.rcpt-summary { margin-top: 6px; }
.rcpt-tally { margin: 0 0 8px; font-size: 13px; }
.rcpt-tally strong { font: 700 22px/1 var(--mono); }
.rcpt-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--rule); }
.rcpt-bar span { display: block; height: 100%; }
.rcpt-legend { margin: 6px 0 0; font: 11px/1.4 var(--mono); color: var(--muted); }

.rcpt-claims { list-style: none; margin: 12px 0 0; padding: 0; max-height: 300px; overflow-y: auto; }
.rcpt-claim { border-top: 1px dashed var(--rule); }
.rcpt-claim summary {
  display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: start;
  padding: 8px 0; cursor: pointer; list-style: none; font-size: 13px;
}
.rcpt-claim summary::-webkit-details-marker { display: none; }
.rcpt-pill {
  font: 700 10px/18px var(--mono); text-transform: uppercase; letter-spacing: 0.04em;
  text-align: center; border-radius: 3px; color: #fff;
}
.rcpt-pill-found { background: var(--found); }
.rcpt-pill-partial { background: var(--partial); }
.rcpt-pill-conflict { background: var(--conflict); }
.rcpt-pill-missing, .rcpt-pill-unreachable { background: var(--missing); }
.rcpt-evidence { margin: 0 0 10px 80px; font-size: 12px; color: var(--muted); }
.rcpt-evidence blockquote {
  margin: 4px 0 0; padding: 6px 8px; background: #fff; border-left: 3px solid var(--rule);
  color: var(--ink); font-style: italic;
}
.rcpt-evidence .rcpt-diff { color: var(--conflict); font-style: normal; font-weight: 600; }

.rcpt-foot {
  display: flex; justify-content: space-between; align-items: center; margin-top: 12px;
  padding-top: 10px; border-top: 1px dashed var(--rule); font: 11px/1.3 var(--mono); color: var(--muted);
}
.rcpt-link {
  border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink);
  font: 600 12px/1 inherit; font-family: inherit; text-decoration: underline;
}
