@import "~@/styles/variables.scss";

@mixin absolute-centered() {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@mixin circle($size) {
  width: $size;
  height: $size;
  border-radius: $size;
  line-height: $size;
}

@mixin placeholder {
  &::-webkit-input-placeholder { @content }
  &:-moz-placeholder           { @content }
  &::-moz-placeholder          { @content }
  &:-ms-input-placeholder      { @content }
}

@mixin tabs($active-indicator-height, $active-color, $active-text-color){
  height: $layout-tabs-height;
  border: 1px solid rgba(255,255,255,.1);

  & > nav.md-tabs-navigation {
    z-index: 2;
  }

  &.no-border > nav.md-tabs-navigation {
     border-bottom: 0;
  }

  .md-tab-header {
    position: relative;
    padding: 0 $layout-space-base;
    max-width: inherit;
    @media (max-width: $layout-breakpoint-xs) {
      padding: 0;
    }
    &[disabled] {
      opacity: 0.4;
      cursor: inherit;
    }

    &:after {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      display: block;
      content: '';
      height: $active-indicator-height;
      transform: scaleX(0);
      transition: transform 0.1s;
      background-color:  $active-color;
    }

    &.active {
      .md-tab-header-container {
        color: $active-text-color;
      }
      &:after {
        background-color: $active-text-color;
        transform: scaleX(1);
        @media (max-width: $layout-breakpoint-xs) {
          transform: scaleX(.5);
        }
      }
    }

    .md-tab-header-container {
      color: $color-ilg-grey-3;
    }

    .md-ink-ripple {
      color: $color-ilg-grey-1;
    }

  }
}

@mixin section-title(){
  color: $color-ilg-orange-accent-2;
  text-transform: uppercase;
  font-weight: 100;
  font-size: 19px;
  margin-bottom: 10px;
  @media (max-width: $layout-breakpoint-xs) {
    font-size: 15px;
  }
}

@mixin box-shadow(){
  box-shadow: 0 16px 16px -16px rgba(0, 0, 0, 0.4);
}

@mixin headline($border:none){
  text-indent: 16px;
  margin: 0;
  padding-top: 16px;
  margin-bottom: 16px;
  display: block;
  width: 100%;
  border-top: $border;
  @media (max-width: $layout-breakpoint-xs) {
    text-indent: 0;
  }
}
