/* Gas mixture builder (components/mix-builder.js). Sizes follow the template tokens: 16px values,
   14px labels/hints, 48px inputs, 8 / 12 / 16 / 24px spacing. Steps reuse .configuration-step. */
.mix-builder .configuration-steps { display: grid; gap: 16px; }
.mix-builder .step-choices { display: grid; gap: 16px; }
.mix-label { margin: 0; color: var(--navy); font-size: 14px; font-weight: 600; line-height: 1.5; }
.mix-label + * { margin-top: -8px; }

/* Standard mixtures: quick-start chips. */
.mix-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mix-preset {
  display: grid; gap: 4px; min-height: 44px; padding: 12px 16px; text-align: left;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--navy);
  transition: border-color .15s ease, background-color .15s ease;
}
.mix-preset:hover { border-color: var(--navy); }
.mix-preset[aria-pressed='true'] { border-color: var(--accent-dark); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-dark); }
.mix-preset-name { font-size: 16px; font-weight: 600; line-height: 1.5; }
.mix-preset-detail { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* One row per gas: name · value · unit · remove, then the % vol equivalent and any error. */
.mix-rows { display: grid; gap: 8px; }
.mix-rows:empty { display: none; }
.mix-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 140px 104px 44px; align-items: center; gap: 4px 12px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfdfe;
}
.mix-gas { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; }
.mix-gas-formula { color: var(--navy); font-size: 16px; font-weight: 700; }
.mix-gas-name { color: var(--muted); font-size: 14px; }
.mix-value, .mix-unit, .mix-add-select {
  height: 48px; min-width: 0; padding: 0 12px; border: 1px solid #a6b5c0; border-radius: 6px;
  background: #fff; color: var(--text); font: inherit; font-size: 16px;
}
.mix-value { text-align: right; font-variant-numeric: tabular-nums; }
.mix-value[aria-invalid='true'] { border-color: var(--accent-dark); }
.mix-remove {
  width: 44px; height: 44px; border: 1px solid transparent; border-radius: 6px; background: transparent;
  color: var(--muted); font-size: 20px; line-height: 1;
}
.mix-remove:hover { border-color: var(--line); color: var(--accent-dark); }
.mix-row-vol, .mix-row-error { grid-column: 2 / 4; margin: 0; font-size: 14px; line-height: 1.5; text-align: right; }
.mix-row-vol { color: var(--muted); }
.mix-row-error { color: var(--accent-dark); }
.mix-row-vol:empty, .mix-row-error:empty { display: none; }

.mix-add { display: grid; grid-template-columns: auto minmax(0, 320px); align-items: center; gap: 12px; }
.mix-add-label { color: var(--navy); font-size: 14px; font-weight: 600; }
.mix-add-select:disabled { opacity: .55; }

.mix-balance { display: flex; flex-wrap: wrap; gap: 12px; }

