/* Kilostop Junior — Multi-step wizard
   Used by program-slabit.html (5-step Meta-mirror) and servicii-medicale.html (4-step).
   Uses tokens from main.css. */

/* ── Wizard card ──────────────────────────────── */
.wizard-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: var(--ink);
}

/* ── Progress bar ─────────────────────────────── */
.wizard-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mute);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wizard-progress-bar {
  flex: 1;
  height: 5px;
  background: var(--sage-light);
  border-radius: 100px;
  overflow: hidden;
}

.wizard-progress-fill {
  display: block;
  height: 100%;
  background: var(--sage);
  border-radius: 100px;
  transition: width 0.3s ease;
}

/* ── Step ─────────────────────────────────────── */
.wizard-step { display: none; }
.wizard-step.active {
  display: block;
  animation: wizard-fade-in 0.28s ease-out both;
}

@keyframes wizard-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-step > h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--sage-dark);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.wizard-step-hint {
  color: var(--ink-mute);
  font-size: 0.9rem;
  margin-bottom: 22px;
  line-height: 1.55;
}

/* ── Option cards (radio) ─────────────────────── */
.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.wizard-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wizard-option:hover {
  border-color: var(--sage);
  background: var(--sage-light);
}

.wizard-option input { display: none; }

.wizard-option-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  margin-top: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wizard-option input:checked + .wizard-option-check {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
}

.wizard-option input:checked + .wizard-option-check::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cream);
}

.wizard-option-content { flex: 1; }

.wizard-option-content strong {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--sage-dark);
  margin-bottom: 3px;
}

.wizard-option-content span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-mute);
  line-height: 1.5;
}

.wizard-option:has(input:checked) {
  border-color: var(--sage-dark);
  background: var(--sage-light);
}

/* ── Form fields (select, input, textarea) ────── */
.wizard-field { margin-bottom: 16px; }

.wizard-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sage-dark);
  margin-bottom: 6px;
}

.wizard-field label .req { color: var(--peach-deep); margin-left: 2px; }

.wizard-select,
.wizard-input,
.wizard-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.wizard-select:focus,
.wizard-input:focus,
.wizard-textarea:focus {
  outline: none;
  border-color: var(--sage);
}

.wizard-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'><path d='M3 5l4 4 4-4' stroke='%232d4a38' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* Make sure browser select option list is readable on all OSes */
.wizard-select option { color: var(--ink); background: var(--white); }

.wizard-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.wizard-field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-mute);
  margin-top: 5px;
}

/* ── Wizard actions (back / next / submit) ───── */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.wizard-back {
  color: var(--ink-mute);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  transition: color 0.2s ease;
}

.wizard-back:hover { color: var(--sage-dark); }
.wizard-back:disabled { opacity: 0; pointer-events: none; }

.wizard-next,
.wizard-submit {
  background: var(--sage-dark);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.wizard-next:hover,
.wizard-submit:hover {
  background: var(--red-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.wizard-next:disabled {
  background: var(--border);
  color: var(--ink-mute);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.wizard-submit {
  background: var(--green);
  color: var(--white);
}

.wizard-submit:hover {
  background: var(--green-deep);
  color: var(--white);
}

/* ── Inline warning (conditional logic) ──────── */
.wizard-warning {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--cream-warm);
  border-left: 3px solid var(--peach-deep);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.55;
}

.wizard-warning strong { color: var(--sage-dark); margin-right: 4px; }

.wizard-warning-back {
  display: inline-block;
  margin-top: 10px;
  background: var(--sage-dark);
  color: var(--cream);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wizard-warning-back:hover { background: var(--red-deep); }

/* ── Trust strip below wizard ─────────────────── */
.wizard-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 246, 240, 0.6);
}

.wizard-trust span { display: inline-flex; align-items: center; gap: 6px; }

.wizard-trust svg { width: 12px; height: 12px; opacity: 0.7; }
