/* 
  Mixins for reusable style patterns
*/

// Basic flex helpers
@mixin flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

@mixin flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@mixin flex-column {
  display: flex;
  flex-direction: column;
}

// Basic transition
@mixin transition-standard {
  transition: all var(--duration-normal) var(--easing-ease-out);
}

// Responsive mixins
@mixin media-sm {
  @media (min-width: 576px) {
    @content;
  }
}

@mixin media-md {
  @media (min-width: 768px) {
    @content;
  }
}

@mixin media-lg {
  @media (min-width: 992px) {
    @content;
  }
}

@mixin media-xl {
  @media (min-width: 1200px) {
    @content;
  }
}

// Sets the rendered size of a .spinner-ring SVG (see _loading.scss) the
// ring geometry is fixed by its viewBox, so the stroke scales
// proportionally with whatever size is set here.
@mixin spinner-size($size) {
  width: $size;
  height: $size;
}

// Custom scrollbar
@mixin custom-scrollbar {
  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: var(--primary-bg);
    border-radius: 10px;
  }

  &::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid var(--primary-bg);
  }

  &::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, white 10%, var(--primary-color));
  }
}
