.print-mark-wrap {
  display: none;
  position: absolute;
  pointer-events: none;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  margin: auto;

  .show-crop &,
  .show-bleed-marks & {
    display: block;
  }

  .show-crop & {
    > [class*='crop'] {
      display: block;
    }
  }
  .show-bleed-marks & {
    > [class*='bleed'] {
      display: block;
    }
  }

  > div {
    display: none;
    position: absolute;
    overflow: hidden;

    &::before,
    &::after {
      content: '';
      display: block;
      position: absolute;
    }

    &:before {
      top: 0;
      left: 0;
    }
    &:after {
      bottom: 0;
      right: 0;
    }
  }
}

@mixin vertical-mark {
  &::before,
  &:after {
    width: 1px;
    height: var(--bindery-mark-length);
    background-image: linear-gradient(
      to right,
      black 0%,
      black 51%,
      transparent 51%
    );
    background-size: 1px 100%;
  }
}

@mixin horizontal-mark {
  &::before,
  &:after {
    width: var(--bindery-mark-length);
    height: 1px;
    background-image: linear-gradient(
      to bottom,
      black 0%,
      black 51%,
      transparent 51%
    );
    background-size: 100% 1px;
  }
}

.mark-crop-fold,
.mark-crop-left,
.mark-crop-right,
.mark-bleed-left,
.mark-bleed-right {
  width: 1px;
  margin: auto;
  @include vertical-mark;
}
.mark-crop-top,
.mark-crop-bottom,
.mark-bleed-top,
.mark-bleed-bottom {
  height: 1px;
  @include horizontal-mark;
}

.mark-crop {
  &-fold {
    right: 0;
    left: 0;
  }
  &-left {
    left: 0;
  }
  &-right {
    right: 0;
  }

  &-top {
    top: 0;
  }
  &-bottom {
    bottom: 0;
  }
}

.print-meta {
  padding: var(--bindery-mark-length);
  text-align: center;
  font-family: $system;
  font-size: 8pt;
  display: block !important;
  position: absolute;
  bottom: -60pt;
  left: 0;
  right: 0;
}

.mark-bleed-left,
.mark-bleed-right,
.mark-crop-left,
.mark-crop-right,
.mark-crop-fold {
  top: calc(-1 * var(--bindery-mark-length) - var(--bindery-bleed));
  bottom: calc(-1 * var(--bindery-mark-length) - var(--bindery-bleed));
}

.mark-bleed-top,
.mark-bleed-bottom,
.mark-crop-top,
.mark-crop-bottom {
  left: calc(-12pt - var(--bindery-bleed));
  right: calc(-12pt - var(--bindery-bleed));
}
.mark-bleed-left {
  left: calc(-1 * var(--bindery-bleed));
}
.mark-bleed-right {
  right: calc(-1 * var(--bindery-bleed));
}
.mark-bleed-top {
  top: calc(-1 * var(--bindery-bleed));
}
.mark-bleed-bottom {
  bottom: calc(-1 * var(--bindery-bleed));
}
