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

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

  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-bottom: $semantic-spacing-layout-section-lg;
  }
}

.demo-section {
  margin-bottom: $semantic-spacing-layout-section-xl;
  
  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-bottom: $semantic-spacing-layout-section-md;
  }
  
  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-bottom: $semantic-spacing-component-sm;
  }
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: $semantic-spacing-grid-gap-lg;
}

.demo-column {
  display: flex;
  flex-direction: column;
  gap: $semantic-spacing-layout-section-md;
}

.demo-item {
  padding: $semantic-spacing-component-lg;
  border: $semantic-border-width-1 solid $semantic-color-border-secondary;
  border-radius: $semantic-border-card-radius;
  background: $semantic-color-surface-primary;
}

.demo-controls {
  display: flex;
  gap: $semantic-spacing-component-sm;
  margin-bottom: $semantic-spacing-component-md;
  flex-wrap: wrap;
}

.demo-button {
  padding: $semantic-spacing-interactive-button-padding-y $semantic-spacing-interactive-button-padding-x;
  border: $semantic-border-width-1 solid $semantic-color-border-primary;
  border-radius: $semantic-border-button-radius;
  background: $semantic-color-surface-primary;
  color: $semantic-color-text-primary;
  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);
  line-height: map-get($semantic-typography-button-medium, line-height);
  cursor: pointer;
  transition: all $semantic-motion-duration-fast $semantic-motion-easing-ease;
  min-height: $semantic-sizing-button-height-md;
  
  &:hover {
    background: $semantic-color-primary;
    color: $semantic-color-on-primary;
    border-color: $semantic-color-primary;
  }
  
  &:focus-visible {
    outline: 2px solid $semantic-color-focus;
    outline-offset: 2px;
  }
}

// Responsive Design
@media (max-width: ($semantic-breakpoint-lg - 1)) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: ($semantic-breakpoint-md - 1)) {
  .demo-container {
    padding: $semantic-spacing-layout-section-sm;
  }
  
  .demo-section {
    margin-bottom: $semantic-spacing-layout-section-lg;
  }
  
  .demo-item {
    padding: $semantic-spacing-component-md;
  }
}

@media (max-width: ($semantic-breakpoint-sm - 1)) {
  .demo-controls {
    flex-direction: column;
  }
  
  .demo-button {
    width: 100%;
  }
}