/* ═══════════════════════════════════════════════════════════
   VERKAUFDA — Multi-Step Form CSS
   ═══════════════════════════════════════════════════════════ */

/* ── Progress ───────────────────────────────────────────── */
.form-progress {
  margin-bottom: 2.5rem;
}
.form-progress__bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.form-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 2px;
  transition: width .4s ease;
}
.form-progress__steps {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  cursor: pointer;
}
.progress-step__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all .2s;
}
.progress-step span {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}
.progress-step.completed .progress-step__dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.progress-step.active .progress-step__dot {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.progress-step.active span { color: var(--color-primary); font-weight: 600; }

/* ── Form Steps ─────────────────────────────────────────── */
.form-step {
  display: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: 1.25rem;
  animation: fadeSlide .3s ease;
}
.form-step.active { display: block; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.form-step__header { margin-bottom: 2rem; }
.form-step__header h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 0.375rem; }
.form-step__header p { color: var(--text-secondary); font-size: 0.9375rem; }

/* ── Radio Cards ────────────────────────────────────────── */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}
.radio-card {
  cursor: pointer;
  position: relative;
}
.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card span {
  display: block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .15s;
  background: #fff;
}
.radio-card:hover span { border-color: var(--color-primary); color: var(--color-primary); }
.radio-card input:checked + span {
  border-color: var(--color-primary);
  background: rgba(59,130,246,.08);
  color: var(--color-primary);
  font-weight: 700;
}

/* ── Condition Cards ────────────────────────────────────── */
.condition-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.875rem;
}
.condition-card { cursor: pointer; position: relative; }
.condition-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.condition-card__body {
  display: flex;
  flex-direction: column;
  padding: 1.125rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .15s;
}
.condition-card:hover .condition-card__body { border-color: var(--color-primary); }
.condition-card input:checked + .condition-card__body {
  border-color: var(--color-primary);
  background: rgba(59,130,246,.05);
}
.condition-card__label { font-weight: 700; font-size: 0.9375rem; margin-bottom: 0.25rem; }
.condition-card__desc { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.45; }
.condition-card input:checked + .condition-card__body .condition-card__label { color: var(--color-primary); }

/* ── Toggle Checkboxes ──────────────────────────────────── */
.checkbox-toggle { margin-bottom: 0.75rem; }
.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}
.toggle-label input { display: none; }
.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: var(--shadow-sm);
}
.toggle-label input:checked ~ .toggle-switch { background: var(--color-primary); }
.toggle-label input:checked ~ .toggle-switch::after { transform: translateX(20px); }

/* ── Upload ─────────────────────────────────────────────── */
.upload-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--color-primary);
  background: rgba(59,130,246,.03);
}
.upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-placeholder svg { width: 48px; height: 48px; fill: var(--border); margin: 0 auto 1rem; }
.upload-placeholder p { font-weight: 600; color: var(--text-secondary); }
.upload-placeholder span { font-size: 0.8125rem; color: var(--text-muted); }
.upload-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.625rem;
  margin-top: 1rem;
}
.preview-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.preview-remove:hover { background: var(--color-danger); }

/* ── Form Nav ───────────────────────────────────────────── */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
}
.form-legal {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* ── Hidden ─────────────────────────────────────────────── */
.hidden { display: none !important; }

@media (max-width: 640px) {
  .form-step { padding: 1.5rem; }
  .form-progress__steps { display: none; }
  .condition-cards { grid-template-columns: 1fr 1fr; }
}
