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

// Tokens available globally via main application styles

.ui-simple-button {
  // Reset and base styles
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: $semantic-border-radius-md;
  cursor: pointer;
  text-decoration: none;
  outline: none;
  position: relative;
  box-sizing: border-box;
  
  // Typography
  font-family: $semantic-typography-font-family-sans;
  font-weight: $semantic-typography-font-weight-medium;
  font-size: $semantic-typography-font-size-sm;
  line-height: $semantic-typography-line-height-normal;
  text-align: center;
  white-space: nowrap;
  
  // Default sizing
  height: $semantic-spacing-10; // 2.5rem
  padding: 0 $semantic-spacing-4; // 1rem
  min-width: $semantic-spacing-20; // 5rem
  
  // Interaction states
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  
  // Transitions
  transition: all $semantic-motion-duration-fast $semantic-motion-easing-ease-out;
  
  // Primary variant
  &--primary {
    background-color: $semantic-color-interactive-primary;
    color: $semantic-color-on-brand-primary;
    
    &:hover:not(:disabled) {
      background-color: $semantic-color-brand-primary;
      transform: translateY(-1px);
      box-shadow: $semantic-shadow-button-hover;
    }
    
    &:active:not(:disabled) {
      transform: scale(0.98);
      box-shadow: $semantic-shadow-button-active;
    }
    
    &:focus-visible {
      outline: 2px solid $semantic-color-brand-primary;
      outline-offset: 2px;
    }
  }
  
  // Secondary variant
  &--secondary {
    background-color: $semantic-color-container-primary;
    color: $semantic-color-on-container-primary;
    border: $semantic-border-width-1 solid $semantic-color-border-primary;
    
    &:hover:not(:disabled) {
      background-color: $semantic-color-container-primary;
      border-color: $semantic-color-interactive-primary;
      transform: translateY(-1px);
      filter: brightness(0.95);
    }
    
    &:active:not(:disabled) {
      background-color: $semantic-color-container-primary;
      transform: scale(0.98);
      filter: brightness(0.9);
    }
    
    &:focus-visible {
      outline: 2px solid $semantic-color-brand-primary;
      outline-offset: 2px;
    }
  }
  
  // Disabled state
  &:disabled {
    opacity: $semantic-opacity-disabled;
    cursor: not-allowed;
    pointer-events: none;
  }
}