/* Interactive Flow Demo - OpenAI-style but native to Chilla */

.interactive-demo-section {
  background: #fafafa;
  padding: 4rem 0;
  position: relative;
}

.demo-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Mobile: Stack vertically */
@media (max-width: 968px) {
  .demo-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .interactive-demo-section {
    padding: 2rem 0;
  }
  
  .demo-container {
    padding: 0 1rem;
  }
}

/* Left Side - Text */
.demo-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.demo-headline {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
  margin: 0;
}

.demo-subtext {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

.demo-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Mobile text adjustments */
@media (max-width: 768px) {
  .demo-headline {
    font-size: 1.75rem;
  }
  
  .demo-subtext {
    font-size: 1rem;
  }
  
  .demo-cta-group {
    flex-direction: column;
  }
  
  .demo-cta-group .btn {
    width: 100%;
    text-align: center;
  }
}

/* Right Side - Interactive Panel */
.demo-panel-container {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  min-height: 500px;
  position: relative;
  overflow: hidden;
}

/* Mobile: Reduce padding and min-height */
@media (max-width: 768px) {
  .demo-panel-container {
    padding: 1.5rem;
    min-height: 400px;
  }
}

.demo-card {
  display: none;
  animation: fadeIn 0.4s ease;
}

.demo-card.active {
  display: block;
}

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

.demo-card-header {
  font-size: 1.125rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

/* Broker Connect Card */
.broker-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 1rem;
  gap: 1rem;
}

@media (max-width: 480px) {
  .broker-status {
    padding: 0.875rem;
    gap: 0.75rem;
    flex-wrap: wrap;
  }
}

.broker-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.broker-name {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
}

@media (max-width: 480px) {
  .broker-name {
    font-size: 0.9375rem;
  }
}

.broker-status-text {
  font-size: 0.875rem;
  color: #888;
}

@media (max-width: 480px) {
  .broker-status-text {
    font-size: 0.8125rem;
  }
}

.broker-status-text.connected {
  color: #16a34a;
  font-weight: 500;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #16a34a;
  color: #fff;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  animation: scaleIn 0.3s ease;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .status-badge {
    padding: 0.4375rem 0.875rem;
    font-size: 0.8125rem;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

/* Wizard Steps */
.wizard-step-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (max-width: 480px) {
  .wizard-step-content {
    gap: 1rem;
  }
}

.step-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
}

@media (max-width: 480px) {
  .step-description {
    font-size: 0.875rem;
  }
}

.behavior-option {
  padding: 1rem;
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (max-width: 480px) {
  .behavior-option {
    padding: 0.875rem;
  }
}

.behavior-option:hover {
  border-color: #000;
  background: #fff;
}

.behavior-option.selected {
  border-color: #000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.behavior-name {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
  .behavior-name {
    font-size: 0.9375rem;
  }
}

.behavior-description {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .behavior-description {
    font-size: 0.8125rem;
  }
}

/* Playground Selection */
.playground-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

/* Mobile: Keep 2 columns but smaller */
@media (max-width: 480px) {
  .playground-grid {
    gap: 0.5rem;
  }
}

.playground-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #000;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Mobile: Smaller padding */
@media (max-width: 480px) {
  .playground-item {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
}

.playground-item.selected {
  border-color: #16a34a;
  background: #f0fdf4;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  background: #fff;
}

.playground-item.selected .checkmark {
  background: #16a34a;
  border-color: #16a34a;
}

/* Comfort Slider */
.comfort-slider-container {
  padding: 1.5rem 0;
}

@media (max-width: 480px) {
  .comfort-slider-container {
    padding: 1rem 0;
  }
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #666;
}

@media (max-width: 480px) {
  .slider-labels {
    font-size: 0.8125rem;
    margin-bottom: 0.75rem;
  }
}

.comfort-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.comfort-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comfort-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .comfort-slider::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }
  
  .comfort-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
  }
}

.comfort-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.comfort-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .comfort-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }
  
  .comfort-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
  }
}

.comfort-value {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: #000;
  margin-top: 1rem;
}