/* Total: bar fills with the gases' share; the rest is the balance gas. */
.mix-total { display: grid; gap: 8px; padding: 12px 16px; border-radius: 6px; background: #edf3f7; }
.mix-total-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #fff; }
.mix-total-fill { display: block; height: 100%; width: 0; background: var(--navy); transition: width .15s ease; }
.mix-total.is-over .mix-total-fill { background: var(--accent-dark); }
.mix-total-text { margin: 0; color: var(--navy); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mix-total-text:empty { display: none; }
.mix-total-error { margin: 0; color: var(--accent-dark); font-size: 14px; }
.mix-total-error:empty { display: none; }
.mix-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Cylinder sizes: three cards with material and the price for the current mixture. */
.mix-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mix-size { display: grid; gap: 4px; padding: 12px 40px 12px 16px; text-align: left; }
.mix-size .option-label { font-size: 16px; font-weight: 700; }
.mix-size .option-detail { color: var(--muted); font-size: 14px; }
.mix-size-price { color: var(--navy); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mix-size-price:empty { display: none; }
.mix-size .option-check { position: absolute; top: 12px; right: 16px; }

@media (prefers-reduced-motion: reduce) { .mix-total-fill, .mix-preset { transition: none; } }
@media (max-width: 1023.98px) {
  .mix-row { grid-template-columns: minmax(0, 1fr) 120px 96px 44px; }
}
@media (max-width: 767.98px) {
  .mix-presets, .mix-sizes { grid-template-columns: 1fr; }
  .mix-row { grid-template-columns: minmax(0, 1fr) 96px 44px; }
  .mix-gas { grid-column: 1 / -1; }
  .mix-row .mix-value { grid-column: 1; }
  .mix-row-vol, .mix-row-error { grid-column: 1 / -1; text-align: left; }
  .mix-add { grid-template-columns: 1fr; gap: 8px; }
}

/* Sixth tile: "+ Custom mixture" — dashed border so it reads as "start your own" rather than a product. */
.mix-preset-custom { border-style: dashed; border-color: #8fa3b3; background: #f7fafc; }
.mix-preset-custom .mix-preset-name { color: var(--accent-dark); }
.mix-preset-custom[aria-pressed='true'] { border-style: solid; }

.mix-total-error.is-hint { color: var(--muted); }

/* Balance gas: 5 common gases + "Other (write your own)" with a text box underneath. */
.mix-balance-other { display: grid; grid-template-columns: auto minmax(0, 320px); align-items: center; gap: 8px 12px; }
.mix-balance-other[hidden] { display: none; }
.mix-balance-input { text-align: left; }
.mix-balance-other .mix-row-error { grid-column: 2; text-align: left; }
.mix-balance-conflict { text-align: left; }
@media (max-width: 767.98px) {
  .mix-balance-other { grid-template-columns: 1fr; }
  .mix-balance-other .mix-row-error { grid-column: 1; }
}

/* Guidance list under the mixture (2026-12-02) and the custom-mixture feasibility note in step 3. */
.mix-guidance { margin: 0; padding: 12px 16px 12px 32px; border-radius: var(--radius, 8px); background: var(--surface-muted, #f3f7f9); color: var(--muted); font-size: 14px; line-height: 1.5; display: grid; gap: 4px; }
.mix-custom-note { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.mix-limit { margin-left: 8px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.mix-limit.is-full { color: var(--accent-dark); font-weight: 600; }

/* ---- Spec 2026-12-04: purchase stepper, step descriptions, advisory block, final CTA ---- */
.purchase-stepper { margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.purchase-stepper::-webkit-scrollbar { display: none; }
.purchase-stepper-list { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; min-width: max-content; }
.purchase-stepper-item { flex: 1 1 0; display: flex; align-items: center; min-width: 120px; }
.purchase-stepper-item:not(:last-child)::after { content: ''; flex: 1; height: 2px; margin: 0 8px; background: var(--line); }
.purchase-stepper-item[data-progress="complete"]:not(:last-child)::after { background: var(--navy); }
.purchase-stepper-button { display: flex; align-items: center; gap: 8px; padding: 4px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--text-sm); white-space: nowrap; cursor: pointer; }
.purchase-stepper-button:disabled { cursor: default; }
.purchase-stepper-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); font-weight: 700; flex: none; }
.purchase-stepper-item[data-progress="current"] .purchase-stepper-button { color: var(--text); font-weight: 700; }
.purchase-stepper-item[data-progress="current"] .purchase-stepper-dot { background: var(--accent-action); color: #fff; box-shadow: none; }
.purchase-stepper-item[data-progress="complete"] .purchase-stepper-button { color: var(--navy); }
.purchase-stepper-item[data-progress="complete"] .purchase-stepper-dot { background: var(--navy); color: #fff; box-shadow: none; }
.step-description { margin: 0 0 12px; color: var(--muted); font-size: var(--text-sm); }
.mix-guidance-box { margin-top: 16px; padding: 12px 16px; background: var(--background); border-radius: var(--radius-sm); }
.mix-guidance-title { margin: 0 0 6px; font-weight: 700; font-size: var(--text-sm); }
.mix-guidance-box .mix-guidance { margin: 0; }
.mix-next { margin-top: 16px; }
.mix-next:disabled { opacity: .45; cursor: not-allowed; }
.final-cta { padding: 56px 0; background: var(--background); text-align: center; }
.final-cta-title { margin: 0 0 8px; }
.final-cta-text { margin: 0 auto 20px; max-width: 560px; color: var(--muted); }
.final-cta-sales { margin: 16px 0 0; font-size: var(--text-sm); color: var(--muted); }
.final-cta-sales a { color: inherit; text-decoration: underline; }

/* Wizard (2026-12-04): one step on screen at a time, no step boxes; the bar above names the steps. */
.is-wizard .configuration-steps, .is-wizard .order-completion { display: contents; }
.is-wizard .configuration-step:not(.is-active-step) { display: none; }
.is-wizard .configuration-step, .is-wizard .configuration-step[data-state] { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.is-wizard .configuration-step legend { padding: 0; margin-bottom: 4px; }
.is-wizard .configuration-step .step-number { display: none; }
.wizard-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.wizard-pager .wizard-next { margin-left: auto; }
.wizard-pager .button:disabled { opacity: .45; cursor: not-allowed; }

/* Clearer mixture bar (2026-12-04): taller, two coloured segments, legend with keys. */
.mix-total-bar { display: flex; height: 18px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1px #c9d6e0; }
.mix-total-fill { flex: none; border-radius: 0; }
.mix-total-fill.has-gas { min-width: 6px; }
.mix-total-balance { flex: 1; background: #9cc3e0; }
.mix-total.is-over .mix-total-balance { display: none; }
.mix-total-text { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; font-weight: 500; }
.mix-legend { display: inline-flex; align-items: center; gap: 6px; }
.mix-legend strong { font-weight: 700; }
.mix-legend-key { width: 12px; height: 12px; border-radius: 2px; background: var(--navy); }
.mix-legend-balance .mix-legend-key { background: #9cc3e0; }
.mix-total.is-over .mix-legend-gas .mix-legend-key { background: var(--accent-dark); }
.final-cta { padding: 24px 0; }
.final-cta-sales { margin: 0; }
/* No cards inside the wizard (2026-12-04): checkout steps, review photo panel and divider. */
.is-wizard #contact-shipping:not([data-state='locked']),
.is-wizard #order-payment:not([data-state='locked']) { padding: 0; border: 0; background: none; box-shadow: none; }
.is-wizard .edition-purchase .product-image { background: none; padding: 0; }
.is-wizard .edition-controls { border-top: 0; padding-top: 0; }
