/*
 * Order Flow template — docked stepper above the go-troppo ordering flow.
 * Ported from the order concept's order.css; the flow sections themselves are
 * skinned in site-overrides.css.
 */

.stepper {
  display: flex;
  gap: 0;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  position: sticky;
  top: var(--gt-header-h, 64px);
  z-index: 55;
  transition: box-shadow .2s ease;
}

.stepper.stuck {
  box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
}

.stepper .wrap {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
}

.stp {
  flex: 1 1 0;
  min-width: 150px;
  padding: 18px 18px 16px 0;
  display: flex;
  gap: 13px;
  align-items: center;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, opacity .2s ease;
}

.stp.now {
  border-bottom-color: var(--orange);
}

.stp:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.stp .num {
  width: 27px;
  height: 27px;
  border-radius: 99px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 900;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .6);
  position: relative;
  transition: background .2s ease, color .2s ease;
}

.stp.done .num {
  background: var(--teal);
  color: transparent;
}

.stp.done .num::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.stp.now .num {
  background: var(--orange);
  color: var(--ink);
}

.stp b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .55);
}

.stp.done b,
.stp.now b,
.stp:hover b {
  color: var(--off);
}

.stp span {
  font-size: 12px;
  color: rgba(255, 255, 255, .58);
  display: block;
  margin-top: 2px;
  line-height: 1.4;
}

/* Steps whose section the plugin has not revealed yet */
.stp.off {
  cursor: default;
  opacity: .5;
}

.stp.off:hover b {
  color: rgba(255, 255, 255, .55);
}

@media (max-width: 760px) {
  .stp {
    min-width: 0;
    padding: 11px 6px 10px 0;
    gap: 8px;
  }

  .stp span {
    display: none;
  }

  .stp b {
    font-size: 11.5px;
    letter-spacing: -.02em;
    line-height: 1.25;
  }

  .stp .num {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .stp.done .num::after {
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .stp b {
    font-size: 10.5px;
  }

  .stp {
    gap: 6px;
    padding-right: 4px;
  }
}

/* The flow scrolls each step to 100px from the top (CONFIG.SCROLL_OFFSET in
   nbn-flow-merged-v3.js), but this template stacks a 77px stepper under the 79px
   sticky header, so step headings landed under the chrome. Compacting the stepper
   once it docks brings the chrome back inside that offset. */
@media (min-width: 761px) {
  .stepper.stuck .stp {
    padding: 10px 18px 9px 0;
  }

  /* .num is a span too — only the descriptive line collapses. */
  .stepper.stuck .stp span:not(.num) {
    display: none;
  }
}

/* The stepper docks directly above the full-width plan step, so it takes the same
   gutter as that section rather than the 1280px page wrap — otherwise it reads as a
   narrow bar floating over wider content, and the gap grows with the viewport. */
.stepper .wrap {
  max-width: none;
  padding-inline: max(clamp(20px, 3vw, 48px), calc((100% - 1280px) / 2));
}
