@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-content-heading;
  }

  p {
    font-family: map-get($semantic-typography-body-large, font-family);
    font-size: map-get($semantic-typography-body-large, font-size);
    font-weight: map-get($semantic-typography-body-large, font-weight);
    line-height: map-get($semantic-typography-body-large, line-height);
    color: $semantic-color-text-secondary;
    margin-bottom: $semantic-spacing-layout-section-sm;
  }
}

.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;
    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(250px, 1fr));
  gap: $semantic-spacing-grid-gap-lg;
  margin-bottom: $semantic-spacing-layout-section-md;
}

.demo-row {
  display: flex;
  gap: $semantic-spacing-grid-gap-lg;
  margin-bottom: $semantic-spacing-layout-section-md;
  flex-wrap: wrap;

  @media (max-width: $semantic-breakpoint-md - 1) {
    flex-direction: column;
  }
}

.demo-item {
  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-md;
  }

  button {
    background: $semantic-color-primary;
    color: $semantic-color-on-primary;
    border: none;
    border-radius: $semantic-border-radius-md;
    padding: $semantic-spacing-interactive-button-padding-y $semantic-spacing-interactive-button-padding-x;
    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;
    margin-bottom: $semantic-spacing-component-md;
    transition: all $semantic-motion-duration-fast $semantic-motion-easing-ease;

    &:hover {
      box-shadow: $semantic-shadow-button-hover;
      transform: translateY(-1px);
    }

    &:active {
      transform: translateY(0);
    }

    &:focus-visible {
      outline: 2px solid $semantic-color-focus;
      outline-offset: 2px;
    }
  }
}

.demo-content {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  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);
  font-weight: $semantic-typography-font-weight-semibold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  flex-direction: column;
  gap: $semantic-spacing-component-xs;

  span {
    display: block;
  }

  small {
    font-family: map-get($semantic-typography-caption, font-family);
    font-size: map-get($semantic-typography-caption, font-size);
    font-weight: map-get($semantic-typography-caption, font-weight);
    line-height: map-get($semantic-typography-caption, line-height);
    opacity: $semantic-opacity-subtle;
  }
}