/* LumoForms Pro — Multi-step form UI
   ========================================================================== */

.lf-form--multistep {
  position: relative;
}

/* Progress: numbered circles + connector rail + labels */
.lf-ms-progress {
  position: relative;
  margin: 0 0 32px;
  padding: 4px 4px 0;
}

.lf-ms-progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 19px;
  height: 2px;
  z-index: 0;
  pointer-events: none;
}

.lf-ms-progress-rail-track,
.lf-ms-progress-rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
}

.lf-ms-progress-rail-track {
  right: 0;
  background: #e5e7eb;
}

.lf-ms-progress-rail-fill {
  width: 0;
  background: var(--lf-primary, #7c3aed);
  transition: width 0.35s ease;
}

.lf-ms-progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.lf-ms-progress-step {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: center;
  color: #9ca3af;
  transition: color 0.2s ease;
}

.lf-ms-progress-dot {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  color: #6b7280;
  box-shadow: 0 0 0 4px #fff;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.lf-ms-progress-num {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.lf-ms-progress-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  width: 100%;
  max-width: 6.75rem;
  margin-inline: auto;
  color: inherit;
  /* Wrap cleanly — no cramped single-line ellipsis */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.lf-ms-progress-step.is-active {
  color: var(--lf-primary, #7c3aed);
}

.lf-ms-progress-step.is-active .lf-ms-progress-dot {
  background: var(--lf-primary, #7c3aed);
  border-color: var(--lf-primary, #7c3aed);
  color: #fff;
  box-shadow:
    0 0 0 4px #fff,
    0 6px 16px color-mix(in srgb, var(--lf-primary, #7c3aed) 28%, transparent);
}

.lf-ms-progress-step.is-done {
  color: var(--lf-primary, #7c3aed);
}

.lf-ms-progress-step.is-done .lf-ms-progress-dot {
  background: var(--lf-primary, #7c3aed);
  border-color: var(--lf-primary, #7c3aed);
  color: #fff;
}

.lf-ms-progress-step.is-done .lf-ms-progress-num {
  font-size: 0;
}

.lf-ms-progress-step.is-done .lf-ms-progress-num::before {
  content: "✓";
  font-size: 14px;
  font-weight: 700;
}

.lf-steps-host {
  position: relative;
}

.lf-form--multistep .lf-step {
  display: none;
}

.lf-form--multistep .lf-step.lf-step-active {
  display: block;
  animation: lfMsFadeIn 0.28s ease;
}

@keyframes lfMsFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lf-step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.lf-step-nav-spacer {
  flex: 1;
}

.lf-step-nav .lf-btn-primary,
.lf-step-nav .lf-btn-secondary {
  min-width: 120px;
  border-radius: 10px;
  font-weight: 600;
  padding: 11px 20px;
  cursor: pointer;
  line-height: 1.25;
}

.lf-step-nav .lf-btn-secondary {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
}

.lf-step-nav .lf-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.lf-step-nav .lf-btn-primary {
  background: var(--lf-primary, #7c3aed);
  border: 1px solid transparent;
  color: #fff;
  margin-left: auto;
}

.lf-step-nav .lf-btn-primary:hover {
  filter: brightness(1.05);
}

.lf-page-break {
  display: none !important;
}

@media (max-width: 640px) {
  .lf-ms-progress {
    margin-bottom: 24px;
  }

  .lf-ms-progress-rail {
    top: 16px;
  }

  .lf-ms-progress-dot {
    width: 30px;
    height: 30px;
  }

  .lf-ms-progress-label {
    font-size: 11px;
    max-width: 4.5rem;
    -webkit-line-clamp: 2;
  }

  .lf-step-nav {
    flex-wrap: wrap;
  }

  .lf-step-nav .lf-btn-primary,
  .lf-step-nav .lf-btn-secondary {
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
}
