/* ============================================================================
   B2B Order Received ("thank you") — matches the cart's design language.
   Scoped to .b2b-oc so the theme can't bleed in. Reuses cart tokens/components.
   ============================================================================ */

.b2b-oc {
  --b2b-blue: #2f6bff;
  --b2b-blue-dark: #1d4ed8;
  --b2b-accent: #e11d74;      /* signature pink for prices/totals */
  --b2b-ink: #1a1f36;
  --b2b-muted: #8a93a6;
  --b2b-line: #e8eaf0;
  --b2b-bg: #f4f6fa;
  --b2b-green: #0aa06e;
  --b2b-card-radius: 14px;
  --b2b-shadow: 0 1px 3px rgba(20,23,40,.04), 0 6px 20px rgba(20,23,40,.05);

  max-width: 880px;
  margin: 0 auto;
  padding: 28px 16px 56px;
  color: var(--b2b-ink);
  font-size: 14px;
  line-height: 1.55;
  box-sizing: border-box;
}
.b2b-oc *, .b2b-oc *::before, .b2b-oc *::after { box-sizing: border-box; }

/* Cards (mirrors .b2b-card) */
.b2b-oc .b2b-card {
  background: #fff;
  border: 1px solid var(--b2b-line);
  border-radius: var(--b2b-card-radius);
  padding: 20px 22px;
  margin-bottom: 22px;
  box-shadow: var(--b2b-shadow);
}

/* ── Steps header (reused component; ensure it reads well on this page) ────── */
.b2b-oc .b2b-steps { margin-bottom: 26px; }

