/* stylelint-disable selector-max-universal */
/** BOX-SIZING */
@mixin boxSizing($value: border-box) {
  box-sizing: $value;

  *,
  *::before,
  *::after {
    box-sizing: $value;
  }
}

/** RESPONSIVE APP SIZING */
@mixin responsiveAppSizing() {
  max-width: calc(#{$viewport-width} - #{$spacer * 2});
  max-height: calc(#{$viewport-height * 0.85} - #{$spacer * 2});

  @include media('>phablet-l') {
    max-height: calc(#{$viewport-height} - #{$spacer * 2});

    /** iOS Safari needs a bit more space */
    @supports (-webkit-overflow-scrolling: touch) {
      max-height: calc(#{$viewport-height * 0.9} - #{$spacer * 2});
    }
  }

  @include media('>desktop') {
    right: $spacer;
    bottom: $spacer;
    max-height: calc(#{$viewport-height} - #{$spacer * 2});

    /** iOS Safari needs a bit more space */
    @supports (-webkit-overflow-scrolling: touch) {
      max-height: calc(#{$viewport-height * 0.9} - #{$spacer * 2});
    }
  }
}

/** UNLIST */
@mixin unList() {
  margin: 0;
  padding: 0;
  list-style: none;
}

/** STYLE PLACEHOLDER */
@mixin stylePlaceholder() {
  &::input-placeholder {
    /** Chrome/Opera/Safari */
    @content;
  }

  &::placeholder {
    /** Firefox 19+ */
    @content;
  }

  &:input-placeholder {
    /** IE 10+ */
    @content;
  }

  &:placeholder {
    /** Firefox 18- */
    @content;
  }
}
