/* COMMERCIAL-1 W5 (19-10-2026) -- paywall, package/checkout flow, order
   status, invoices and Platformbeheer -> Facturatie. Tokens only (pomio.css),
   so Licht / Donker / Auto follow the theme; mobile first (375 px), no
   horizontal scroll. */

/* ---------------------------------------------------------------- paywall layer */
html.bl-paywall-open, html.bl-paywall-open body { overflow: hidden; }
.bl-paywall {
  position: fixed; inset: 0; z-index: 180; /* above sheet (150) and modals (120); toasts stay on top (200) */
  display: flex; align-items: flex-start; justify-content: center;
  padding: 16px; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--text);
}
.bl-paywall.is-blocked-host { position: fixed; }
.bl-pw-card {
  width: 100%; max-width: 640px; margin: auto 0; box-sizing: border-box;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow);
}
.bl-pw-card.is-flow { max-width: 760px; }
.bl-pw-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.bl-pw-org { font-weight: 600; color: var(--muted); font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.bl-pw-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.bl-pw-tools select { min-height: var(--tap); max-width: 9.5rem; }
.bl-pw-body { padding: 20px 16px 22px; }
.bl-pw-overview { text-align: center; }
.bl-pw-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; background: var(--warning-soft); color: var(--warning-text);
}
.bl-pw-icon svg { width: 28px; height: 28px; }
#bl-pw-title { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.01em; margin: 0 0 8px; }
#bl-pw-title:focus { outline: none; }
#bl-pw-desc { margin: 0 auto 14px; max-width: 34rem; color: var(--muted); font-size: 15px; line-height: 1.5; }
.bl-pw-count {
  display: inline-block; margin: 4px 0 10px; padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--warning-soft); color: var(--warning-text); font-weight: 700; font-size: 17px;
}
.bl-pw-count.is-urgent { background: var(--danger-soft); color: var(--danger-text); }
.bl-pw-facts { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; color: var(--text); line-height: 1.5; }
.bl-pw-facts li + li { margin-top: 2px; }
.bl-pw-sub { font-size: 14px; margin: 18px 0 8px; color: var(--muted); font-weight: 600; }
.bl-pw-plans { list-style: none; margin: 0 auto 14px; padding: 0; max-width: 30rem; text-align: left; }
.bl-pw-plans li {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-control); margin-bottom: 6px;
}
.bl-pw-plan { font-weight: 700; }
.bl-pw-price { color: var(--muted); font-size: 14px; }
.bl-pw-actions { justify-content: center; }
.bl-pw-cta { min-height: var(--tap-primary); padding: 0 22px; font-size: 15px; }
.bl-pw-ask { margin: 8px 0 0; font-weight: 600; }
.bl-pw-safe { margin: 14px 0 0; }
.bl-pw-hide { margin-top: 12px; font-size: 13px; }

/* ---------------------------------------------------------------- shared */
.bl-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.bl-actions button, .bl-actions a { white-space: normal; text-align: center; }
.bl-notice {
  margin: 12px 0; padding: 10px 12px; border-radius: var(--radius-control); text-align: left;
  background: var(--trust-soft); color: var(--text); border: 1px solid var(--border);
}
.bl-notice p { margin: 0 0 6px; font-size: 14px; color: var(--text); }
.bl-notice p:last-child { margin-bottom: 0; }
.bl-notice.is-danger { background: var(--danger-soft); }
.bl-notice.is-warn { background: var(--warning-soft); }
.bl-field-error { margin: 6px 0 0; color: var(--danger-text); font-size: 13px; font-weight: 600; }
.bl-error:focus, .bl-heading:focus, [data-bl-vatbox]:focus { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.bl-note { margin: 8px 0; padding: 8px 10px; border-radius: var(--radius-control); background: var(--warning-soft); color: var(--text); font-size: 14px; }
.bl-check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: 14px; line-height: 1.45; cursor: pointer; }
.bl-check input { flex: none; margin-top: 2px; width: 18px; height: 18px; }
.bl-check a { color: var(--accent-text); font-weight: 600; }

