/* Order details and final payment review share the existing BTI form language. */
.order-flow .order-entry-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
/* F1P-81: a neighbour's help line grows its own cell; every control keeps its height and the rows line up. */
.order-flow .order-entry-fields .shadow-order-field { min-width: 0; gap: 8px; align-content: start; }
.order-flow .order-entry-fields small:not(.shadow-order-field-error) { color: var(--fg-2); font-size: 13px; font-weight: 400; line-height: 1.5; }
.order-flow .order-entry-fields select:disabled { opacity: 1; color: var(--fg-2); background: var(--bg-sunken); }
.order-flow .order-entry-catalog-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.order-flow .order-entry-catalog-status p { margin: 0; font-size: 13px; color: var(--fg-2); }
.order-flow .order-entry-catalog-status [data-tone="error"] { color: var(--error); }
.order-flow .order-checkout-readiness,
.order-flow .order-checkout-plan-hold,
.order-flow .order-channel-change-notice { padding: 12px 16px; border-left: 3px solid var(--warning); background: var(--bg-sunken); color: var(--fg-1); font-size: 15px; line-height: 1.5; }
/* F1P-78: what a sales-channel change updated; the warning accent stays while the order can't continue on the channel. */
.order-flow .order-channel-change-notice { margin: 0; overflow-wrap: anywhere; }
.order-flow .order-channel-change-notice[data-tone="info"] { border-left-color: var(--success); }
.order-flow .order-entry-sales .order-channel-change-notice { margin-top: 16px; }
.order-flow .order-entry-catalog-status [hidden],
.order-flow .order-checkout-readiness[hidden],
.order-flow .order-checkout-plan-hold[hidden],
.order-flow .order-channel-change-notice[hidden] { display: none; }
.order-checkout-facts { display: grid; gap: 10px; margin: 0; }
.order-checkout-facts > div { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 1.25fr); gap: 12px; }
.order-checkout-facts dt { color: var(--fg-2); font-size: 14px; font-weight: 400; }
.order-checkout-facts dd { margin: 0; color: var(--fg-1); font-size: 15px; overflow-wrap: anywhere; }
.order-flow .order-checkout-address { margin: 0; white-space: pre-line; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.order-flow [data-order-review-agreement] { font-size: 15px; line-height: 1.5; }
.order-flow .order-review {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
.order-review > * { grid-column: 1 / -1; min-width: 0; }
.order-review > .shadow-order-section-heading { margin: 0; padding-bottom: 20px; border-bottom: 1px solid var(--stroke-2); }
.order-review .order-review-overview { gap: 24px 32px; padding: 0; border: 0; }
.order-review .order-review-fact { gap: 12px; }
.order-review .order-review-fact > header { align-items: baseline; }
.order-review .order-review-fact h3,
.order-review .shadow-order-subsection-heading h3 { font-size: 18px; line-height: 1.3; letter-spacing: 0; }
.order-review .order-review-fact > header .button { min-height: 36px; padding: 6px 0 6px 8px; }
.order-review .order-summary-customer strong { font-size: 18px; }
.order-review .order-review-payment { font-size: 16px; line-height: 1.5; }
.order-review .order-review-payment-terms { gap: 12px 20px; margin-top: 12px; }
.order-review .order-review-payment-terms dd { font-size: 15px; }
.order-review .order-review-programs { gap: 0; }
.order-review .order-review-programs > header { padding-bottom: 8px; border-bottom: 1px solid var(--stroke-2); }
.order-review .order-review-programs .order-summary-line { gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--stroke-1); }
.order-review .order-review-programs .order-summary-line > span { min-width: 0; }
.order-review .order-review-programs .order-summary-line strong { font-size: 16px; line-height: 1.4; }
.order-review .order-review-programs .order-summary-line > strong { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.order-review .order-review-programs .order-summary-line small { color: var(--fg-2); font-weight: 400; }
.order-review .order-review-line-details { margin-top: 4px; font-size: 13px; line-height: 1.5; }
.order-review .order-review-totals {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(160px, 1.25fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin-top: 16px;
  background: transparent;
  border-radius: 0;
}
.order-review .order-review-totals > div { min-width: 0; padding: 16px 16px 16px 0; align-content: start; }
.order-review .order-review-totals dt { font-size: 13px; margin-bottom: 6px; }
.order-review .order-review-totals dd { font-size: 20px; overflow-wrap: anywhere; }
.order-review .order-review-totals .emphasis { order: 1; align-content: center; padding: 14px 18px; border-top: 3px solid var(--gold-500); background: var(--bg-sunken); border-radius: 0 0 6px 6px; }
.order-review .order-review-totals .emphasis dt { color: var(--fg-1); font-weight: 700; }
.order-review .order-review-totals .emphasis dd { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; }
.order-review .order-review-warnings { border: 0; border-left: 3px solid var(--warning); border-radius: 0; padding: 10px 14px; }
.order-review .order-review-support { grid-column: span 7; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 0; border: 0; }
.order-flow .order-review-support > .shadow-order-subsection { gap: 14px; }
.order-flow .order-review-support > .shadow-order-subsection + .shadow-order-subsection { padding-top: 24px; border-top: 1px solid var(--stroke-1); }
.order-review .order-review-support .shadow-agreement-card { gap: 12px; }
.order-review .order-review-support .shadow-agreement-heading { flex-wrap: wrap; }
.order-review .order-review-support .shadow-agreement-heading > div { flex: 1 1 150px; min-width: 0; }
.order-review .order-review-support .shadow-agreement-heading h4 { font-size: 16px; line-height: 1.4; }
.order-review .order-review-support .shadow-agreement-heading .pill { white-space: normal; }
.order-review .order-flow-help { font-size: 13px; line-height: 1.5; }
.order-review .order-review-support .order-flow-action-row { margin-top: 0; }
.order-review .order-review-support > .shadow-order-commissions-group > .shadow-order-commission-grid { grid-template-columns: minmax(0, 1fr); max-width: none; }
.order-review .order-review-support > .shadow-order-commissions-group > .button { min-height: 36px; margin-top: -4px; }
.order-flow .order-review-details { grid-column: span 5; align-content: start; gap: 16px; padding: 0 0 0 28px; border: 0; border-left: 1px solid var(--stroke-1); }
.order-review .order-review-details .shadow-order-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.order-review .order-review-details .shadow-order-meta-grid > :last-child { grid-column: 1 / -1; }
.order-review .order-review-details textarea { min-height: 100px; }
.order-review .order-review-actions { margin: 0; padding-top: 20px; border-color: var(--stroke-2); }
.order-review .order-review-actions .order-flow-boundary { max-width: 520px; font-size: 13px; line-height: 1.5; }
.order-review .order-review-actions .button { min-height: 44px; }
.order-review .order-review-actions .primary { min-width: 150px; }

@container order-review (max-width: 820px) {
  .order-review .order-review-support,
  .order-flow .order-review-details { grid-column: 1 / -1; }
  .order-flow .order-review-details { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--stroke-1); }
  .order-review .order-review-details .shadow-order-meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-review .order-review-details .shadow-order-meta-grid > :last-child { grid-column: auto; }
}
@container order-review (max-width: 600px) {
  .order-flow .order-entry-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .order-review .order-review-overview { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .order-review .order-review-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .order-review .order-review-totals > div { padding-block: 12px; }
  .order-review .order-review-totals .emphasis { order: 1; padding: 12px; }
  .order-review .order-review-totals .emphasis dd { font-size: 26px; }
  .order-review .order-review-details .shadow-order-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-review .order-review-details .shadow-order-meta-grid > :last-child { grid-column: 1 / -1; }
  .order-review .order-review-actions .order-flow-boundary { flex-basis: 100%; max-width: none; }
}
@container order-review (max-width: 380px) {
  .order-review .order-review-details .shadow-order-meta-grid { grid-template-columns: minmax(0, 1fr); }
  .order-review .order-review-programs .order-summary-line { gap: 12px; }
  .order-review .order-review-actions .primary { flex: 1; min-width: 0; }
}

/* Program Expert: searchable staff identity, with the original select retained as fallback. */
.order-review .order-expert-picker { position: relative; gap: 6px; min-width: 0; }
.order-review .order-expert-picker > label { font-weight: 700; }
.order-review .order-expert-control { display: flex; align-items: center; gap: 4px; border: 1px solid var(--stroke-2); border-radius: 8px; padding: 0 6px 0 12px; background: var(--bg-surface); }
.order-review .order-expert-control[hidden],
.order-review .order-expert-picker [hidden] { display: none; }
.order-review .order-expert-control:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.order-review .order-expert-control > .ui-icon { flex: 0 0 16px; color: var(--fg-2); }
.order-review .order-expert-control input { flex: 1 1 auto; min-width: 0; width: 100%; border: 0; box-shadow: none; background: transparent; min-height: 44px; padding: 10px 6px; font-size: 15px; outline: none; }
.order-review .order-expert-control input:focus-visible { outline: none; box-shadow: none; }
.order-review .order-expert-control .icon-button { flex: 0 0 32px; width: 32px; min-width: 32px; height: 36px; min-height: 36px; padding: 8px; border: 0; background: transparent; }
.order-review .order-expert-options { position: absolute; top: 76px; left: 0; right: 0; z-index: 30; max-height: 260px; overflow-y: auto; overscroll-behavior: contain; background: var(--bg-surface); border: 1px solid var(--stroke-2); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / 16%); padding: 4px; }
.order-review .order-expert-options [role="option"] { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; min-height: 44px; border-radius: 5px; cursor: pointer; overflow-wrap: anywhere; }
.order-review .order-expert-options [role="option"] strong { font-size: 15px; font-weight: 700; }
.order-review .order-expert-options [role="option"] span { color: var(--fg-2); font-size: 13px; line-height: 1.3; text-transform: none; letter-spacing: 0; font-weight: 400; }
.order-review .order-expert-options [role="option"]:hover,
.order-review .order-expert-options [aria-selected="true"] { background: var(--bg-row-hover); outline: 1px solid var(--accent); outline-offset: -1px; }
.order-review .order-expert-options p { margin: 0; padding: 12px; color: var(--fg-2); }
.order-review .order-expert-picker > small { font-size: 13px; overflow-wrap: anywhere; }

/* Contributors retain role context after the dialog is closed. */
/* F1P-31 Sales credit: one Sales team choice, the pickers it allows, and read-only rule-driven credit. */
.order-flow .shadow-order-commissions-group > .shadow-order-commission-grid[data-order-sales-credit-pickers] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 940px; }
.order-review .order-sales-credit-note { max-width: 62ch; }
.order-review .order-automatic-credit { display: grid; gap: 10px; max-width: 940px; padding: 16px 18px; border: 1px solid var(--stroke-1); border-radius: 12px; background: color-mix(in oklab, var(--fg-1) 3%, var(--bg-surface)); }
.order-review .order-automatic-credit h4 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--fg-1); font-size: 15px; font-weight: 700; }
.order-review .order-automatic-credit h4 .ui-icon { color: var(--fg-2); }
.order-review .order-automatic-credit-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 20px; margin: 0; }
.order-review .order-automatic-credit-list[hidden] { display: none; }
.order-review .order-automatic-credit-list > div { display: grid; gap: 2px; min-width: 0; }
.order-review .order-automatic-credit-list dt { color: var(--fg-2); font-size: 13px; }
.order-review .order-automatic-credit-list dd { margin: 0; color: var(--fg-1); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.order-review .order-automatic-credit-issue { color: var(--warning); font-size: 14px; font-weight: 600; }
.order-review .order-automatic-credit-source { font-size: 12.5px; }
.shadow-order-pricing-state.warning.order-retired-sales-credit { margin: 0 0 14px; }
@media (max-width: 600px) {
  .order-flow .shadow-order-commissions-group > .shadow-order-commission-grid[data-order-sales-credit-pickers] { grid-template-columns: 1fr; }
  .order-review .order-automatic-credit { padding: 14px; }
}
.order-review .order-contributors-half-commission { display: flex; align-items: start; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 700; }
.order-review .order-contributors-half-commission input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.order-review .order-contributors-half-commission small { display: block; margin-top: 4px; color: var(--fg-2); font-size: 13px; font-weight: 400; line-height: 1.5; }
