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

.demo-container {
  padding: $semantic-spacing-component-lg;
  max-width: 100%;
  
  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-content-heading;
  }
  
  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;
  }
  
  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-bottom: $semantic-spacing-component-sm;
  }
  
  p {
    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;
    margin-bottom: $semantic-spacing-content-paragraph;
  }
}

.demo-section {
  margin-bottom: $semantic-spacing-layout-section-lg;
  
  h3 {
    border-bottom: $semantic-border-width-1 solid $semantic-color-border-subtle;
    padding-bottom: $semantic-spacing-component-sm;
  }
}

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

.demo-card {
  background: $semantic-color-surface-elevated;
  border: $semantic-border-width-1 solid $semantic-color-border-subtle;
  border-radius: $semantic-border-radius-md;
  padding: $semantic-spacing-component-md;
  
  h4 {
    margin-top: 0;
    color: $semantic-color-text-primary;
  }
}

.demo-layout-preview {
  height: 400px;
  border: $semantic-border-width-1 solid $semantic-color-border-secondary;
  border-radius: $semantic-border-radius-sm;
  overflow: hidden;
  margin-top: $semantic-spacing-component-sm;
  
  .ui-supporting-pane-layout {
    min-height: 100%;
  }
}

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

.demo-btn {
  padding: $semantic-spacing-component-xs $semantic-spacing-component-sm;
  border: $semantic-border-width-1 solid $semantic-color-border-primary;
  border-radius: $semantic-border-radius-sm;
  background: $semantic-color-surface;
  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;
  
  &:hover {
    background: $semantic-color-interactive-primary;
    color: $semantic-color-text-primary;
  }
  
  &.active {
    background: $semantic-color-primary;
    color: $semantic-color-on-primary;
    border-color: $semantic-color-primary;
  }
}

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

.demo-checkbox {
  display: flex;
  align-items: center;
  gap: $semantic-spacing-component-xs;
  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-primary;
  cursor: pointer;
  
  input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}

// Demo content styles
.demo-main-content {
  padding: $semantic-spacing-component-md;
  height: 100%;
  overflow-y: auto;
  
  h3 {
    display: flex;
    align-items: center;
    gap: $semantic-spacing-component-xs;
    margin-top: 0;
    
    fa-icon {
      color: $semantic-color-primary;
    }
  }
  
  ul {
    margin: $semantic-spacing-component-sm 0;
    padding-left: $semantic-spacing-component-md;
    
    li {
      margin-bottom: $semantic-spacing-component-xs;
      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;
    }
  }
}

.demo-content-blocks {
  display: grid;
  gap: $semantic-spacing-component-sm;
  margin-top: $semantic-spacing-component-md;
}

.demo-content-block {
  background: $semantic-color-surface-elevated;
  border: $semantic-border-width-1 solid $semantic-color-border-subtle;
  border-radius: $semantic-border-radius-sm;
  padding: $semantic-spacing-component-sm;
  
  h4 {
    display: flex;
    align-items: center;
    gap: $semantic-spacing-component-xs;
    margin: 0 0 $semantic-spacing-component-xs 0;
    
    fa-icon {
      color: $semantic-color-primary;
      font-size: $semantic-sizing-icon-inline;
    }
  }
  
  p {
    margin: 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);
  }
}

.demo-pane-content {
  margin-top: $semantic-spacing-component-sm;
}

.demo-setting-item {
  display: flex;
  align-items: center;
  gap: $semantic-spacing-component-sm;
  padding: $semantic-spacing-component-xs 0;
  border-bottom: $semantic-border-width-1 solid $semantic-color-border-subtle;
  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-primary;
  cursor: pointer;
  transition: color $semantic-motion-duration-fast $semantic-motion-easing-ease;
  
  &:last-child {
    border-bottom: none;
  }
  
  &:hover {
    color: $semantic-color-primary;
  }
  
  fa-icon {
    color: $semantic-color-text-secondary;
    font-size: $semantic-sizing-icon-inline;
    transition: color $semantic-motion-duration-fast $semantic-motion-easing-ease;
  }
  
  &:hover fa-icon {
    color: $semantic-color-primary;
  }
}

.demo-tag-item {
  display: inline-block;
  background: $semantic-color-primary;
  color: $semantic-color-on-primary;
  padding: $semantic-spacing-component-xs $semantic-spacing-component-sm;
  border-radius: $semantic-border-radius-sm;
  font-family: map-get($semantic-typography-body-small, font-family);
  font-size: map-get($semantic-typography-body-small, font-size);
  font-weight: $semantic-typography-font-weight-medium;
  line-height: map-get($semantic-typography-body-small, line-height);
  margin: $semantic-spacing-component-xs $semantic-spacing-component-xs $semantic-spacing-component-xs 0;
  cursor: pointer;
  transition: all $semantic-motion-duration-fast $semantic-motion-easing-ease;
  
  &:hover {
    background: $semantic-color-secondary;
    color: $semantic-color-on-secondary;
  }
}

.demo-info-item,
.demo-config-item {
  padding: $semantic-spacing-component-xs 0;
  border-bottom: $semantic-border-width-1 solid $semantic-color-border-subtle;
  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 {
    border-bottom: none;
  }
  
  strong {
    color: $semantic-color-text-primary;
    font-weight: $semantic-typography-font-weight-semibold;
  }
}

.demo-variant-info {
  background: $semantic-color-surface-elevated;
  border: $semantic-border-width-1 solid $semantic-color-border-subtle;
  border-radius: $semantic-border-radius-sm;
  padding: $semantic-spacing-component-sm;
  margin-bottom: $semantic-spacing-component-sm;
  text-align: center;
  font-family: map-get($semantic-typography-body-small, font-family);
  font-size: map-get($semantic-typography-body-small, font-size);
  font-weight: $semantic-typography-font-weight-medium;
  line-height: map-get($semantic-typography-body-small, line-height);
  color: $semantic-color-primary;
}

// Responsive design
@media (max-width: 1200px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
  
  .demo-layout-preview {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .demo-container {
    padding: $semantic-spacing-component-sm;
  }
  
  .demo-layout-preview {
    height: 250px;
  }
  
  .demo-controls {
    flex-direction: column;
    gap: $semantic-spacing-component-sm;
  }
}