/* Lite Light - Lightweight Lightbox Utility Styles */

.lite-light {
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;

  &.lite-light-active {
    display: flex;
  }

  .lite-light-prev {
    left: 10px;
    position: absolute;
  }

  .lite-light-next {
    position: absolute;
    right: 10px;
  }

  img {
    background-color: #fff;
    padding: 7px;
  }
}

/* Navigation Arrows */
.lite-light-arrow {
  border: solid #fff;
  border-width: 0 1px 1px 0;
  display: inline-block;
  padding: 10px;
  transform: scale(1);
  transition: all 0.3s ease;

  &:hover {
    cursor: pointer;
    transform: scale(1.1);
  }

  &.lite-light-right {
    -webkit-transform: rotate(-45deg);
    margin-right: 10px;
    transform: scale(1) rotate(-45deg);

    &:hover {
      transform: scale(1.05) rotate(-45deg);
    }
  }

  &.lite-light-left {
    -webkit-transform: rotate(135deg);
    margin-left: 10px;
    transform: scale(1) rotate(135deg);

    &:hover {
      transform: scale(1.05) rotate(135deg);
    }
  }
}

/* Close Button */
.lite-light-close {
  &.lite-light-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 21.5px;
    justify-content: space-between;
    position: absolute;
    right: 15px;
    top: 15px;
    transform: scale(1);
    transition: all 0.3s ease;
    width: 22px;

    &:hover {
      transform: scale(1.1);
    }
  }

  .lite-light-bar {
    background-color: #fff;
    display: block;
    height: 1px;
    transition: all 100ms ease-in-out;
    width: 100%;

    &:nth-of-type(1) {
      transform: rotate(45deg);
      transform-origin: top left;
      transition: all 100ms ease-in-out;
      width: 30px;
    }

    &:nth-of-type(2) {
      transform: rotate(-45deg);
      transform-origin: bottom left;
      transition: all 100ms ease-in-out;
      width: 30px;
    }
  }
}

/* Animation keyframes for fading */
@keyframes lite-light-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lite-light-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Animation classes */
.lite-light-fade-in {
  animation: lite-light-fade-in 0.15s ease-in-out forwards;
}

.lite-light-fade-out {
  animation: lite-light-fade-out 0.15s ease-in-out forwards;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .lite-light {
    .lite-light-prev,
    .lite-light-next {
      display: none;
    }

    img {
      max-height: 80vh;
      max-width: 90%;
      padding: 5px;
    }

    .lite-light-close {
      font-size: 2rem;
      right: 25px;
      top: 25px;
    }
  }

  .lite-light-close.lite-light-button {
    height: 21.5px;
  }
}

/* Mobile Safari Fixes */
@supports (-webkit-touch-callout: none) {
  .lite-light img {
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    transform: translateZ(0);
  }
}
