/**
 * Shared centered wizard header (create → templates → builder → publish → live).
 * Step pill, title, optional sub, rounded progress.
 */
body.builder-flow-page {
  margin: 0;
  font-family: var(--font, "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
  background:
    radial-gradient(circle at 10% -8%, rgba(79, 70, 229, 0.12), transparent 40%),
    radial-gradient(circle at 92% 0%, rgba(99, 102, 241, 0.1), transparent 36%),
    linear-gradient(180deg, #f7f8fc 0%, #f1f4fb 100%);
  color: var(--ink, #070b14);
  overflow-x: hidden;
}

.builder-flow-hero {
  text-align: center;
  margin-bottom: clamp(1.2rem, 3vw, 1.65rem);
  position: relative;
  isolation: isolate;
  padding: clamp(0.75rem, 2vw, 1.2rem) 1rem clamp(0.35rem, 1.2vw, 0.65rem);
}

.builder-flow-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.82rem;
  border-radius: 999px;
  padding: 0.36rem 0.72rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(229, 231, 235, 0.95);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.builder-flow-hero h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.4vw + 1rem, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink, #0f172a);
}

.builder-flow-sub {
  max-width: 36rem;
  margin: 0.72rem auto 0;
  padding: 0 0.5rem;
  color: var(--muted, #6b7280);
  font-size: clamp(0.9rem, 1.15vw, 1rem);
  line-height: 1.65;
  font-weight: 400;
}

.builder-flow-offer {
  max-width: 36rem;
  margin: 0.5rem auto 0;
  padding: 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
  font-weight: 700;
  color: #4338ca;
}

.builder-flow-progress {
  margin: 1.1rem auto 0;
  width: 100%;
  max-width: 42rem;
  height: 7px;
  border-radius: 999px;
  background: rgba(229, 231, 240, 0.95);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

/* Keep legacy progress bars centered on pages with custom hero overrides */
.builder-flow-hero .builder-flow-progress {
  margin-left: auto;
  margin-right: auto;
}

.builder-flow-progress__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
}

.builder-flow-progress__fill--25 {
  width: 25%;
}
.builder-flow-progress__fill--50 {
  width: 50%;
}
.builder-flow-progress__fill--75 {
  width: 75%;
}
.builder-flow-progress__fill--100 {
  width: 100%;
}

/* Premium multi-step progress (shared for create → templates → builder → publish → live) */
.builder-flow-stepper {
  --stepper-active: #6366f1;
  --stepper-active-strong: #4f46e5;
  --stepper-muted: #cbd5e1;
  --stepper-text: #64748b;
  --stepper-done-text: #334155;
  margin: 1rem auto 0;
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 0;
}

/* Force consistent centering across all builder step pages */
.builder-flow-hero .builder-flow-stepper {
  margin-left: auto;
  margin-right: auto;
}

.builder-flow-stepper__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  color: var(--stepper-text);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.2;
}

.builder-flow-stepper__item::after {
  content: "";
  position: absolute;
  top: 0.58rem;
  left: calc(50% + 0.85rem);
  width: calc(100% - 1.7rem);
  height: 2px;
  border-radius: 999px;
  background: var(--stepper-muted);
}

.builder-flow-stepper__item:last-child::after {
  display: none;
}

.builder-flow-stepper__dot {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--stepper-muted);
  background: #fff;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.builder-flow-stepper__item.done {
  color: var(--stepper-done-text);
}

.builder-flow-stepper__item.done .builder-flow-stepper__dot {
  border-color: var(--stepper-active);
  background: linear-gradient(135deg, var(--stepper-active) 0%, var(--stepper-active-strong) 100%);
  color: #fff;
}

.builder-flow-stepper__item.done::after {
  background: linear-gradient(90deg, var(--stepper-active) 0%, var(--stepper-active-strong) 100%);
}

.builder-flow-stepper__item.active {
  color: #1e293b;
  font-weight: 700;
}

.builder-flow-stepper__item.active .builder-flow-stepper__dot {
  border-color: var(--stepper-active-strong);
  background: linear-gradient(135deg, var(--stepper-active) 0%, var(--stepper-active-strong) 100%);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

@media (max-width: 640px) {
  .builder-flow-stepper__item {
    font-size: 0.72rem;
  }
  .builder-flow-stepper__dot {
    width: 1.05rem;
    height: 1.05rem;
    font-size: 0.62rem;
  }
}

.builder-flow-icon-nav {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.25rem auto 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

.builder-flow-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 11px;
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  font-size: 0;
  line-height: 0;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.builder-flow-icon-btn:hover {
  border-color: rgba(165, 180, 252, 0.65);
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.45);
  transform: translateY(-1px);
}

.builder-flow-icon-btn--prev::before,
.builder-flow-icon-btn--next::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
}

.builder-flow-icon-btn--prev::before {
  border-width: 7px 10px 7px 0;
  border-color: transparent #ffffff transparent transparent;
}

.builder-flow-icon-btn--next::before {
  border-width: 7px 0 7px 10px;
  border-color: transparent transparent transparent #ffffff;
}

.builder-flow-icon-btn svg {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .builder-flow-icon-btn:hover {
    transform: none;
  }
}

@media (max-width: 760px) {
  .builder-flow-icon-nav {
    margin-top: 0.85rem;
    justify-content: center;
  }
}

/* Light mode: same blue buttons + white triangles for consistency. */
html[data-theme="light"] body.builder-flow-page .builder-flow-icon-btn {
  border: 1px solid rgba(79, 70, 229, 0.35);
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.28);
}

html[data-theme="light"] body.builder-flow-page .builder-flow-icon-btn:hover {
  border-color: rgba(99, 102, 241, 0.55);
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.38);
}

/* Dark theme only: same black footer + white type as panel pages (light theme uses landing.css footer). */
html[data-theme="dark"] body.builder-flow-page footer.site-footer,
html[data-theme="dark"] body.builder-flow-page footer.site-footer.site-footer--create-light {
  background: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-eyebrow,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-tagline,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-label,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-nav a,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-bottom__text,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-contact__body,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-contact__body a,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .logo,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .create-footer-logo__biz,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .create-footer-logo__card,
html[data-theme="dark"] body.builder-flow-page footer.site-footer p,
html[data-theme="dark"] body.builder-flow-page footer.site-footer li,
html[data-theme="dark"] body.builder-flow-page footer.site-footer small {
  color: #ffffff !important;
}

html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-nav a:hover,
html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-contact__body a:hover {
  color: #ffffff !important;
}

html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-social__btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-social__btn:hover {
  background: rgba(99, 102, 241, 0.45) !important;
  border-color: rgba(165, 180, 252, 0.55) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] body.builder-flow-page footer.site-footer .footer-contact__icon svg {
  color: #ffffff !important;
}
