/* ============================================================
   AI Specification Assistant — Yakeen Lighting
   Guided specification wizard for architects & designers
   ============================================================ */

.ai-assistant {
  position: relative;
  background: linear-gradient(135deg, #1a1714 0%, #2a2520 50%, #1a1714 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(184, 144, 74, 0.2);
}

.ai-assistant::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #B8904A, transparent);
}

.ai-assistant-header {
  padding: 32px 40px 24px;
  border-bottom: 1px solid rgba(184, 144, 74, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
}

.ai-assistant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #B8904A, #D4BC8A);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-assistant-avatar svg {
  width: 24px;
  height: 24px;
  color: #1a1714;
}

.ai-assistant-title h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.ai-assistant-title p {
  font-size: 0.85rem;
  color: #8a7e6d;
  margin: 4px 0 0 0;
}

.ai-assistant-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(184, 144, 74, 0.15);
  color: #D4BC8A;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ai-assistant-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.ai-assistant-body {
  padding: 32px 40px;
  min-height: 380px;
}

/* Progress steps */
.ai-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.ai-step {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  position: relative;
  transition: background 0.3s;
}

.ai-step.active {
  background: linear-gradient(90deg, #B8904A, #D4BC8A);
}

.ai-step.done {
  background: #B8904A;
}

.ai-step-label {
  position: absolute;
  top: 10px;
  left: 0;
  font-size: 0.65rem;
  color: #666;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ai-step.active .ai-step-label,
.ai-step.done .ai-step-label {
  color: #D4BC8A;
}

/* Question */
.ai-question {
  margin-bottom: 24px;
}

.ai-question-label {
  font-size: 0.75rem;
  color: #8a7e6d;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ai-question-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.3;
}

.ai-question-text em {
  color: #D4BC8A;
  font-style: italic;
}

/* Options grid */
.ai-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.ai-option {
  padding: 20px 20px;
  border: 1px solid rgba(184, 144, 74, 0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.ai-option:hover {
  border-color: rgba(184, 144, 74, 0.5);
  background: rgba(184, 144, 74, 0.05);
  transform: translateY(-1px);
}

.ai-option.selected {
  border-color: #B8904A;
  background: rgba(184, 144, 74, 0.1);
}

.ai-option-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.ai-option-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
}

.ai-option-desc {
  font-size: 0.75rem;
  color: #8a7e6d;
  line-height: 1.4;
}

/* Multi-select tags */
.ai-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.ai-tag {
  padding: 8px 16px;
  border: 1px solid rgba(184, 144, 74, 0.25);
  border-radius: 100px;
  background: transparent;
  color: #B8904A;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.ai-tag:hover {
  border-color: #B8904A;
  background: rgba(184, 144, 74, 0.1);
}

.ai-tag.selected {
  background: #B8904A;
  color: #1a1714;
  border-color: #B8904A;
  font-weight: 500;
}

/* Navigation */
.ai-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(184, 144, 74, 0.1);
}

.ai-nav-back {
  background: none;
  border: none;
  color: #8a7e6d;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 8px 16px;
  font-family: inherit;
  transition: color 0.2s;
}

.ai-nav-back:hover {
  color: #fff;
}

.ai-nav-back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ai-nav-next {
  padding: 10px 28px;
  background: linear-gradient(135deg, #B8904A, #D4BC8A);
  border: none;
  border-radius: 6px;
  color: #1a1714;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}

.ai-nav-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(184, 144, 74, 0.3);
}

.ai-nav-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Results */
.ai-results {
  animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-results-header {
  margin-bottom: 24px;
}

.ai-results-summary {
  font-size: 0.85rem;
  color: #8a7e6d;
  margin-top: 8px;
  line-height: 1.6;
}

.ai-results-summary strong {
  color: #D4BC8A;
  font-weight: 500;
}

.ai-product-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  border: 1px solid rgba(184, 144, 74, 0.15);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 12px;
  transition: all 0.2s;
}

.ai-product-card:hover {
  border-color: rgba(184, 144, 74, 0.35);
  background: rgba(184, 144, 74, 0.03);
}

.ai-product-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(184, 144, 74, 0.15), rgba(184, 144, 74, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}

.ai-product-info {
  flex: 1;
}

.ai-product-name {
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 4px;
}

.ai-product-desc {
  font-size: 0.8rem;
  color: #8a7e6d;
  line-height: 1.5;
  margin-bottom: 10px;
}

.ai-product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-spec-tag {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(184, 144, 74, 0.1);
  color: #D4BC8A;
  letter-spacing: 0.02em;
}

.ai-product-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  flex-shrink: 0;
}

.ai-product-link {
  font-size: 0.75rem;
  color: #B8904A;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.ai-product-link:hover {
  color: #D4BC8A;
}

/* Spec summary card */
.ai-spec-summary {
  margin-top: 28px;
  padding: 24px;
  border-radius: 10px;
  background: rgba(184, 144, 74, 0.05);
  border: 1px solid rgba(184, 144, 74, 0.15);
}

.ai-spec-summary h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: #fff;
  margin: 0 0 16px 0;
}

.ai-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.ai-spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-spec-label {
  font-size: 0.7rem;
  color: #8a7e6d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ai-spec-value {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 500;
}

.ai-results-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.ai-result-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ai-result-btn--primary {
  background: linear-gradient(135deg, #B8904A, #D4BC8A);
  border: none;
  color: #1a1714;
}

.ai-result-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(184, 144, 74, 0.3);
}

.ai-result-btn--secondary {
  background: transparent;
  border: 1px solid rgba(184, 144, 74, 0.3);
  color: #D4BC8A;
}

.ai-result-btn--secondary:hover {
  border-color: #B8904A;
  background: rgba(184, 144, 74, 0.05);
}

/* Restart */
.ai-restart {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.ai-restart-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}

.ai-restart-btn:hover {
  color: #D4BC8A;
}

/* Typing indicator */
.ai-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px 0;
  justify-content: center;
}

.ai-thinking-dots {
  display: flex;
  gap: 4px;
}

.ai-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #B8904A;
  animation: thinkingBounce 1.4s ease-in-out infinite;
}

.ai-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.ai-thinking-text {
  font-size: 0.85rem;
  color: #8a7e6d;
}

/* Responsive */
@media (max-width: 768px) {
  .ai-assistant-header {
    padding: 24px 20px 16px;
    flex-wrap: wrap;
  }
  
  .ai-assistant-body {
    padding: 24px 20px;
    min-height: auto;
  }
  
  .ai-question-text {
    font-size: 1.4rem;
  }
  
  .ai-options {
    grid-template-columns: 1fr 1fr;
  }
  
  .ai-product-card {
    flex-direction: column;
    gap: 12px;
  }
  
  .ai-product-cta {
    flex-direction: row;
    justify-content: flex-start;
  }
  
  .ai-assistant-badge {
    margin-left: 0;
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .ai-options {
    grid-template-columns: 1fr;
  }
  
  .ai-step-label {
    display: none;
  }
}
