/* The step-by-step wizard screens (ticket 614, shared by every wizard since ticket 1111): the progress
   bar, one question per screen with its choice cards and text fields, and the review that lists every
   answer with a Change link. js/wizard_screens.js draws them from the step engine in js/wizard_engine.js.
   The Synthetic Template wizard (route #/synthetic-markers/new) is the first user; its finish screen
   keeps its own rules in breadcrumbs.css. This sheet loads before breadcrumbs.css. */

.wizard {
  max-width: 40rem;
  margin: 1.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wizard__progress {
  margin: 0;
  color: var(--ink-muted);
  font: var(--type-footnote);
}

.wizard__title {
  margin: 0;
  font-size: var(--fs-lg);
  color: var(--ink);
}

.wizard__help {
  margin: 0;
  color: var(--ink-body);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.wizard__fields {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.wizard-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--ink-dim);
  font-size: var(--fs-xs);
}

/* The box of several lines (ticket 616, the .env folders): one folder per line, so it reads as code. */
.wizard-textarea {
  min-height: 6rem;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-family: var(--font-mono);
}

/* The drop-down list (ticket 1116, the API Meeting Site address): it is as wide as the text boxes. */
.wizard-select {
  width: 100%;
  box-sizing: border-box;
}

/* Choice cards are radio buttons: the input is visually hidden and the card shows its state. */
.wizard-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.wizard-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.6rem;
  background: var(--glass);
  cursor: pointer;
}

.wizard-card.is-selected {
  border-color: var(--border-gold);
  background: var(--gold-soft);
}

.wizard-card:focus-within {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
}

.wizard-card__label {
  color: var(--ink);
  font-size: var(--fs-base);
  font-weight: 600;
}

.wizard-card__hint {
  color: var(--ink-dim);
  font-size: var(--fs-xs);
}

.wizard__note {
  margin: 0;
  min-height: 1.2em;
  color: var(--gold);
  font-size: var(--fs-xs);
}

/* The review's note when a fleet script replaces the saved addresses (ticket 622). */
.wizard__warning {
  margin: 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--ink-body);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.wizard__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.wizard__cancel {
  margin-left: auto;
  color: var(--ink-dim);
  font-size: var(--fs-xs);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.wizard-review {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.wizard-review__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.wizard-review__row dt {
  flex: 0 0 11rem;
  color: var(--ink-dim);
  font-size: var(--fs-xs);
}

.wizard-review__row dd {
  flex: 1 1 14rem;
  min-width: 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

/* An open On/Off switch on the review: the checkbox, its sentence and Done, one under the other. */
.wizard-review__row dd.wizard-review__switch {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
}

.wizard-review__row dd.wizard-review__switch .login-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
}

.wizard-review__row dd.wizard-review__switch .login-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.wizard-review__value {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  overflow-wrap: anywhere;
}

/* A plain text control that reads as a link, like the Skip link on the first-login wizard. The
   finish screen's "Back to Synthetic Templates" link and "Make another" button share it. */
.wizard__change,
.wizard__link {
  flex: 0 0 auto;
  font: inherit;
  font-size: var(--fs-xs);
  color: var(--gold);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
