/* Lead Analyzer - Onboarding Styles */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Onboarding wizard styles */
.onboarding-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.onboarding-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 900px;
}
.onboarding-box h1 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
}
.onboarding-box h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #333;
}
.onboarding-box p {
  color: #64748b;
  margin-bottom: 25px;
}

/* Progress steps */
.progress-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 10px;
}
.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: all 0.3s;
}
.step-dot.active { background: #667eea; transform: scale(1.2); }
.step-dot.completed { background: #10b981; }

/* Plugin selection grid */
.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.plugin-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.plugin-card:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}
.plugin-card.selected {
  border-color: #667eea;
  background: #f0f4ff;
}
.plugin-card .icon {
  font-size: 40px;
  margin-bottom: 10px;
}
.plugin-card .name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 5px;
}
.plugin-card .desc {
  font-size: 13px;
  color: #64748b;
}
.plugin-card .check {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: #10b981;
  border-radius: 50%;
  color: white;
  line-height: 24px;
}
.plugin-card.selected .check { display: block; }

/* Form styles */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: #333;
}
.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.form-group .help-text {
  font-size: 12px;
  color: #64748b;
  margin-top: 5px;
}
.form-group .help-text a {
  color: #667eea;
  text-decoration: none;
}
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

/* Form sections and rows */
.form-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}
.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 16px;
}
.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px 0;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Checkbox group for multiselect */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.2s;
}
.checkbox-item:hover {
  background: #e2e8f0;
}
.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.checkbox-item span {
  font-size: 14px;
  color: #333;
}

/* Validation status */
.validation-status {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: none;
}
.validation-status.success {
  display: block;
  background: #dcfce7;
  color: #166534;
}
.validation-status.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
}
.validation-status.loading {
  display: block;
  background: #e0f2fe;
  color: #0369a1;
}

/* Configured sources summary */
.sources-summary {
  margin-bottom: 25px;
}
.source-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 10px;
}
.source-item .icon { font-size: 24px; }
.source-item .info { flex: 1; }
.source-item .name { font-weight: 600; }
.source-item .count { font-size: 13px; color: #64748b; }
.source-item .status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}
.btn-success:hover { opacity: 0.9; }
.btn-secondary {
  background: #e2e8f0;
  color: #475569;
}
.btn-secondary:hover { background: #cbd5e1; }
.btn-google {
  background: white;
  color: #333;
  border: 1px solid #dadce0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}
.btn-google:hover { background: #f8f9fa; border-color: #c6c6c6; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.button-group {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 20px;
}
.button-group.center { justify-content: center; }

/* Loading spinner */
.loading { text-align: center; padding: 40px; color: #64748b; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}
.mini-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Products list */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.product-header {
  display: grid;
  grid-template-columns: 1fr 80px 80px 80px 120px 28px;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.product-item {
  display: grid;
  grid-template-columns: 1fr 80px 80px 80px 120px 28px;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  align-items: center;
}
.product-item input {
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 13px;
}
.product-item input::placeholder {
  color: #94a3b8;
}
.product-item .remove-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  line-height: 1;
}
.product-item .remove-btn:hover {
  color: #dc2626;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  background: #333;
  color: white;
  border-radius: 8px;
  display: none;
  z-index: 1001;
}
.toast.show { display: block; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }
