@use 'functions' as *;

@mixin fluid-text($max: 48, $min: 16) {
  font-size: fluid($max, $min);
}

@mixin hide {
  visibility: hidden;
  opacity: 0;
}

@mixin show {
  visibility: visible;
  opacity: 1;
}

@mixin flex-center($isInline: false) {
  @if $isInline {
    display: inline-flex;
  } @else {
    display: flex;
  }

  justify-content: center;
  align-items: center;
}

@mixin abs-cover {
  position: absolute;
  inset: 0;
}

@mixin abs-center {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

@mixin abs-x {
  position: absolute;
  left: 50%;
  translate: -50%;
}

@mixin abs-y {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
}

@mixin square($size) {
  width: $size;
  height: $size;
}

@mixin visually-hidden {
  position: absolute !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  white-space: nowrap !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(100%) !important;
}

@mixin focus-visible {
  outline: 2px dashed var(--color-white);
  outline-offset: 4px;
  transition-duration: 0s !important;
}

@mixin disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