@media (max-width: 480px) {
  .comfort-value {
    font-size: 1rem;
    margin-top: 0.75rem;
  }
}

.comfort-subtext {
  text-align: center;
  font-size: 0.875rem;
  color: #666;
  margin-top: 0.5rem;
}

@media (max-width: 480px) {
  .comfort-subtext {
    font-size: 0.8125rem;
    margin-top: 0.375rem;
  }
}

/* Consent */
.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .consent-item {
    padding: 0.875rem;
    gap: 0.625rem;
  }
}

.consent-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .consent-checkbox {
    width: 24px;
    height: 24px;
  }
}

.consent-checkbox.checked {
  background: #000;
  border-color: #000;
  color: #fff;
}

.consent-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

@media (max-width: 480px) {
  .consent-text {
    font-size: 0.875rem;
  }
}

/* Flow Card */
.flow-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.flow-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 8px;
  animation: slideInLeft 0.5s ease;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.flow-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.flow-icon.success {
  background: #16a34a;
}

.flow-icon.info {
  background: #3b82f6;
}

.flow-icon.monitoring {
  background: #f59e0b;
}

.flow-content {
  flex: 1;
}

.flow-message-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  margin-bottom: 0.25rem;
}

.flow-message-meta {
  font-size: 0.75rem;
  color: #888;
}

/* Demo Buttons */
.demo-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Mobile: Full width buttons */
@media (max-width: 480px) {
  .demo-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    width: 100%;
  }
  
  .demo-actions {
    flex-direction: column;
  }
  
  .demo-actions .demo-btn {
    width: 100%;
  }
}

.demo-btn-primary {
  background: #000;
  color: #fff;
}

.demo-btn-primary:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Disable hover transform on mobile */
@media (max-width: 768px) {
  .demo-btn-primary:hover {
    transform: none;
  }
  
  .demo-btn-primary:active {
    transform: scale(0.98);
  }
}

.demo-btn-secondary {
  background: #fff;
  color: #000;
  border: 2px solid #e0e0e0;
}

.demo-btn-secondary:hover {
  border-color: #000;
  transform: translateY(-2px);
}

.demo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.demo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

@media (max-width: 480px) {
  .demo-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Step Progress */
.demo-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 480px) {
  .demo-progress {
    gap: 0.375rem;
    margin-bottom: 1.5rem;
  }
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e0e0e0;
  transition: all 0.3s ease;
}

@media (max-width: 480px) {
  .progress-dot {
    width: 8px;
    height: 8px;
  }
}

.progress-dot.active {
  background: #000;
  width: 30px;
  border-radius: 5px;
}

@media (max-width: 480px) {
  .progress-dot.active {
    width: 24px;
    border-radius: 4px;
  }
}

.progress-dot.completed {
  background: #16a34a;
}

/* Restart Demo Button */
.restart-demo {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.restart-demo:hover {
  border-color: #000;
  color: #000;
}

/* Mobile: Smaller restart button */
@media (max-width: 480px) {
  .restart-demo {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Demo card header */
.demo-card-header {
  font-size: 1.125rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

@media (max-width: 480px) {
  .demo-card-header {
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }
}

/* Step description */
.step-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
}

@media (max-width: 480px) {
  .step-description {
    font-size: 0.875rem;
  }
}

/* Flow messages container */
.flow-messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

@media (max-width: 768px) {
  .flow-messages {
    max-height: 300px;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .flow-messages {
    max-height: 250px;
    padding-right: 0.25rem;
  }
}

/* Flow message */
.flow-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 8px;
  animation: slideInLeft 0.5s ease;
  opacity: 0;
  animation-fill-mode: forwards;
}

@media (max-width: 480px) {
  .flow-message {
    gap: 0.5rem;
    padding: 0.625rem;
  }
}

.flow-message-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  margin-bottom: 0.25rem;
}

.flow-message-meta {
  font-size: 0.75rem;
  color: #888;
}

@media (max-width: 480px) {
  .flow-message-text {
    font-size: 0.875rem;
  }
  
  .flow-message-meta {
    font-size: 0.6875rem;
  }
}
