@import 'ui-design-system/src/styles/semantic';
.demo-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h2 {
  color: #2c3e50;
  font-size: 2rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #6366f1;
  padding-bottom: 0.5rem;
}

h3 {
  color: #374151;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h4 {
  color: #6b7280;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

// Sections
.demo-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: #ffffff;
}

.intro-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: #f8fafc;

  p {
    margin-bottom: 1rem;
    color: #6b7280;
  }
}

.info-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #dbeafe;
  border-radius: 6px;
  border-left: 4px solid #3b82f6;

  .info-icon {
    color: #3b82f6;
  }

  span {
    color: #1f2937;
  }
}

// Icon Grid
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.icon-example {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: #f3f4f6;
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .icon-name {
    font-weight: 600;
    color: #1f2937;
    margin: 0.5rem 0 0.25rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
  }

  .icon-usage {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  code {
    font-size: 0.75rem;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #6b7280;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    text-align: center;
  }
}

// Size Demo
.size-demo {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.size-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 6px;

  .size-label {
    font-weight: 600;
    min-width: 30px;
    color: #1f2937;
  }

  fa-icon {
    color: #6366f1;
    min-width: 80px;
    text-align: center;
  }

  code {
    background: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #6b7280;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
  }
}

// Styling Demo
.styling-demo {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.style-example {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 6px;

  h4 {
    margin-bottom: 1rem;
  }
}

.color-row,
.animation-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;

  fa-icon {
    flex-shrink: 0;
  }
}

// Use Cases
.use-cases {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.use-case {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 6px;
}

.nav-example {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;

  fa-icon {
    margin-right: 0.5rem;
    color: #6366f1;
  }
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-row {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;

  &.success {
    background: #dcfce7;
    color: #166534;
    
    fa-icon {
      color: #22c55e;
    }
  }

  &.warning {
    background: #fef3c7;
    color: #92400e;
    
    fa-icon {
      color: #f59e0b;
    }
  }

  &.error {
    background: #fee2e2;
    color: #991b1b;
    
    fa-icon {
      color: #ef4444;
    }
  }

  &.info {
    background: #dbeafe;
    color: #1e40af;
    
    fa-icon {
      color: #3b82f6;
    }
  }
}

// Code Examples
.code-examples {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.code-example {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 6px;

  h4 {
    margin-bottom: 0.5rem;
    color: #6366f1;
  }

  pre {
    margin: 0;
    background: #ffffff;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;

    code {
      font-family: 'JetBrains Mono', 'Courier New', monospace;
      color: #1f2937;
      font-size: 0.875rem;
      line-height: 1.5;
    }
  }
}

// Selected Icon Details
.selected-icon {
  background: #ede9fe;
  border-color: #6366f1;
}

.icon-details {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;

  @media (max-width: 768px) {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
}

.icon-display {
  flex-shrink: 0;
  padding: 2rem;
  background: #ffffff;
  border-radius: 8px;
  border: 2px solid #6366f1;

  fa-icon {
    color: #6366f1;
  }
}

.icon-info {
  flex: 1;

  h4 {
    color: #5b21b6;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
  }

  p {
    margin-bottom: 0.75rem;
    color: #1f2937;
  }
}

.copy-code {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;

  code {
    flex: 1;
    background: none;
    color: #1f2937;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
  }
}

// Interactive Demo
.action-feedback {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #dbeafe;
  border-radius: 6px;
  border-left: 4px solid #3b82f6;

  fa-icon {
    color: #3b82f6;
  }

  span {
    color: #1f2937;
  }
}

.interactive-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

// Best Practices
.best-practices {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.practice-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;

  .practice-icon {
    flex-shrink: 0;
    margin-top: 0.25rem;

    &.success {
      color: #22c55e;
    }

    &.warning {
      color: #f59e0b;
    }
  }

  .practice-content {
    flex: 1;

    h4 {
      color: #1f2937;
      margin-bottom: 0.5rem;
    }

    p {
      color: #6b7280;
      margin-bottom: 0.75rem;
      line-height: 1.5;
    }

    code {
      background: #f3f4f6;
      padding: 0.25rem 0.5rem;
      border-radius: 4px;
      color: #374151;
      font-family: 'JetBrains Mono', 'Courier New', monospace;
      font-size: 0.875rem;
    }
  }
}

// Quick Reference
.reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.reference-category {
  padding: 1rem;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e5e7eb;

  h4 {
    color: #6366f1;
    margin-bottom: 1rem;
    font-weight: 600;
  }
}

.reference-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;

  code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #6366f1;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 600;
    margin-right: 0.5rem;
  }
}

// Responsive Design
@media (max-width: 768px) {
  .demo-container {
    padding: 1rem;
  }

  .icon-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .action-buttons,
  .interactive-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-example {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .status-row {
    flex-direction: column;
    gap: 1rem;
  }

  .size-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .color-row,
  .animation-row {
    justify-content: center;
  }
}