@import "@material/animation/functions";

@mixin box-sizing() {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

@mixin border-radius($radius) {
  -webkit-border-radius: $radius;
  -moz-border-radius: $radius;
  border-radius: $radius;
}

@mixin box-shadow($shodow) {
  -webkit-box-shadow: $shodow;
  -moz-box-shadow: $shodow;
  -o-box-shadow: $shodow;
  box-shadow: $shodow;
}

@mixin transition($transition) {
  -webkit-transition: $transition;
  -moz-transition: $transition;
  -o-transition: $transition;
  transition: $transition;
}

@mixin transform($transforms) {
  -webkit-transform: $transforms;
  -moz-transform: $transforms;
  -o-transform: $transforms;
  -ms-transform: $transforms;
  transform: $transforms;
}

@mixin rotate($deg) {
  @include transform(rotate(#{$deg}deg));
}

@mixin scale($scale) {
  @include transform(scale($scale));
}

@mixin translate($x, $y) {
  @include transform(translate($x, $y));
}

@mixin skew($x, $y) {
  @include transform(skew(#{$x}deg, #{$y}deg));
}

@mixin clearfix() {
  &::after {
    display: block;
    content: "";
    clear: both;
  }
}

@mixin scrollbars($size, $foreground-color, $background-color: mix($foreground-color, #000, 50%)) {
  ::-webkit-scrollbar {
    width:  $size;
    height: $size;
  }

  ::-webkit-scrollbar-thumb {
    background: $foreground-color;
  }

  ::-webkit-scrollbar-track {
    background: $background-color;
  }

  body {
    scrollbar-face-color: $foreground-color;
    scrollbar-track-color: $background-color;
  }
}

@mixin animate($keyframes, $duration: 350ms) {
  animation: mdc-animation-enter($keyframes, $duration);
}

@keyframes rotate-clockwise {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes rotate-anti-clockwise {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.left {
  float: left !important;
}

.right {
  float: right !important;
}

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.hidden {
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 none !important;
  visibility: collapse;
  opacity: 0;
  @include transition(all .25s ease-in-out);
}

.visible {
  visibility: visible;
  opacity: 1;
}
