@use 'ui-design-system/src/styles/semantic/index' as *;

.demo-container {
  padding: $semantic-spacing-layout-section-sm;
  max-width: 1200px;
  margin: 0 auto;
}

.demo-section {
  margin-bottom: $semantic-spacing-layout-section-md;
  
  h2 {
    font-family: map-get($semantic-typography-heading-h2, font-family);
    font-size: map-get($semantic-typography-heading-h2, font-size);
    font-weight: map-get($semantic-typography-heading-h2, font-weight);
    line-height: map-get($semantic-typography-heading-h2, line-height);
    color: $semantic-color-text-primary;
    margin: 0 0 $semantic-spacing-content-heading 0;
  }
  
  h3 {
    font-family: map-get($semantic-typography-heading-h3, font-family);
    font-size: map-get($semantic-typography-heading-h3, font-size);
    font-weight: map-get($semantic-typography-heading-h3, font-weight);
    line-height: map-get($semantic-typography-heading-h3, line-height);
    color: $semantic-color-text-primary;
    margin: 0 0 $semantic-spacing-component-lg 0;
    border-bottom: 1px solid $semantic-color-border-primary;
    padding-bottom: $semantic-spacing-component-sm;
  }
  
  h4 {
    font-family: map-get($semantic-typography-heading-h4, font-family);
    font-size: map-get($semantic-typography-heading-h4, font-size);
    font-weight: map-get($semantic-typography-heading-h4, font-weight);
    line-height: map-get($semantic-typography-heading-h4, line-height);
    color: $semantic-color-text-secondary;
    margin: 0 0 $semantic-spacing-component-md 0;
  }
}

.demo-subsection {
  margin-bottom: $semantic-spacing-component-xl;
  padding: $semantic-spacing-component-lg;
  background: $semantic-color-surface-secondary;
  border-radius: $semantic-border-radius-lg;
  border: 1px solid $semantic-color-border-primary;
}

.demo-row {
  display: flex;
  gap: $semantic-spacing-component-xl;
  flex-wrap: wrap;
  margin-bottom: $semantic-spacing-component-lg;
}

.demo-item {
  flex: 1;
  min-width: 300px;
  padding: $semantic-spacing-component-lg;
  background: $semantic-color-surface-primary;
  border: 1px solid $semantic-color-border-primary;
  border-radius: $semantic-border-radius-md;
}

.vertical-stepper-container {
  max-width: 400px;
  padding: $semantic-spacing-component-lg;
  background: $semantic-color-surface-primary;
  border: 1px solid $semantic-color-border-primary;
  border-radius: $semantic-border-radius-md;
}

.interactive-example {
  padding: $semantic-spacing-component-xl;
  background: $semantic-color-surface-primary;
  border: 2px solid $semantic-color-border-primary;
  border-radius: $semantic-border-radius-lg;
  margin-bottom: $semantic-spacing-component-lg;
}

.demo-controls {
  display: flex;
  gap: $semantic-spacing-component-sm;
  margin-top: $semantic-spacing-component-lg;
  padding: $semantic-spacing-component-md;
  background: $semantic-color-surface-secondary;
  border-radius: $semantic-border-radius-sm;
  flex-wrap: wrap;
}

.demo-button {
  display: flex;
  align-items: center;
  gap: $semantic-spacing-component-xs;
  padding: $semantic-spacing-interactive-button-padding-y $semantic-spacing-interactive-button-padding-x;
  background: $semantic-color-brand-primary;
  color: $semantic-color-on-brand-primary;
  border: none;
  border-radius: $semantic-border-radius-sm;
  font-family: map-get($semantic-typography-button-medium, font-family);
  font-size: map-get($semantic-typography-button-medium, font-size);
  font-weight: map-get($semantic-typography-button-medium, font-weight);
  cursor: pointer;
  transition: all $semantic-motion-duration-fast $semantic-motion-easing-ease;
  
  &:hover {
    background: $semantic-color-brand-secondary;
    transform: translateY(-1px);
    box-shadow: $semantic-shadow-elevation-2;
  }
  
  &:focus-visible {
    outline: 2px solid $semantic-color-brand-primary;
    outline-offset: 2px;
  }
  
  &:active {
    transform: translateY(0);
    box-shadow: $semantic-shadow-elevation-1;
  }
  
  fa-icon {
    font-size: $semantic-sizing-icon-inline;
  }
}

.step-info {
  margin-top: $semantic-spacing-component-lg;
  padding: $semantic-spacing-component-md;
  background: $semantic-color-surface-elevated;
  border-radius: $semantic-border-radius-sm;
  border-left: 4px solid $semantic-color-brand-primary;
  
  p {
    margin: 0 0 $semantic-spacing-content-line-tight 0;
    font-family: map-get($semantic-typography-body-small, font-family);
    font-size: map-get($semantic-typography-body-small, font-size);
    font-weight: map-get($semantic-typography-body-small, font-weight);
    line-height: map-get($semantic-typography-body-small, line-height);
    color: $semantic-color-text-secondary;
    
    &:last-child {
      margin-bottom: 0;
    }
    
    strong {
      color: $semantic-color-text-primary;
      font-weight: $semantic-typography-font-weight-semibold;
    }
  }
}

// Responsive design
@media (max-width: 768px) {
  .demo-container {
    padding: $semantic-spacing-component-md;
  }
  
  .demo-row {
    flex-direction: column;
    gap: $semantic-spacing-component-md;
  }
  
  .demo-item {
    min-width: auto;
  }
  
  .demo-controls {
    flex-direction: column;
    
    .demo-button {
      justify-content: center;
    }
  }
  
  .vertical-stepper-container {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .demo-subsection,
  .demo-item,
  .interactive-example {
    padding: $semantic-spacing-component-md;
  }
  
  .demo-section h2 {
    font-size: map-get($semantic-typography-heading-h3, font-size);
  }
  
  .demo-section h3 {
    font-size: map-get($semantic-typography-heading-h4, font-size);
  }
}