/* v151 — unified mobile calculator stage navigation
   Stage selectors only. Ledger subtabs, visual-mode tabs and result tables are intentionally untouched. */

@media screen and (max-width: 767px) {
  /* Generic five-step wizard used by the standard calculator family. */
  .calc-wizard-progress-v226,
  .calc-wizard-progress-v219,

  /* Dedicated calculator steppers that historically used horizontal scrolling. */
  .electro-steps,
  .vent-stage-nav.simple,
  .vent-stage-nav.pro,
  .gablepro-stage-nav.simple,
  .gablepro-stage-nav.pro,
  .hippro-stage-nav.simple,
  .hippro-stage-nav.pro,
  .paint-wizard-tabs,
  .metal-step-tabs,
  .rad-stepper,
  .wfh-stepper,
  .wsup-stagebar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
    overscroll-behavior-inline: auto !important;
    scrollbar-width: none !important;
    align-items: stretch !important;
  }

  .calc-wizard-progress-v226::-webkit-scrollbar,
  .calc-wizard-progress-v219::-webkit-scrollbar,
  .electro-steps::-webkit-scrollbar,
  .vent-stage-nav::-webkit-scrollbar,
  .gablepro-stage-nav::-webkit-scrollbar,
  .hippro-stage-nav::-webkit-scrollbar,
  .paint-wizard-tabs::-webkit-scrollbar,
  .metal-step-tabs::-webkit-scrollbar,
  .rad-stepper::-webkit-scrollbar,
  .wfh-stepper::-webkit-scrollbar,
  .wsup-stagebar::-webkit-scrollbar {
    display: none !important;
  }

  .calc-wizard-progress-v226 > button,
  .calc-wizard-progress-v219 > button,
  .electro-steps > button,
  .vent-stage-nav > button,
  .gablepro-stage-nav > button,
  .hippro-stage-nav > button,
  .paint-wizard-tabs > button,
  .metal-step-tabs > button,
  .rad-stepper > button,
  .wfh-stepper > button,
  .wsup-stagebar > button {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    scroll-snap-align: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    text-overflow: clip !important;
  }

  .calc-wizard-progress-v226 > button :is(b, small, span),
  .calc-wizard-progress-v219 > button :is(b, small, span),
  .electro-steps > button :is(b, small, span),
  .vent-stage-nav > button :is(b, small, span),
  .gablepro-stage-nav > button :is(b, small, span),
  .hippro-stage-nav > button :is(b, small, span),
  .paint-wizard-tabs > button :is(b, small, span),
  .metal-step-tabs > button :is(b, small, span),
  .rad-stepper > button :is(b, small, span),
  .wfh-stepper > button :is(b, small, span),
  .wsup-stagebar > button :is(b, small, span) {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-overflow: clip !important;
  }

  /* The electrical calculator was the remaining live horizontal stage rail. */
  .electro-steps {
    gap: 8px !important;
    padding: 10px !important;
  }
  .electro-steps > button {
    min-height: 56px !important;
    padding: 10px 11px !important;
    border-color: rgba(184, 204, 193, .72) !important;
    background: rgba(255, 255, 255, .7) !important;
  }
  .electro-steps > button.is-active {
    background: #fff !important;
  }
}

@media screen and (max-width: 360px) {
  .calc-wizard-progress-v226,
  .calc-wizard-progress-v219,
  .electro-steps,
  .vent-stage-nav.simple,
  .vent-stage-nav.pro,
  .gablepro-stage-nav.simple,
  .gablepro-stage-nav.pro,
  .hippro-stage-nav.simple,
  .hippro-stage-nav.pro,
  .paint-wizard-tabs,
  .metal-step-tabs,
  .rad-stepper,
  .wfh-stepper,
  .wsup-stagebar {
    grid-template-columns: 1fr !important;
  }

  .calc-wizard-progress-v226 > button:last-child,
  .calc-wizard-progress-v219 > button:last-child,
  .paint-wizard-tabs > button:last-child,
  .metal-step-tabs > button:last-child,
  .wfh-stepper > button:last-child {
    grid-column: auto !important;
    max-width: none !important;
  }
}
