.ai-wizard-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;display:flex;align-items:center;justify-content:center}
.ai-wizard-modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.6)}
.ai-wizard-modal-container{position:relative;background:#fff;width:80%;max-width:1100px;height:85vh;display:flex;flex-direction:column;box-shadow:0 25px 50px rgba(0,0,0,0.25)}
.ai-wizard-modal-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;border-bottom:1px solid #e5e7eb;background:#f9fafb}
.ai-wizard-loading-bar{padding:1rem 1.5rem;background:#fff;border-bottom:1px solid #e5e7eb}
.ai-wizard-loading-text{font-size:0.9rem;color:#666;margin-bottom:0.5rem;text-align:center}
.ai-wizard-barber-pole{height:8px;background:linear-gradient(45deg,#fff 25%,#E71D6A 25%,#E71D6A 50%,#fff 50%,#fff 75%,#E71D6A 75%);background-size:20px 20px;animation:barber-pole 1s linear infinite;border-radius:4px}
@keyframes barber-pole{0%{background-position:0 0}100%{background-position:20px 0}}
.ai-wizard-modal-title{margin:0;font-family:'Oswald',sans-serif;font-size:1.25rem;font-weight:500;text-transform:uppercase}
.ai-wizard-modal-close{background:none;border:none;font-size:1.75rem;cursor:pointer;color:#666}
.ai-wizard-modal-close:hover{color:#000}
.ai-wizard-loading-bar{padding:0.75rem 1.5rem;background:#f9fafb;border-bottom:1px solid #e5e7eb}
.ai-wizard-loading-text{font-family:'Oswald',sans-serif;font-size:1.25rem;font-weight:500;color:#9ca3af;margin-bottom:0.5rem;text-align:center;text-transform:uppercase}
.ai-wizard-barber-pole{height:12px;width:100%;border-radius:6px;overflow:hidden;background:linear-gradient(45deg,#E71D6A 25%,#ffffff 25%,#ffffff 50%,#E71D6A 50%,#E71D6A 75%,#ffffff 75%,#ffffff 100%);background-size:40px 40px;animation:barber-pole 0.6s linear infinite}
@keyframes barber-pole{from{background-position:0 0}to{background-position:40px 0}}
.ai-wizard-modal-body{flex:1;overflow:hidden;display:flex;flex-direction:column;padding:1.5rem}
.ai-wizard-conversation{flex:1;overflow-y:auto;padding:1rem;background:#fafafa;border:1px solid #e5e7eb;margin-bottom:1rem;min-height:0}
.ai-wizard-message{margin-bottom:1rem;padding:0.75rem 1rem}
.ai-wizard-message.user-message{background:#fff;border-left:3px solid #1a1a1a}
.ai-wizard-message.ai-message{background:#f0fdf4;border-left:3px solid #22c55e}
.ai-wizard-input-area{display:flex;gap:0.75rem;align-items:flex-end;flex-shrink:0}
.ai-wizard-input-area textarea{flex:1;padding:0.75rem;font-size:1rem;border:2px solid #d1d5db;resize:none}
.ai-wizard-input-area textarea:focus{outline:none;border-color:#1a1a1a}
.ai-wizard-modal-footer{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;border-top:1px solid #e5e7eb;background:#f9fafb;flex-shrink:0}
.ai-wizard-footer-buttons{display:flex;gap:0.75rem}
/* Review with AI Button - Centered with gap */
.ai-wizard-review-btn{margin-top:1.5rem;padding:0.5rem 1.25rem;font-family:'Oswald',sans-serif;text-transform:uppercase;color:#1a1a1a;background:transparent;border:2px solid #1a1a1a;cursor:pointer}
.ai-wizard-review-btn:hover{color:#fff;background:#1a1a1a}
.ai-wizard-form .ai-wizard-review-btn{display:block !important;margin-left:auto !important;margin-right:auto !important;width:fit-content !important;text-align:center !important;margin-top:1.5rem !important}
#ai-wizard-cancel-btn{background:#f3f4f6;border:1px solid #d1d5db;color:#374151;padding:0.5rem 1rem;cursor:pointer}
#ai-wizard-cancel-btn:hover{background:#e5e7eb}
#ai-wizard-approve-btn{background:#22c55e;border:none;color:#fff;padding:0.5rem 1.25rem;cursor:pointer;font-weight:600}
#ai-wizard-approve-btn:hover{background:#16a34a}
.ai-wizard-status.loading::after{content:'';display:inline-block;width:12px;height:12px;margin-left:8px;border:2px solid #d1d5db;border-top-color:#1a1a1a;border-radius:50%;animation:spin 0.8s linear infinite}
.ai-wizard-ready{color:#0d9488;font-weight:500}
@keyframes spin{to{transform:rotate(360deg)}}
body.ai-wizard-modal-open{overflow:hidden}

/* Hide Next button in AI Wizard forms (button is clicked programmatically) */
.ai-wizard-form #edit-actions-wizard-next,
.ai-wizard-form .webform-button--next {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Hide Submit button in AI Wizard forms (button is clicked programmatically) */
.ai-wizard-form #edit-actions-submit,
.ai-wizard-form .webform-button--submit,
.ai-wizard-form input[value="Absenden"] {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Webform Confirmation Page - Center content */
.webform-confirmation,
.webform-confirmation__message,
.webform-confirmation__back {
  text-align: center;
}
.webform-confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}
.webform-confirmation__message {
  max-width: 600px;
  margin-bottom: 2rem;
}
.webform-confirmation__back {
  margin-top: 1rem;
}

/* Summary Step Styles */
.ai-wizard-summary-container{max-width:800px;margin:2rem auto;padding:0 1rem}
.ai-wizard-summary-loading{padding:2rem;background:#f9fafb;border-radius:8px;text-align:center}
.ai-wizard-summary-loading .ai-wizard-loading-text{font-family:'Oswald',sans-serif;font-size:1.25rem;font-weight:500;color:#9ca3af;margin-bottom:1rem;text-transform:uppercase}
.ai-wizard-summary-loading .ai-wizard-barber-pole{height:12px;width:100%;border-radius:6px;overflow:hidden;background:linear-gradient(45deg,#E71D6A 25%,#ffffff 25%,#ffffff 50%,#E71D6A 50%,#E71D6A 75%,#ffffff 75%,#ffffff 100%);background-size:40px 40px;animation:barber-pole 0.6s linear infinite}
.ai-wizard-summary-content{padding:2rem;background:#fff;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:1.5rem}
.ai-wizard-summary-text{font-size:1rem;line-height:1.7;color:#1a1a1a}
.ai-wizard-summary-text h3{font-family:'Oswald',sans-serif;font-size:1.25rem;font-weight:500;color:#1a1a1a;margin:1.5rem 0 0.75rem 0;padding-bottom:0.5rem;border-bottom:2px solid #E71D6A}
.ai-wizard-summary-text h3:first-child{margin-top:0}
.ai-wizard-summary-text ul{margin:0 0 1rem 0;padding-left:1.25rem}
.ai-wizard-summary-text li{margin-bottom:0.5rem;line-height:1.5}
.ai-wizard-summary-text .audit-summary{padding:0}
.ai-wizard-summary-actions{text-align:center}
.ai-wizard-complete-btn{padding:1rem 3rem;font-family:'Oswald',sans-serif;font-size:1.25rem;font-weight:500;text-transform:uppercase;background:#22c55e;color:#fff;border:none;cursor:pointer;transition:background 0.2s}
.ai-wizard-complete-btn:hover{background:#16a34a}

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .ai-wizard-modal-container{width:90%;height:85vh;max-height:85vh}
}

/* Responsive - Mobile */
@media (max-width: 640px) {
  .ai-wizard-modal-container{width:100%;height:100%;max-width:100%;max-height:100%;border-radius:0}
  .ai-wizard-modal-header{padding:0.75rem 1rem}
  .ai-wizard-modal-body{padding:1rem}
  .ai-wizard-modal-footer{padding:0.75rem 1rem}
  .ai-wizard-input-area{flex-direction:column}
  .ai-wizard-input-area textarea{width:100%}
  .ai-wizard-input-area button{width:100%}
}

/* ============================================
   ZIGZAG PROGRESS TRACKER - Modern Design
   Theme Colors: #E71D6A (pink), #1a1a1a (dark)
   Pure CSS lines - no JavaScript needed
   ============================================ */

/* Hide Drupal's default progress tracker */
.ai-wizard-form .webform-progress-tracker {
  display: none !important;
}

/* Zigzag Wrapper */
.ai-wizard-zigzag-wrapper {
  position: relative;
  width: 100%;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

/* New Zigzag Progress Tracker */
.ai-wizard-zigzag-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 160px;
  padding: 1rem 0;
  gap: 0;
  flex-wrap: nowrap;
}

/* Step Item Container */
.ai-wizard-zigzag-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100px;
  flex-shrink: 0;
  z-index: 2;
}

/* Odd steps (1, 3, 5...) - positioned at TOP, label ABOVE */
.ai-wizard-zigzag-step:nth-child(odd) {
  align-self: flex-start;
}
.ai-wizard-zigzag-step:nth-child(odd) .ai-wizard-zigzag-label {
  order: -1;
  margin-bottom: 8px;
}

/* Even steps (2, 4, 6...) - positioned at BOTTOM, label BELOW */
.ai-wizard-zigzag-step:nth-child(even) {
  align-self: flex-end;
}
.ai-wizard-zigzag-step:nth-child(even) .ai-wizard-zigzag-label {
  order: 2;
  margin-top: 8px;
}

/* Step Circle */
.ai-wizard-zigzag-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid rgba(13, 148, 136, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #9ca3af;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

/* Step Label */
.ai-wizard-zigzag-label {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(0.6rem, 1vw, 0.85rem);
  font-weight: 500;
  text-transform: uppercase;
  color: #9ca3af;
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ===== CSS-ONLY CONNECTING LINES ===== */
/* Line from each step to the next (except last) */
.ai-wizard-zigzag-step:not(:last-child)::after {
  content: '';
  position: absolute;
  width: 95px;
  height: 3px;
  background-color: rgba(13, 148, 136, 0.3);
  z-index: 1;
  pointer-events: none;
}

/* Odd steps: line goes DOWN-RIGHT (from top circle to bottom circle) */
.ai-wizard-zigzag-step:nth-child(odd):not(:last-child)::after {
  top: calc(50% + 10px);
  left: 70%;
  transform-origin: left center;
  transform: rotate(32deg);
}

/* Even steps: line goes UP-RIGHT (from bottom circle to top circle) */
.ai-wizard-zigzag-step:nth-child(even):not(:last-child)::after {
  top: calc(50% - 10px);
  left: 70%;
  transform-origin: left center;
  transform: rotate(-32deg);
}

/* Hide the completion/last step and its connecting line */
.ai-wizard-zigzag-step:last-child {
  display: none;
}
.ai-wizard-zigzag-step:nth-last-child(2)::after {
  display: none;
}

/* Completed Step Styles */
.ai-wizard-zigzag-step.is-done .ai-wizard-zigzag-circle {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}
.ai-wizard-zigzag-step.is-done .ai-wizard-zigzag-label {
  color: #1a1a1a;
}

/* Current/Active Step Styles */
.ai-wizard-zigzag-step.is-active .ai-wizard-zigzag-circle {
  background: #53C7BA;
  border-color: rgba(83, 199, 186, 0.4);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(83, 199, 186, 0.25);
  transform: scale(1.1);
}
.ai-wizard-zigzag-step.is-active .ai-wizard-zigzag-label {
  color: #53C7BA;
  font-weight: 600;
}

/* Checkmark for completed steps */
.ai-wizard-zigzag-step.is-done .ai-wizard-zigzag-circle::after {
  content: '✓';
  font-size: 1.1rem;
}
.ai-wizard-zigzag-step.is-done .ai-wizard-zigzag-circle span {
  display: none;
}

/* Responsive - Tablet */
@media (max-width: 900px) {
  .ai-wizard-zigzag-step {
    width: 80px;
  }
  .ai-wizard-zigzag-circle {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }
  .ai-wizard-zigzag-step:not(:last-child)::after {
    width: 75px;
  }
}

/* Responsive - Mobile */
@media (max-width: 600px) {
  .ai-wizard-zigzag-wrapper {
    padding: 1rem 0;
    width: 100%;
  }
  .ai-wizard-zigzag-progress {
    min-height: 100px;
    padding: 0.5rem 0;
    width: 100%;
    justify-content: space-evenly;
  }
  .ai-wizard-zigzag-step {
    width: auto;
    min-width: 40px;
    flex: 1;
    max-width: 60px;
  }
  .ai-wizard-zigzag-circle {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
    border-width: 2px;
  }
  .ai-wizard-zigzag-label {
    font-size: 0.45rem;
    letter-spacing: 0;
  }
  .ai-wizard-zigzag-step:nth-child(odd) .ai-wizard-zigzag-label {
    margin-bottom: 5px;
  }
  .ai-wizard-zigzag-step:nth-child(even) .ai-wizard-zigzag-label {
    margin-top: 5px;
  }
  .ai-wizard-zigzag-step:not(:last-child)::after {
    width: 90%;
    height: 2px;
    left: 55%;
  }
  .ai-wizard-zigzag-step:nth-child(odd):not(:last-child)::after {
    top: calc(50% + 6px);
    transform: rotate(28deg);
  }
  .ai-wizard-zigzag-step:nth-child(even):not(:last-child)::after {
    top: calc(50% - 6px);
    transform: rotate(-28deg);
  }
}

/* Responsive - Very Small Mobile */
@media (max-width: 400px) {
  .ai-wizard-zigzag-step {
    min-width: 35px;
  }
  .ai-wizard-zigzag-circle {
    width: 24px;
    height: 24px;
    font-size: 0.6rem;
  }
  .ai-wizard-zigzag-label {
    font-size: 0.4rem;
  }
}