/* ---------------------------------------------------------------- flow */
.bl-flow { min-width: 0; }
.bl-heading { font-family: var(--font-display); font-size: 19px; margin: 4px 0 8px; }
.bl-steps { list-style: none; display: flex; gap: 6px; margin: 0 0 14px; padding: 0; flex-wrap: wrap; }
.bl-steps li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bl-steps li + li::before { content: ''; width: 14px; height: 1px; background: var(--border-strong); margin-right: 2px; }
.bl-step-n {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); font-size: 12px; font-weight: 700;
}
.bl-steps li.is-current { color: var(--text); font-weight: 700; }
.bl-steps li.is-current .bl-step-n { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bl-steps li.is-done .bl-step-n { background: var(--success-soft); border-color: transparent; color: var(--success-text); }
.bl-flow fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.bl-flow legend { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding: 0; }
.bl-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-button); overflow: hidden; max-width: 100%; }
.bl-seg-opt { position: relative; display: inline-flex; }
.bl-seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bl-seg-opt span { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px; font-weight: 600; font-size: 14px; }
.bl-seg-opt + .bl-seg-opt span { border-left: 1px solid var(--border-strong); }
.bl-seg-opt input:checked + span { background: var(--accent); color: var(--accent-ink); }
.bl-seg-opt input:focus-visible + span { outline: 2px solid var(--focus-edge, var(--accent-text)); outline-offset: -3px; box-shadow: inset 0 0 0 3px var(--accent-soft); }
.bl-plan-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .bl-plan-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.bl-plan {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 12px 40px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-card); background: var(--surface); cursor: pointer; min-width: 0;
}
.bl-plan input { position: absolute; left: 12px; top: 14px; width: 18px; height: 18px; margin: 0; }
.bl-plan.is-selected { border-color: var(--accent-text); box-shadow: 0 0 0 2px var(--accent-soft); }
.bl-plan.is-disabled { opacity: .55; cursor: not-allowed; }
.bl-plan-name { font-weight: 700; overflow-wrap: anywhere; }
.bl-plan-price { font-size: 14px; color: var(--text); }
.bl-plan-note { font-size: 12px; }
.bl-seats input { max-width: 10rem; }
.bl-quote { margin: 14px 0 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface-2, var(--bg)); }
.bl-quote h4 { margin: 0 0 8px; font-size: 14px; }
.bl-quote-table { width: 100%; border-collapse: collapse; font-size: 14px; background: transparent; border: 0; border-radius: 0; overflow: visible; }
.bl-quote-table th, .bl-quote-table td { background: transparent; border: 0; color: var(--text); font-size: 14px; text-transform: none; letter-spacing: 0; }
.bl-quote-table th { text-align: left; font-weight: 500; padding: 6px 8px 6px 0; vertical-align: top; }
.bl-quote-table th .hint { display: block; font-size: 12px; margin: 2px 0 0; }
.bl-quote-table td { text-align: right; padding: 6px 0; white-space: nowrap; vertical-align: top; font-variant-numeric: tabular-nums; }
.bl-quote-table tfoot tr:first-child th, .bl-quote-table tfoot tr:first-child td { border-top: 1px solid var(--border); }
.bl-quote-table .bl-total th, .bl-quote-table .bl-total td { font-weight: 800; font-size: 16px; border-top: 1px solid var(--border-strong); }
.bl-quote .hint { margin: 8px 0 0; }
.bl-vat { margin: 14px 0; padding: 10px 12px; border-radius: var(--radius-control); border: 1px solid var(--border); background: var(--surface); }
.bl-vat-title { margin: 0 0 4px; font-weight: 700; }
.bl-vat .hint { margin: 0 0 6px; }
.bl-vat-unsupported, .bl-vat-unknown { background: var(--warning-soft); }
.bl-pf-grid { display: grid; grid-template-columns: 1fr; column-gap: 12px; }
@media (min-width: 640px) {
  .bl-pf-grid { grid-template-columns: 1fr 1fr; }
  .bl-pf-legalName, .bl-pf-line1 { grid-column: 1 / -1; }
}
.bl-pf-grid .field { min-width: 0; }
.bl-summary { margin: 0 0 12px; }
.bl-summary dd .hint { display: block; }
.bl-summary dd .btn-link { margin-top: 4px; font-size: 13px; }
.bl-accept { margin-top: 14px; }
.bl-pay-note { margin: 10px 0 0; }

/* ---------------------------------------------------------------- order status */
.bl-status { text-align: center; padding: 8px 0; }
.bl-status-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center;
  background: var(--trust-soft); color: var(--trust-text);
}
.bl-status-icon svg { width: 28px; height: 28px; }
.bl-status-icon .boot-spinner { width: 24px; height: 24px; }
.bl-status-active .bl-status-icon, .bl-status-paid .bl-status-icon { background: var(--success-soft); color: var(--success-text); }
.bl-status-failed .bl-status-icon, .bl-status-review .bl-status-icon { background: var(--danger-soft); color: var(--danger-text); }
.bl-status-expired .bl-status-icon, .bl-status-cancelled .bl-status-icon { background: var(--warning-soft); color: var(--warning-text); }
.bl-status p { margin: 0 auto 10px; max-width: 32rem; line-height: 1.5; }
.bl-status .bl-actions { justify-content: center; }
.bl-proof-note { font-size: 12px; }

/* ---------------------------------------------------------------- trial dialog */
.bl-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box; }
.bl-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.bl-dlg-head h2 { margin: 0; }
.bl-dlg-close { width: var(--tap); padding: 0; justify-content: center; }
.bl-dlg-close svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- invoices (Settings) */
.bl-inv-card .cm-table-wrap { margin: 0; }
.bl-lc-cta { margin-bottom: 4px; }
.lc-cta-secondary { border-top: 1px dashed var(--border); padding-top: 10px; }

/* ---------------------------------------------------------------- Platformbeheer -> Facturatie */
.bla-history li { align-items: baseline; }
.bla-settings { max-width: 40rem; }
.bla-settings .bl-check { margin: 4px 0; }
.bla-settings fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.bla-settings legend { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; padding: 0; }
.bla-settings input[type=number] { max-width: 10rem; }

@media (max-width: 767px) {
  .bl-paywall { padding: 0; }
  .bl-pw-card { border-radius: 0; border-left: 0; border-right: 0; min-height: 100%; }
  .bl-pw-body { padding: 18px 16px 24px; }
  #bl-pw-title { font-size: 20px; }
  .bl-actions > .btn-primary, .bl-actions > .btn-ghost { flex: 1 1 100%; min-height: var(--tap-primary); }
  .bl-seg { display: flex; width: 100%; }
  .bl-seg-opt { flex: 1 1 0; }
  .bl-seg-opt span { width: 100%; justify-content: center; padding: 0 8px; }
  .bl-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0; border-radius: 0; }
  .bl-quote-table td { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-status-icon .boot-spinner { animation: none; }
}

/* COMMERCIAL-1 W7: Platformbeheer -> Facturatie, "Afwijking afhandelen" (apply / cancel) */
.bla-radio { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-weight: 400; }
/* W7: the DEV / STAGING fake checkout */
.bl-fake-checkout .bl-fake-amount { font-size: 18px; font-weight: 700; margin: 8px 0 12px; }
