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

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

.demo-section {
  margin-bottom: $semantic-spacing-layout-section-lg;
  
  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-content-heading;
  }
}

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

.demo-item {
  border: $semantic-border-width-1 solid $semantic-color-border-subtle;
  border-radius: $semantic-border-card-radius;
  padding: $semantic-spacing-component-lg;
  background: $semantic-color-surface;
  
  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-primary;
    margin: 0 0 $semantic-spacing-content-heading 0;
  }
}

.demo-info {
  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;
  margin-top: $semantic-spacing-component-md;
  padding: $semantic-spacing-component-sm;
  background: $semantic-color-surface-secondary;
  border-radius: $semantic-border-radius-sm;
  border-left: 3px solid $semantic-color-info;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: $semantic-spacing-component-md;
  margin-bottom: $semantic-spacing-component-lg;
  padding: $semantic-spacing-component-md;
  background: $semantic-color-surface-secondary;
  border-radius: $semantic-border-radius-sm;
  
  label {
    display: flex;
    flex-direction: column;
    gap: $semantic-spacing-component-xs;
    font-family: map-get($semantic-typography-label, font-family);
    font-size: map-get($semantic-typography-label, font-size);
    font-weight: map-get($semantic-typography-label, font-weight);
    line-height: map-get($semantic-typography-label, line-height);
    color: $semantic-color-text-primary;
    
    select {
      padding: $semantic-spacing-interactive-input-padding-y $semantic-spacing-interactive-input-padding-x;
      border: $semantic-border-width-1 solid $semantic-color-border-primary;
      border-radius: $semantic-border-input-radius;
      background: $semantic-color-surface;
      color: $semantic-color-text-primary;
      font-family: map-get($semantic-typography-input, font-family);
      font-size: map-get($semantic-typography-input, font-size);
      min-width: 120px;
      
      &:focus {
        outline: 2px solid $semantic-color-focus;
        outline-offset: 2px;
        border-color: $semantic-color-focus;
      }
    }
    
    input[type="checkbox"] {
      align-self: flex-start;
      margin-top: $semantic-spacing-component-xs;
    }
  }
}

.demo-status {
  margin-top: $semantic-spacing-component-lg;
  padding: $semantic-spacing-component-md;
  background: $semantic-color-surface-elevated;
  border-radius: $semantic-border-radius-sm;
  border: $semantic-border-width-1 solid $semantic-color-border-subtle;
  
  p {
    margin: 0 0 $semantic-spacing-component-xs 0;
    font-family: map-get($semantic-typography-body-medium, font-family);
    font-size: map-get($semantic-typography-body-medium, font-size);
    font-weight: map-get($semantic-typography-body-medium, font-weight);
    line-height: map-get($semantic-typography-body-medium, 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 adjustments
@media (max-width: $semantic-breakpoint-lg - 1) {
  .demo-row {
    gap: $semantic-spacing-layout-section-sm;
  }
  
  .demo-item {
    padding: $semantic-spacing-component-md;
  }
}

@media (max-width: $semantic-breakpoint-md - 1) {
  .demo-container {
    padding: $semantic-spacing-layout-section-sm;
  }
  
  .demo-controls {
    flex-direction: column;
    
    label {
      flex-direction: row;
      align-items: center;
      
      select {
        min-width: auto;
        flex: 1;
      }
    }
  }
}