/**
 * wizard - multi-step form styling (progress header + steps + footer nav).
 * Theme-aware via the CSS tokens; horizontal by default, vertical opt-in.
 */
.wizard-step[hidden] {
  display: none !important;
}

.wizard-header {
  display: flex;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.wizard-header::-webkit-scrollbar {
  display: none;
}

.wizard-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  background: none;
  border: 0;
  position: relative;
  color: var(--bs-secondary-color);
  cursor: default;
}
.wizard-tab.is-clickable {
  cursor: pointer;
}
.wizard-tab.is-clickable:hover .wizard-marker {
  border-color: var(--bs-primary);
}
.wizard-tab::before {
  content: "";
  position: absolute;
  top: calc(2.25rem / 2 - 1px);
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--bs-border-color);
}
.wizard-tab:first-child::before {
  display: none;
}
.wizard-tab.is-current::before, .wizard-tab.is-done::before {
  background: var(--bs-primary);
}

.wizard-marker {
  position: relative;
  z-index: 1;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bs-border-color);
  background: var(--genus-card-bg, var(--bs-body-bg));
  color: var(--bs-secondary-color);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.wizard-marker i {
  font-size: 1.1rem;
}

.wizard-check {
  display: none;
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--bs-success);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--genus-card-bg, var(--bs-body-bg));
}

.wizard-tab.is-current {
  color: var(--bs-body-color);
}
.wizard-tab.is-current .wizard-marker {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  color: #fff;
}

.wizard-tab.is-done {
  color: var(--bs-body-color);
}
.wizard-tab.is-done .wizard-marker {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  color: #fff;
}
.wizard-tab.is-done .wizard-check {
  display: inline-flex;
}

.wizard-tab-label {
  font-size: 0.8125rem;
  font-weight: 500;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 575.98px) {
  .wizard-tab-label {
    display: none;
  }
}
.wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bs-border-color);
}

.wizard-back {
  margin-right: auto;
}

.wizard-vertical {
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr;
  column-gap: 2.5rem;
}
.wizard-vertical > .wizard-header {
  grid-column: 1;
  grid-row: 1/span 2;
  flex-direction: column;
  overflow: visible;
  margin-bottom: 0;
}
.wizard-vertical > .wizard-step {
  grid-column: 2;
  grid-row: 1;
}
.wizard-vertical > .wizard-footer {
  grid-column: 2;
  grid-row: 2;
}
.wizard-vertical .wizard-tab {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0 0 1.75rem;
  text-align: left;
}
.wizard-vertical .wizard-tab:last-child {
  padding-bottom: 0;
}
.wizard-vertical .wizard-tab::before {
  display: none;
}
.wizard-vertical .wizard-tab:not(:last-child) .wizard-marker::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 1.75rem;
  background: var(--bs-border-color);
}
.wizard-vertical .wizard-tab.is-done .wizard-marker::after {
  background: var(--bs-primary);
}
.wizard-vertical .wizard-tab-label {
  display: block;
  white-space: normal;
  padding-top: calc(2.25rem / 2 - 0.7em);
}

@media (max-width: 767.98px) {
  .wizard-vertical {
    grid-template-columns: 1fr;
    row-gap: 1.5rem;
  }
  .wizard-vertical > .wizard-header {
    grid-column: 1;
    grid-row: 1;
    flex-direction: row;
    overflow-x: auto;
  }
  .wizard-vertical > .wizard-step {
    grid-column: 1;
    grid-row: 2;
  }
  .wizard-vertical > .wizard-footer {
    grid-column: 1;
    grid-row: 3;
  }
  .wizard-vertical .wizard-tab {
    flex-direction: column;
    align-items: center;
    padding: 0;
  }
  .wizard-vertical .wizard-tab:not(:last-child) .wizard-marker::after {
    display: none;
  }
  .wizard-vertical .wizard-tab::before {
    display: block;
  }
  .wizard-vertical .wizard-tab-label {
    padding-top: 0;
  }
}
