/* ═══ Wizard Layout ═══ */
.wizard { max-width: 720px; margin: 0 auto; }
.wizard-progress {
  display: flex; gap: 0.25rem; margin-bottom: 2rem;
}
.progress-step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 0.25rem; padding: 0.5rem 0;
  border-bottom: 3px solid #2a2d40; transition: border-color 0.2s;
}
.progress-step.active { border-color: #5b6abf; }
.progress-step.completed { border-color: #10b981; }
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600;
  background: #2a2d40; color: #666;
}
.progress-step.active .step-num { background: #5b6abf; color: #fff; }
.progress-step.completed .step-num { background: #10b981; color: #fff; }
.step-label { font-size: 0.7rem; color: #555; }
.progress-step.active .step-label { color: #aab; }

/* ═══ Wizard Body ═══ */
.wizard-body { min-height: 360px; }
.wizard-body h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.wizard-hint { color: #777; font-size: 0.9rem; margin-bottom: 1.5rem; }
.wizard-example {
  background: #12141c; border: 1px solid #2a2d40; border-radius: 8px;
  padding: 0.75rem 1rem; font-size: 0.85rem; color: #888; line-height: 1.5;
}

/* ═══ Form Elements ═══ */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: #aaa; margin-bottom: 0.4rem;
}
.char-count { font-size: 0.75rem; color: #555; }
.form-group input, .form-group textarea, .form-group select {
  display: block; width: 100%; padding: 0.65rem 0.9rem;
  background: #12141c; border: 1px solid #2a2d40; border-radius: 8px;
  color: #e0e0e0; font-size: 0.9rem; font-family: inherit;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: #5b6abf;
}
.form-group select { cursor: pointer; }
.checkbox-group label {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
  font-size: 0.9rem; color: #ccc;
}
.checkbox-group input[type="checkbox"] { width: auto; }

/* ═══ Arguments (Step 3) ═══ */
.argument-row {
  display: flex; gap: 0.75rem; align-items: flex-start;
  margin-bottom: 1rem; padding: 0.75rem;
  background: #12141c; border: 1px solid #2a2d40; border-radius: 8px;
}
.argument-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600;
  background: #2a2d40; color: #888; flex-shrink: 0; margin-top: 0.3rem;
}
.argument-fields { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.argument-fields input, .argument-fields textarea {
  width: 100%; padding: 0.5rem 0.75rem;
  background: #181a24; border: 1px solid #2a2d40; border-radius: 6px;
  color: #e0e0e0; font-size: 0.85rem; font-family: inherit;
}
.argument-fields input:focus, .argument-fields textarea:focus {
  outline: none; border-color: #5b6abf;
}

/* ═══ Structure (Step 5) ═══ */
.structure-section { margin-bottom: 1.25rem; }
.structure-label { font-size: 0.85rem; color: #aaa; margin-bottom: 0.4rem; font-weight: 600; }
.structure-section textarea {
  display: block; width: 100%; padding: 0.6rem 0.85rem;
  background: #12141c; border: 1px solid #2a2d40; border-radius: 8px;
  color: #e0e0e0; font-size: 0.9rem; font-family: inherit; resize: vertical;
}
.structure-section textarea:focus { outline: none; border-color: #5b6abf; }
.structure-part {
  background: #12141c; border: 1px solid #2a2d40; border-radius: 8px;
  padding: 0.75rem; margin-bottom: 0.5rem;
}
.structure-part-header {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
}
.part-numeral { font-size: 0.85rem; color: #7c8cf5; font-weight: 600; white-space: nowrap; }
.structure-title {
  flex: 1; padding: 0.4rem 0.65rem;
  background: #181a24; border: 1px solid #2a2d40; border-radius: 6px;
  color: #e0e0e0; font-size: 0.85rem;
}
.structure-title:focus { outline: none; border-color: #5b6abf; }
.part-reorder { display: flex; gap: 0.25rem; }
.structure-desc {
  width: 100%; padding: 0.4rem 0.65rem;
  background: #181a24; border: 1px solid #2a2d40; border-radius: 6px;
  color: #e0e0e0; font-size: 0.8rem; font-family: inherit; resize: vertical;
}
.structure-desc:focus { outline: none; border-color: #5b6abf; }

/* ═══ Review (Step 6) ═══ */
.review-card {
  background: #181a24; border: 1px solid #2a2d40; border-radius: 12px;
  padding: 1.25rem;
}
.review-section {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 0.75rem 0; border-bottom: 1px solid #1e2030;
}
.review-section:last-child { border-bottom: none; }
.review-label { width: 100px; font-size: 0.85rem; color: #666; flex-shrink: 0; padding-top: 0.1rem; }
.review-value { flex: 1; font-size: 0.9rem; color: #ccc; line-height: 1.4; }
.review-edit { font-size: 0.8rem; color: #7c8cf5; flex-shrink: 0; }
.review-parts-list { list-style: none; padding: 0; }
.review-parts-list li { margin-bottom: 0.3rem; font-size: 0.85rem; }
.article-count-info {
  text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: #888;
}

/* ═══ Warning Banner ═══ */
.warning-banner {
  background: #422006; border: 1px solid #854d0e; border-radius: 8px;
  padding: 0.75rem 1rem; color: #fbbf24; font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* ═══ AI Suggestions ═══ */
.ai-btn { margin-bottom: 0.5rem; }
.ai-hint { font-size: 0.8rem; color: #555; margin-bottom: 0.75rem; }
.ai-suggestions { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.ai-suggestion-card {
  background: #12141c; border: 1px solid #2a2d40; border-radius: 8px;
  padding: 0.85rem 1rem; margin-bottom: 0.5rem; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ai-suggestion-card:hover { border-color: #5b6abf; }
.ai-suggestion-card.selected { border-color: #7c8cf5; background: #1a1d2b; }
.ai-suggestion-card h4 { font-size: 0.95rem; color: #e0e0e0; margin-bottom: 0.25rem; }
.ai-suggestion-card p { font-size: 0.85rem; color: #888; line-height: 1.4; margin: 0; }
.ai-loading {
  text-align: center; padding: 1.5rem; color: #7c8cf5; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.spinner {
  width: 18px; height: 18px; border: 2px solid #2a2d40; border-top-color: #7c8cf5;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══ Source Results (Step 4) ═══ */
.source-results { margin-top: 1rem; }
.source-category { margin-bottom: 1.25rem; }
.source-category-title {
  font-size: 0.9rem; color: #7c8cf5; font-weight: 600;
  margin-bottom: 0.5rem; padding-bottom: 0.3rem;
  border-bottom: 1px solid #1e2030;
}
.source-item {
  background: #12141c; border: 1px solid #2a2d40; border-radius: 8px;
  padding: 0.65rem 0.85rem; margin-bottom: 0.4rem; font-size: 0.85rem;
}
.source-item strong { color: #ddd; }
.source-desc { color: #777; font-size: 0.8rem; }
.source-url { color: #5b6abf; font-size: 0.75rem; word-break: break-all; }

/* ═══ Wizard Footer ═══ */
.wizard-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #1e2030;
}

/* Sub-arguments */
.sub-arguments {
  margin: 0.5rem 0 0.5rem 2.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid #2a2d40;
}
.sub-arg-row {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.sub-arg-label {
  color: #5b6abf; font-weight: 600; font-size: 0.85rem;
  min-width: 20px; padding-top: 0.6rem;
}
.sub-arg-fields { flex: 1; }
.sub-arg-fields input {
  width: 100%; background: #12141c; border: 1px solid #2a2d40;
  border-radius: 6px; color: #e0e0e0; padding: 0.5rem 0.7rem;
  font-size: 0.85rem; font-family: inherit; margin-bottom: 0.3rem;
}
.sub-arg-fields input:focus { outline: none; border-color: #5b6abf; }
.sub-arg-fields textarea {
  width: 100%; background: #12141c; border: 1px solid #2a2d40;
  border-radius: 6px; color: #e0e0e0; padding: 0.5rem 0.7rem;
  font-size: 0.8rem; font-family: inherit; resize: vertical;
}
.sub-arg-fields textarea:focus { outline: none; border-color: #5b6abf; }
.add-sub-arg {
  color: #5b6abf; font-size: 0.8rem; cursor: pointer;
  background: none; border: none; padding: 0.25rem 0;
  margin-top: 0.25rem;
}
.add-sub-arg:hover { text-decoration: underline; }
