/* Ausklinkung-Wizard – eigenständiges, poliertes UI */

#notch-wizard-modal .notch-wizard-panel {
  width: min(100%, 680px);
  max-width: 680px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#notch-wizard-modal .apl4-modal__body {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 24px 28px;
}

#notch-wizard-modal .notch-mass-fields .form-field input.has-placeholder {
  color: #adb5bd;
}

#notch-wizard-modal .notch-mass-fields .form-field input.has-placeholder::placeholder {
  color: #adb5bd;
  opacity: 1;
}

/* Fortschrittsanzeige */
#notch-wizard-modal .wizard-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  flex-shrink: 0;
}

#notch-wizard-modal .wizard-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
  opacity: 1;
}

#notch-wizard-modal .wizard-progress-step::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 58%;
  width: 84%;
  height: 3px;
  background: linear-gradient(to right, #dee2e6 0%, #e9ecef 100%);
  z-index: 0;
  border-radius: 2px;
}

#notch-wizard-modal .wizard-progress-step:last-child::after {
  display: none;
}

#notch-wizard-modal .wizard-progress-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 3px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #6c757d;
  position: relative;
  z-index: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

#notch-wizard-modal .wizard-progress-label {
  margin-top: 8px;
  font-size: 12px;
  color: #6c757d;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  line-height: 1.3;
  max-width: 120px;
}

#notch-wizard-modal .wizard-progress-step.is-active .wizard-progress-number {
  background: linear-gradient(135deg, #e5322d 0%, #c92a25 100%);
  color: #ffffff;
  border-color: #e5322d;
  box-shadow:
    0 4px 12px rgba(229, 50, 45, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#notch-wizard-modal .wizard-progress-step.is-current .wizard-progress-number {
  transform: scale(1.08);
}

#notch-wizard-modal .wizard-progress-step.is-active::after {
  background: linear-gradient(to right, #e5322d 0%, #c92a25 100%);
  box-shadow: 0 2px 4px rgba(229, 50, 45, 0.2);
}

#notch-wizard-modal .wizard-progress-step.is-active .wizard-progress-label {
  color: #e5322d;
  font-weight: 700;
}

/* Schritt-Titel */
#notch-wizard-modal .notch-step-title {
  font-size: 20px;
  font-weight: 700;
  color: #212529;
  margin: 0 0 8px;
  line-height: 1.3;
}

#notch-wizard-modal .notch-step-desc {
  font-size: 14px;
  color: #6c757d;
  margin: 0 0 24px;
  line-height: 1.55;
}

/* Art-Auswahl */
#notch-wizard-modal .notch-kind-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

#notch-wizard-modal .notch-kind-btn {
  padding: 20px 18px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  min-height: 220px;
}

#notch-wizard-modal .notch-kind-btn:hover {
  border-color: #e5322d;
  background: #fff8f8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(229, 50, 45, 0.12);
}

#notch-wizard-modal .notch-kind-btn.selected {
  border-color: #e5322d;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
  box-shadow: 0 6px 20px rgba(229, 50, 45, 0.18);
}

#notch-wizard-modal .notch-kind-diagram {
  width: 100%;
  height: 110px;
  background: #f8f9fa;
  border: 2px solid #e5322d;
  border-radius: 8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background 0.2s ease;
}

#notch-wizard-modal .notch-kind-btn:hover .notch-kind-diagram,
#notch-wizard-modal .notch-kind-btn.selected .notch-kind-diagram {
  background: #ffffff;
}

#notch-wizard-modal .notch-kind-diagram svg {
  width: 88%;
  height: 88%;
  display: block;
}

#notch-wizard-modal .notch-kind-label {
  font-size: 16px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 8px;
}

#notch-wizard-modal .notch-kind-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #495057;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

#notch-wizard-modal .notch-kind-btn:hover .notch-kind-badge,
#notch-wizard-modal .notch-kind-btn.selected .notch-kind-badge {
  background: rgba(229, 50, 45, 0.12);
  color: #c92a25;
}

#notch-wizard-modal .notch-kind-hint {
  font-size: 12px;
  color: #6c757d;
  font-style: italic;
  margin-top: auto;
  line-height: 1.4;
}

/* Schritt 2: Position + Maße */
#notch-wizard-modal .notch-position-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
}

#notch-wizard-modal .notch-position-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(229, 50, 45, 0.1);
  color: #c92a25;
  font-size: 13px;
  font-weight: 700;
}

#notch-wizard-modal .notch-position-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5322d;
  flex-shrink: 0;
}

#notch-wizard-modal .notch-mass-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

#notch-wizard-modal .notch-mass-fields {
  display: grid;
  gap: 14px;
}

#notch-wizard-modal .notch-mass-fields[hidden] {
  display: none !important;
}

#notch-wizard-modal .notch-mass-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

#notch-wizard-modal .notch-preview-box {
  border: 1px solid #dee2e6;
  border-radius: 10px;
  background: #fafafa;
  padding: 10px;
}

#notch-wizard-modal .notch-preview-box::before {
  content: 'Vorschau';
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

#notch-wizard-modal .wizard-preview-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Footer */
#notch-wizard-modal .wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e9ecef;
  flex-shrink: 0;
}

#notch-wizard-modal .wizard-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  #notch-wizard-modal .notch-kind-grid {
    grid-template-columns: 1fr;
  }

  #notch-wizard-modal .notch-mass-layout {
    grid-template-columns: 1fr;
  }

  #notch-wizard-modal .notch-position-row {
    flex-direction: column;
    align-items: stretch;
  }

  #notch-wizard-modal .wizard-progress {
    padding: 16px 12px;
  }

  #notch-wizard-modal .wizard-progress-number {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  #notch-wizard-modal .wizard-progress-step::after {
    top: 18px;
  }
}
