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

.demo-container {
  padding-bottom: 120px; // Extra space to accommodate bottom navigation examples
}

.demo-section {
  margin-bottom: $semantic-spacing-layout-section-lg;
}

.demo-row {
  display: flex;
  gap: $semantic-spacing-component-lg;
  flex-wrap: wrap;
  
  &--vertical {
    flex-direction: column;
    gap: $semantic-spacing-component-md;
  }
}

.demo-item {
  flex: 1;
  min-width: 300px;
  
  h4 {
    margin-bottom: $semantic-spacing-component-sm;
    color: $semantic-color-text-primary;
    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);
  }
}

.demo-bottom-nav-container {
  position: relative;
  height: 80px;
  background: $semantic-color-surface-secondary;
  border: $semantic-border-width-1 solid $semantic-color-border-secondary;
  border-radius: $semantic-border-radius-md;
  overflow: hidden;
  margin-bottom: $semantic-spacing-component-md;
  
  // Override the fixed positioning for demo purposes
  :deep(.ui-bottom-navigation) {
    position: absolute !important;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

.demo-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-md;
  margin: $semantic-spacing-component-md 0;
  
  p {
    margin: 0 0 $semantic-spacing-component-xs 0;
    color: $semantic-color-text-primary;
    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);
    
    &:last-child {
      margin-bottom: 0;
    }
    
    strong {
      font-weight: $semantic-typography-font-weight-semibold;
      color: $semantic-color-text-primary;
    }
  }
}

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

.demo-button {
  padding: $semantic-spacing-interactive-button-padding-y $semantic-spacing-interactive-button-padding-x;
  background: $semantic-color-primary;
  color: $semantic-color-on-primary;
  border: none;
  border-radius: $semantic-border-button-radius;
  cursor: pointer;
  transition: all $semantic-motion-duration-fast $semantic-motion-easing-ease;
  
  // Typography
  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);
  
  &:hover {
    box-shadow: $semantic-shadow-button-hover;
  }
  
  &:focus-visible {
    outline: 2px solid $semantic-color-focus;
    outline-offset: 2px;
  }
  
  &:active {
    box-shadow: $semantic-shadow-button-rest;
    transform: translateY(1px);
  }
  
  &.active {
    background: $semantic-color-secondary;
    color: $semantic-color-on-secondary;
  }
}

// Responsive adjustments
@media (max-width: $semantic-breakpoint-sm - 1) {
  .demo-row {
    flex-direction: column;
  }
  
  .demo-item {
    min-width: auto;
  }
  
  .demo-controls {
    flex-direction: column;
  }
  
  .demo-button {
    width: 100%;
  }
}