/* Product Spec Generator — Wizard & Preview Styles */

.spec-wizard {
  max-width: 640px;
  margin: 0 auto;
}

/* Progress bar */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 12px 0;
}
.progress-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #e5e7eb;
  color: #9ca3af;
  transition: all 0.2s;
}
.progress-step.active {
  background: #7C3AED;
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}
.progress-step.done {
  background: #10b981;
  color: #fff;
}
.progress-connector {
  width: 32px;
  height: 2px;
  background: #e5e7eb;
  transition: background 0.2s;
}
.progress-connector.done {
  background: #10b981;
}

/* Template cards */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.template-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  background: #fff;
}
.template-card:hover {
  border-color: #7C3AED;
  box-shadow: 0 2px 8px rgba(124,58,237,0.1);
}
.template-card.selected {
  border-color: #7C3AED;
  background: rgba(124,58,237,0.05);
}
.template-card .tpl-icon {
  font-size: 24px;
  margin-bottom: 6px;
}
.template-card .tpl-title {
  font-weight: 700;
  font-size: 14px;
  color: #1f2937;
}
.template-card .tpl-desc {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* Step content container */
.step-content {
  display: none;
}
.step-content.active {
  display: block;
  animation: fadeIn 0.2s;
}

/* Step navigation */
.step-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.step-nav .btn {
  flex: 1;
}
.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.btn-secondary:hover {
  background: #e5e7eb;
}

/* Two-column layout for wizard + preview */
.generator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .generator-layout {
    grid-template-columns: 1fr;
  }
}

/* Live preview panel */
.preview-panel {
  position: sticky;
  top: 20px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.preview-panel .preview-header-bar {
  background: #1f2937;
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px 12px 0 0;
  font-size: 13px;
  font-weight: 600;
}
.preview-panel .preview-header-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  margin-right: 6px;
  animation: pulse 1.5s infinite;
}
.preview-body {
  background: #111827;
  color: #d1d5db;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.65;
  padding: 16px;
  overflow-y: auto;
  border-radius: 0 0 12px 12px;
  flex: 1;
  white-space: pre-wrap;
  max-height: 75vh;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Saved indicator */
.saved-indicator {
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
  margin-top: 4px;
}

/* Export bar */
.export-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.export-bar .btn {
  flex: none;
  padding: 8px 14px;
  font-size: 13px;
}

/* Full PRD output */
.full-prd-output {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.full-prd-output h2 {
  color: #1f2937;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 6px;
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 16px;
}
.full-prd-output h2:first-child {
  margin-top: 0;
}
.full-prd-output h3 {
  color: #374151;
  font-size: 14px;
  margin-top: 12px;
}
.full-prd-output p, .full-prd-output li {
  line-height: 1.6;
  font-size: 14px;
}
.full-prd-output ul {
  padding-left: 20px;
  margin: 4px 0;
}

/* Spec output textarea */
.spec-output-full {
  width: 100%;
  min-height: 400px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  resize: vertical;
  background: #f9fafb;
}

/* Risk item */
.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.risk-severity {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}
.risk-high { background: #fee2e2; color: #dc2626; }
.risk-med { background: #fef3c7; color: #d97706; }
.risk-low { background: #d1fae5; color: #059669; }

/* Toast notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast-notification.show {
  opacity: 1;
}
