/* ============================================================
   AI Assistant Wizard — Compare2Best Lighting
   ============================================================ */

/* ---- Hero ---- */
.assistant-hero {
  position: relative;
  padding: 100px 0 70px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(22,93,255,0.04) 0%, rgba(212,168,83,0.06) 100%);
}
.assistant-hero .assistant-hero-content {
  width: 100%;
}
.assistant-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 50px;
  background: rgba(212,168,83,0.1); border: 1px solid rgba(212,168,83,0.2);
  font-size: 13px; font-weight: 600; color: var(--accent-gold);
  margin-bottom: 20px;
}
.assistant-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.assistant-subtitle {
  font-size: 16px; color: var(--text-secondary);
  max-width: 520px; margin: 0 auto;
}

/* ---- Progress Bar ---- */
.wizard-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 40px;
}
.wp-step {
  display: flex; align-items: center;
}
.wp-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  border: 2px solid var(--border-light);
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all 0.3s;
  position: relative;
}
.wp-circle.active {
  border-color: #165DFF;
  background: #165DFF;
  color: #fff;
  box-shadow: 0 0 20px rgba(22,93,255,0.3);
}
.wp-circle.done {
  border-color: #00B42A;
  background: #00B42A;
  color: #fff;
}
.wp-label {
  margin-top: 8px;
  font-size: 12px; color: var(--text-muted);
  text-align: center;
}
.wp-label.active { color: #165DFF; font-weight: 600; }
.wp-label.done { color: #00B42A; }
.wp-connector {
  width: 60px; height: 2px;
  background: var(--border-light);
  margin: 0 8px;
}
.wp-connector.done { background: #00B42A; }

/* ---- Step Content ---- */
.wizard-step {
  max-width: 680px; margin: 0 auto;
}
.wizard-step h2 {
  font-size: 22px; font-weight: 700; margin-bottom: 6px;
}
.wizard-step .step-hint {
  font-size: 14px; color: var(--text-muted);
  margin-bottom: 28px;
}

/* ---- Scene Cards ---- */
.scene-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.scene-option {
  padding: 20px 12px; border-radius: 12px;
  background: var(--bg-card); border: 2px solid var(--border-subtle);
  text-align: center; cursor: pointer;
  transition: all 0.2s;
  font-size: 13px; color: var(--text-secondary);
}
.scene-option:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
}
.scene-option.selected {
  border-color: #165DFF;
  background: rgba(22,93,255,0.1);
  color: var(--text-primary);
  font-weight: 600;
}
.scene-option .scene-icon {
  font-size: 28px; display: block; margin-bottom: 8px;
}

/* ---- Parameter Form ---- */
.param-form { margin-bottom: 28px; }
.param-group { margin-bottom: 20px; }
.param-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
}
.param-label .required { color: #ff4d4f; margin-left: 2px; }
.param-input {
  width: 100%; padding: 10px 14px;
  border-radius: 8px; border: 1px solid var(--border-light);
  background: var(--bg-secondary); color: var(--text-primary);
  font-size: 14px; outline: none; transition: border-color 0.2s;
}
.param-input:focus { border-color: #165DFF; }
.param-input::placeholder { color: var(--text-muted); }
select.param-input { cursor: pointer; appearance: auto; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 6px;
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  font-size: 13px; cursor: pointer; transition: all 0.2s;
  color: var(--text-secondary);
}
.checkbox-label.has-checked {
  border-color: #165DFF; background: rgba(22,93,255,0.08); color: var(--text-primary);
}
.checkbox-label input { display: none; }

/* ---- Price Range Slider ---- */
.range-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.range-row input { flex: 1; }
.range-val {
  font-size: 14px; font-weight: 600; color: var(--accent-gold);
  white-space: nowrap;
}

/* ---- Nav Buttons ---- */
.wizard-nav {
  display: flex; gap: 12px; justify-content: space-between;
  margin-top: 32px;
}
.wizard-nav .btn {
  padding: 12px 28px; border-radius: 8px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s;
  min-width: 120px;
}
.btn-prev {
  background: var(--bg-card); color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.btn-prev:hover { background: var(--bg-card-hover); }
.btn-next {
  background: #165DFF; color: #fff;
}
.btn-next:hover { background: #0e42c7; }
.btn-generate {
  background: linear-gradient(135deg, #165DFF, #0e42c7);
  color: #fff; padding: 14px 40px; font-size: 16px;
}
.btn-generate:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(22,93,255,0.4); }

/* ---- Loading State ---- */
.loading-screen {
  text-align: center; padding: 60px 20px;
}
.loading-spinner {
  width: 48px; height: 48px; border: 3px solid var(--border-light);
  border-top-color: #165DFF; border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}
.loading-screen .loading-text {
  font-size: 16px; color: var(--text-secondary); margin-bottom: 20px;
}
.loading-steps {
  max-width: 280px; margin: 0 auto;
  text-align: left;
}
.loading-step {
  padding: 6px 0; font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.loading-step.done { color: #00B42A; }
.loading-step.active { color: var(--accent-gold); font-weight: 500; }

/* ---- Results ---- */
.ai-results {
  max-width: 900px; margin: 0 auto;
}
.result-summary {
  text-align: center; padding: 24px; margin-bottom: 32px;
  background: linear-gradient(135deg, rgba(22,93,255,0.04), rgba(212,168,83,0.04));
  border-radius: 16px; border: 1px solid var(--border-subtle);
}
.result-summary h2 { font-size: 20px; margin-bottom: 8px; }
.result-badges {
  display: flex; gap: 16px; justify-content: center;
  flex-wrap: wrap; margin-top: 16px;
}
.result-badge {
  padding: 6px 14px; border-radius: 50px;
  font-size: 12px; font-weight: 500;
  background: var(--bg-card); border: 1px solid var(--border-light);
}
.result-badge.gold { border-color: var(--accent-gold); color: var(--accent-gold); }

/* ---- Product Cards ---- */
.ai-product-card {
  display: flex; gap: 20px; padding: 20px;
  border-radius: 14px; background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px; transition: all 0.2s;
}
.ai-product-card:hover { border-color: var(--border-light); }
.ai-product-card.top1 {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(212,168,83,0.06), var(--bg-card));
}
.ai-product-rank {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 4px;
}
.ai-product-card.top1 .ai-product-rank { color: var(--accent-gold); }
.ai-product-img {
  width: 140px; height: 140px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
  background: var(--bg-secondary);
}
.ai-product-info { flex: 1; min-width: 0; }
.ai-product-name {
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
}
.ai-product-meta {
  font-size: 13px; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px;
}
.ai-product-highlights {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.ai-highlight {
  padding: 3px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 500;
  background: rgba(0,180,42,0.08);
  border: 1px solid rgba(0,180,42,0.15);
  color: #00B42A;
}
.ai-reason {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 12px;
}
.ai-reason li {
  list-style: none; padding: 2px 0;
}
.ai-reason li::before {
  content: '✓ '; color: #00B42A; font-weight: 700;
}
.ai-product-actions {
  display: flex; gap: 8px;
}
.ai-product-actions .btn-sm {
  padding: 6px 16px; border-radius: 6px;
  font-size: 12px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary); color: var(--text-secondary);
  transition: all 0.2s; text-decoration: none;
}
.ai-product-actions .btn-sm:hover {
  background: var(--bg-card-hover); border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ---- Trust Score Badge ---- */
.trust-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 50px;
  font-size: 12px; font-weight: 600;
}
.trust-badge.gold { background: rgba(212,168,83,0.12); color: var(--accent-gold); }
.trust-badge.silver { background: rgba(192,192,192,0.1); color: #c0c0c0; }
.trust-badge.bronze { background: rgba(205,127,50,0.1); color: #cd7f32; }
.trust-badge.standard { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.trust-badge.risk { background: rgba(255,77,79,0.1); color: #ff4d4f; }

/* ---- Cost Analysis ---- */
.cost-section {
  margin-top: 32px; padding: 24px;
  border-radius: 14px; background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.cost-section h3 { font-size: 16px; margin-bottom: 16px; }
.cost-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 16px;
}
.cost-box {
  padding: 16px; border-radius: 10px;
  text-align: center;
  background: var(--bg-secondary);
}
.cost-box .cost-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.cost-box .cost-val { font-size: 20px; font-weight: 700; color: var(--accent-gold); }
.cost-detail { font-size: 13px; color: var(--text-muted); line-height: 2; }

/* ---- Risk Table ---- */
.risk-section {
  margin-top: 32px; padding: 24px;
  border-radius: 14px; background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.risk-section h3 { font-size: 16px; margin-bottom: 16px; }
.risk-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.risk-bar:last-child { border-bottom: none; }
.risk-bar .risk-name { width: 100px; font-size: 13px; color: var(--text-secondary); }
.risk-bar .risk-track {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--bg-secondary); position: relative;
}
.risk-bar .risk-fill {
  height: 100%; border-radius: 3px; transition: width 0.5s;
}
.risk-bar .risk-fill.high { background: #00B42A; }
.risk-bar .risk-fill.medium { background: var(--accent-warm); }
.risk-bar .risk-fill.low { background: #ff4d4f; }
.risk-bar .risk-score { width: 40px; text-align: right; font-size: 13px; font-weight: 600; }

/* ---- AI Advice ---- */
.ai-advice {
  margin-top: 24px; padding: 16px 20px;
  border-radius: 10px;
  background: rgba(22,93,255,0.06);
  border: 1px solid rgba(22,93,255,0.12);
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.ai-advice strong { color: var(--text-primary); }

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .ai-product-card { flex-direction: column; }
  .ai-product-img {
    width: 100%; height: 180px;
  }
  .cost-summary { grid-template-columns: 1fr; }
  .scene-select-grid { grid-template-columns: repeat(3, 1fr); }
  .wp-connector { width: 30px; }
  .wizard-nav { flex-direction: column; }
  .wizard-nav .btn { width: 100%; text-align: center; }
}

/* ---- AI Compare Checkbox ---- */
.ai-compare-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}
.ai-compare-check:hover {
  color: #165DFF;
}
.ai-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #165DFF;
  cursor: pointer;
}
#ai-compare-btn {
  background: linear-gradient(135deg, #165DFF, #0e42c7);
  color: #fff;
}
#ai-compare-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(22,93,255,0.4);
}