/* ── Success hero ─────────────────────────────────────────────────────────── */
.b2b-oc-hero { text-align: center; padding: 8px 0 26px; }
.b2b-oc-hero__icon {
  width: 62px; height: 62px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: var(--b2b-green);
  box-shadow: 0 8px 22px rgba(10,160,110,.28);
  margin-bottom: 14px;
}
.b2b-oc-hero--failed .b2b-oc-hero__icon { background: var(--b2b-accent); box-shadow: 0 8px 22px rgba(225,29,116,.26); }
.b2b-oc-hero__title { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 8px; text-wrap: balance; }
.b2b-oc-hero__sub { font-size: 15px; color: var(--b2b-muted); max-width: 46ch; margin: 0 auto; }
.b2b-oc-hero__actions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ── What happens next (3 steps) ──────────────────────────────────────────── */
.b2b-oc-next {
  list-style: none; margin: 40px 0 22px; padding: 22px 24px;
  background: #fff; border: 1px solid var(--b2b-line); border-radius: var(--b2b-card-radius);
  box-shadow: var(--b2b-shadow);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.b2b-oc-next__step { display: flex; gap: 12px; align-items: flex-start; }
.b2b-oc-next__num {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--b2b-blue); color: #fff; font-size: 13px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.b2b-oc-next__body { font-size: 13px; color: var(--b2b-muted); line-height: 1.5; }
.b2b-oc-next__body strong { display: block; color: var(--b2b-ink); font-size: 13.5px; font-weight: 700; margin-bottom: 2px; }
@media (max-width: 640px) {
  .b2b-oc-next { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Support reassurance line ─────────────────────────────────────────────── */
.b2b-oc-support {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: -6px 0 22px; padding: 12px 16px;
  font-size: 13px; color: var(--b2b-muted); text-align: center;
}
.b2b-oc-support__icon { color: var(--b2b-blue); display: inline-flex; }
.b2b-oc-support a { color: var(--b2b-blue); font-weight: 700; text-decoration: none; }
.b2b-oc-support a:hover { text-decoration: underline; }

/* ── Key facts strip ──────────────────────────────────────────────────────── */
.b2b-oc-facts {
  display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: flex-end;
}
.b2b-oc-fact { display: flex; flex-direction: column; gap: 3px; }
.b2b-oc-fact__k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--b2b-muted); }
.b2b-oc-fact__v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.b2b-oc-fact--total { margin-left: auto; text-align: right; }
.b2b-oc-total { color: var(--b2b-accent); font-size: 20px; font-weight: 800; }
.b2b-oc-total .woocommerce-Price-amount { color: var(--b2b-accent); }

/* ── WooCommerce order-details table, restyled to match ───────────────────── */
.b2b-oc .woocommerce-order-details,
.b2b-oc .woocommerce-customer-details {
  background: #fff;
  border: 1px solid var(--b2b-line);
  border-radius: var(--b2b-card-radius);
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: var(--b2b-shadow);
}
.b2b-oc .woocommerce-order-details__title,
.b2b-oc .woocommerce-column__title,
.b2b-oc section > h2 {
  font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
  margin: 0 0 14px; color: var(--b2b-ink);
}
.b2b-oc table.woocommerce-table--order-details,
.b2b-oc table.order_details,
.b2b-oc table.shop_table {
  width: 100%; border-collapse: collapse; margin: 0; border: 0;
}
.b2b-oc table.shop_table thead th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--b2b-muted);
  padding: 0 0 10px; border-bottom: 1px solid var(--b2b-line);
}
.b2b-oc table.shop_table thead th.woocommerce-table__product-total,
.b2b-oc table.shop_table tfoot td { text-align: right; }
.b2b-oc table.shop_table tbody td {
  padding: 14px 0; border-bottom: 1px solid var(--b2b-line);
  vertical-align: top; color: var(--b2b-ink);
}
.b2b-oc table.shop_table tbody td.woocommerce-table__product-total { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.b2b-oc td.woocommerce-table__product-name .wc-item-meta,
.b2b-oc td.product-name .wc-item-meta { margin: 6px 0 0; padding: 0; list-style: none; }
.b2b-oc .woocommerce-table__product-name a,
.b2b-oc .product-name a { color: var(--b2b-ink); font-weight: 700; text-decoration: none; }
.b2b-oc .product-quantity, .b2b-oc .woocommerce-table__product-quantity { color: var(--b2b-muted); font-weight: 600; }

/* Totals rows. WC renders three UNCLASSED tfoot rows in order: Subtotal, Total,
   Payment method. Style them by position (no classes exist to target). */
.b2b-oc table.shop_table tfoot th { text-align: left; font-weight: 700; padding: 12px 0; color: var(--b2b-ink); border: 0; }
.b2b-oc table.shop_table tfoot td { text-align: right; padding: 12px 0; font-weight: 700; border: 0; font-variant-numeric: tabular-nums; }
/* Accent (pink) + emphasis reserved for the TOTAL row = 2nd-from-last tfoot row
   (Subtotal, [Total], Payment method). Never the payment-method row. */
.b2b-oc table.shop_table tfoot tr:nth-last-child(2) th,
.b2b-oc table.shop_table tfoot tr:nth-last-child(2) td { font-size: 17px; color: var(--b2b-accent); border-top: 2px solid var(--b2b-line); }
/* Payment-method row (last): plain ink label, not a price. */
.b2b-oc table.shop_table tfoot tr:last-child th,
.b2b-oc table.shop_table tfoot tr:last-child td { color: var(--b2b-ink); font-weight: 600; font-size: 14px; }

/* ── Per-item Blank/Customized badge + placement summary ──────────────────── */
.b2b-oc-cust { margin: 6px 0 2px; }
.b2b-oc-cust__badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 4px;
}
.b2b-oc-cust__badge--blank { background: #f0f0f1; color: #50575e; }
.b2b-oc-cust__badge--custom { background: #e7f0ff; color: #1a56db; }
.b2b-oc-cust__list {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.b2b-oc-cust__list li {
  font-size: 12px; color: var(--b2b-ink); background: var(--b2b-bg);
  border: 1px solid var(--b2b-line); border-radius: 6px; padding: 4px 10px;
}

/* ── Injected colour×size matrix (Cart::render_order_item_matrix) ─────────── */
.b2b-oc table.b2b-order-matrix {
  margin-top: 10px !important; border-collapse: collapse; width: auto;
  font-size: 12.5px !important; background: var(--b2b-bg); border-radius: 8px; overflow: hidden;
}
.b2b-oc table.b2b-order-matrix th {
  background: transparent; color: var(--b2b-muted); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px 6px !important; text-align: center;
}
.b2b-oc table.b2b-order-matrix th:first-child { text-align: left; }
.b2b-oc table.b2b-order-matrix td {
  padding: 5px 10px !important; text-align: center; color: var(--b2b-ink);
  font-variant-numeric: tabular-nums; border-top: 1px solid var(--b2b-line);
}
.b2b-oc table.b2b-order-matrix td:first-child { text-align: left; font-weight: 600; }
.b2b-oc table.b2b-order-matrix tr td:last-child,
.b2b-oc table.b2b-order-matrix tr th:last-child { font-weight: 800; }

/* ── Address blocks ───────────────────────────────────────────────────────── */
.b2b-oc .woocommerce-customer-details address {
  font-style: normal; color: var(--b2b-ink); line-height: 1.7; border: 0; padding: 0;
}
.b2b-oc .woocommerce-columns--addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

/* ── Buttons (mirror cart .b2b-btn) ───────────────────────────────────────── */
.b2b-oc .b2b-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; padding: 13px 22px; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: filter .15s ease, background .15s ease; width: auto;
}
.b2b-oc .b2b-btn--primary { background: var(--b2b-blue); color: #fff; }
.b2b-oc .b2b-btn--primary:hover { background: var(--b2b-blue-dark); }
.b2b-oc .b2b-btn--ghost { background: #fff; color: var(--b2b-ink); border: 1px solid var(--b2b-line); }
.b2b-oc .b2b-btn--ghost:hover { filter: brightness(0.98); }
.b2b-oc .b2b-btn:focus-visible { outline: 2px solid var(--b2b-blue); outline-offset: 2px; }
.b2b-oc-actions { display: flex; gap: 12px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }

/* Hide WooCommerce's own plain order-overview list (we render the facts strip). */
.b2b-oc ul.woocommerce-order-overview.order_details { display: none; }

/* ── Mobile ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .b2b-oc-hero__title { font-size: 22px; }
  .b2b-oc-facts { gap: 14px 20px; }
  .b2b-oc-fact--total { margin-left: 0; width: 100%; text-align: left; }
  .b2b-oc table.shop_table tbody td { padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .b2b-oc .b2b-btn { transition: none; }
}

/* ── Contact form (shares .b2b-oc tokens) ─────────────────────────────────── */
.b2b-contact { max-width: 620px; }
.b2b-contact__title { font-size: 22px; font-weight: 800; margin: 0 0 6px; color: var(--b2b-ink); }
.b2b-contact__intro { color: var(--b2b-muted); font-size: 14px; margin: 0 0 18px; }
.b2b-contact__form { display: flex; flex-direction: column; gap: 14px; }
.b2b-contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.b2b-contact__field { display: flex; flex-direction: column; gap: 5px; }
.b2b-contact__field > span { font-size: 12px; font-weight: 700; color: var(--b2b-ink); }
.b2b-contact__field input,
.b2b-contact__field textarea {
  font: inherit; font-size: 14px; padding: 10px 12px; color: var(--b2b-ink);
  border: 1px solid var(--b2b-line); border-radius: 8px; background: #fff; width: 100%;
}
.b2b-contact__field input:focus,
.b2b-contact__field textarea:focus { outline: 2px solid var(--b2b-blue); outline-offset: 1px; border-color: var(--b2b-blue); }
.b2b-contact__field textarea { resize: vertical; min-height: 120px; }
.b2b-contact__submit { width: auto; align-self: flex-start; margin-top: 4px; }
.b2b-contact__msg { font-size: 13.5px; margin: 6px 0 0; }
.b2b-contact__msg.is-ok { color: var(--b2b-green); font-weight: 600; }
.b2b-contact__msg.is-error { color: #d63638; }
/* Honeypot: visually + programmatically hidden from humans */
.b2b-contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) { .b2b-contact__row { grid-template-columns: 1fr; } }
