/* Phone-first stepped forms (PANEL-50 Wave 8, item 70).
 *
 * The companion to static/stepped.js. EVERY rule in this file
 * lives inside the one media query below, at the same breakpoint
 * the script uses (STEPPED_MAX_WIDTH = 640px). Above 640px this
 * file applies NOTHING — a stepped form renders exactly as it does
 * today — and the script is inert there too (it wires only at or
 * under the breakpoint and tears itself down above it).
 *
 * What the rules do, small screens only:
 *   - the progress line the script inserts (.esc-stepped-progress:
 *     "Step 2 of 5" text + .esc-stepped-bar with its fill);
 *   - the Back/Continue row the script inserts (.esc-stepped-nav),
 *     thumb-sized and spread apart;
 *   - the one-step-at-a-time display: the script marks the visible
 *     step .esc-stepped-current and hides the rest with the hidden
 *     attribute; these rules only style that state, they never
 *     hide a step on their own;
 *   - fieldsets/sections used as steps lose their screen chrome so
 *     a step reads as one plain phone screen.
 *
 * Presentation only: no field, name, or endpoint is affected by
 * anything here.
 */

@media (max-width: 640px) {
  form.stepped-form .esc-stepped-progress {
    display: block;
    margin: 0 0 1rem;
    font-size: .9rem;
    font-weight: 700;
  }
  form.stepped-form .esc-stepped-label {
    display: block;
    margin-bottom: .4rem;
  }
  form.stepped-form .esc-stepped-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--pp-hairline, #26262b);
    overflow: hidden;
  }
  form.stepped-form .esc-stepped-bar-fill {
    height: 100%;
    background: var(--pp-accent, #f5b301);
    transition: width .2s ease;
  }
  form.stepped-form fieldset,
  form.stepped-form section {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
  }
  form.stepped-form .esc-stepped-nav {
    display: flex;
    gap: .6rem;
    justify-content: space-between;
    margin-top: 1.1rem;
  }
  form.stepped-form .esc-stepped-nav button {
    min-height: 48px;
    flex: 1 1 0;
    font-size: 1rem;
  }
  form.stepped-form .esc-stepped-nav .esc-stepped-back:disabled {
    opacity: .45;
  }
  /* The form's real submit button, shown by the script only on
     the final step: make it a full-width phone target there. */
  form.stepped-form .esc-stepped-submit-final {
    width: 100%;
    min-height: 48px;
    margin-top: 1.1rem;
  }
}
