/* ==========================================================================
   COMPONENTS · ORDER SUMMARY — the review-before-buy panel (checkout / cart),
   reused for receipts and invoices. A leaf ledger: ruled lines with a serif
   description left and a mono amount right, a stronger-ruled Total, and a
   solid-ink "Place order" CTA. Every figure is mono, tabular. A discount reads
   as an ochre-decoupled positive credit with a printed minus — never the rubric.
   ========================================================================== */

.op-order {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-raised);
  padding: var(--pad-card);
}

/* Any inline figure inside the panel is set in the data face, tabular */
.op-order [data-numeric] {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums lining-nums;
}

/* — Head: an editorial kicker, with an optional mono item count — */
.op-order__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
}
.op-order__count {
  font-family: var(--font-data);
  font-size: var(--text-2xs);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-muted);
}

/* — The ruled line list — */
.op-order__lines { margin: 0; }

.op-order__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-xs);
  border-top: 1px solid var(--rule-faint);
}
.op-order__line:first-child { border-top: 0; }

.op-order__desc {
  margin: 0;
  font-family: var(--font-reading);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--text);
}
.op-order__detail {
  display: block;
  margin-top: var(--space-3xs);
  font-family: var(--font-furniture);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  color: var(--text-muted);
}

.op-order__amount {
  margin: 0;
  font-family: var(--font-data);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text);
  white-space: nowrap;
}

/* — A credit: positive ink + a printed minus (the non-hue cue), not the rubric — */
.op-order__line--discount .op-order__amount { color: var(--positive); }
.op-order__line--discount .op-order__desc { color: var(--text-secondary); }

/* — The Total: a stronger ledger rule, a furniture label, a big mono figure — */
.op-order__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-xs);
  padding-top: var(--space-sm);
  border-top: 2px solid var(--rule-strong);
}
.op-order__total-label {
  font-family: var(--font-furniture);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text);
}
.op-order__total-amount {
  font-family: var(--font-data);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text);
}
.op-order__tax {
  margin: var(--space-3xs) 0 0;
  font-family: var(--font-furniture);
  font-size: var(--text-2xs);
  color: var(--text-muted);
  text-align: right;
}

/* — Trust microcopy — */
.op-order__note {
  margin: var(--space-sm) 0 0;
  font-family: var(--font-furniture);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

/* — The primary action — */
.op-order__cta { margin-top: var(--space-md); }

/* — Receipt / invoice: a flat printed slip, no lift — */
.op-order--receipt { box-shadow: none; background: var(--surface); }
