.lg-backdrop,
.lg-outer {
  max-height: 100vh;
}

body.lg-on {
  overflow-y: hidden;
  #page-wrapper {
    overflow: hidden;
  }
}

.gallery-container{
  &:not(.justified-gallery) {
    display: flex;
    flex-wrap: wrap;
    a {
      flex: 0 0 calc(25% - 10px);
      max-width: calc(25% - 10px);
      max-height: rem-calc(180);
      margin: 5px;
      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        max-height: rem-calc(180);
      }
      &:nth-child(4n - 3) {
        margin-left: 0;
        flex: 0 0 calc(25% - 5px);
        max-width: calc(25% - 5px);
      }
      &:nth-child(4n) {
        margin-right: 0;
        flex: 0 0 calc(25% - 5px);
        max-width: calc(25% - 5px);
      }
    }
  }
}

.lg-close:after{
  background-color: black;
  box-shadow: 0 0 0 rem-calc(3) black;
}

.lg-counter {
  padding: rem-calc(5) !important;
  height: auto !important;
  margin-left: rem-calc(20);
  margin-top: rem-calc(12);
  background-color: black;
  box-shadow: 0 0 0 rem-calc(3) black;
}
