/* Match Wizard
 * ----------------------------------------------------------------- */

.wizard-page {
  background: linear-gradient(135deg, white 45%, var(--color-primary) 45%);
  min-height: 100vh;
}

.wizard-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2em 1em;
}

/* Progress bar */
.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2em;
  gap: 0;
}

.wizard-progress__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--gray-700);
  flex-shrink: 0;
}

.wizard-progress__dot--completed,
.wizard-progress__dot--current {
  background-color: var(--green);
}

.wizard-progress__line {
  height: 3px;
  flex: 1;
  max-width: 60px;
  background-color: var(--gray-700);
}

.wizard-progress__line--completed {
  background-color: var(--green);
}

/* Card */
.wizard-card {
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.80);
  box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(10px);
  padding: 2.5em 2em;
}

.wizard-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5em;
}

.wizard-description {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 1.5em;
  line-height: 1.5;
}

.wizard-meta {
  text-align: center;
  margin-bottom: 2em;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.wizard-help-text {
  color: var(--gray-500);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1em;
}

.wizard-help-text--left {
  text-align: left;
}

/* Form fields */
.wizard-field {
  margin-bottom: 1.5em;
}

.wizard-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5em;
}

.wizard-select {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-medium);
  font-size: var(--input-font-size);
  background-color: var(--input-background);
  appearance: none;
}

/* Option buttons (radio-style) */
.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  margin: 1.5em 0;
}

.wizard-options--inline {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.wizard-option-btn {
  display: block;
  padding: 0.875em 1.25em;
  border-radius: var(--radius-medium);
  border: 1px solid var(--gray-700);
  background: var(--gray-ghost);
  color: #000;
  cursor: pointer;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  line-height: normal;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.wizard-option-btn:hover {
  border-color: var(--color-primary);
}

.wizard-option-btn--selected,
.wizard-option-btn:has(:checked) {
  border: 3px solid var(--color-primary-dark);
  background: var(--color-primary);
  color: var(--gray-ghost);
}

.wizard-option-btn--selected em,
.wizard-option-btn:has(:checked) em {
  color: rgba(255, 255, 255, 0.85);
}

.wizard-option-btn--pill {
  padding: 0.75em 1.5em;
  min-width: 80px;
}

.wizard-option-btn__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wizard-option-btn__label {
  display: block;
}

/* Sortable list */
.wizard-sortable__list {
  list-style: none;
  padding: 0;
  margin: 1.5em 0;
}

.wizard-sortable__item {
  display: flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.875em 1em;
  margin-bottom: 0.5em;
  background: var(--gray-ghost);
  border: 1px solid var(--gray-700);
  border-radius: var(--radius-medium);
  cursor: grab;
  user-select: none;
}

.wizard-sortable__item:active {
  cursor: grabbing;
}

.wizard-sortable__handle {
  color: var(--gray-500);
  font-size: 1.25rem;
}

.wizard-sortable__rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wizard-sortable__label {
  font-weight: 600;
}

/* Sortable.js ghost class */
.sortable-ghost {
  opacity: 0.4;
}

/* Errors */
.wizard-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-medium);
  padding: 1em;
  margin: 1em 0;
  color: var(--color-negative);
}

/* Review section */
.wizard-review {
  margin: 1.5em 0;
}

.wizard-review__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1em 0;
  border-bottom: 1px solid var(--gray-800);
}

.wizard-review__item h3 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 0.25em;
  min-width: 150px;
}

.wizard-review__item p {
  flex: 1;
  margin: 0;
}

.wizard-review__item ol {
  margin: 0;
  padding-left: 1.25em;
}

.wizard-review__edit {
  font-size: 0.875rem;
  color: var(--color-primary);
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 1em;
}

/* Actions */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2em;
  gap: 1em;
}

/* Grid layout for position buttons (2x4) */
.wizard-options--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75em;
  margin: 1.5em 0;
}

/* Checkbox-style option buttons (geography multi-select) */
.wizard-option-btn--checkbox .wizard-option-btn__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 640px) {
  .wizard-card {
    padding: 1.5em 1em;
  }

  .wizard-card h1 {
    font-size: 1.25rem;
  }

  .wizard-review__item {
    flex-direction: column;
    gap: 0.5em;
  }

  .wizard-options--inline {
    gap: 0.5em;
  }

  .wizard-option-btn--pill {
    min-width: 60px;
    padding: 0.5em 1em;
    font-size: 0.875rem;
  }
}
