.lightbox {
  position: fixed;
  display: flex;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  overflow: hidden;
  background-color: color(_others, dark-alpha);
  animation-name: lightbox-showing;
  animation-duration: 1s;
  z-index: 9999;
  align-items: center;
  justify-content: center;

  .content {
    position: relative;
    display: flex;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 10px 10px 20px;
    flex-direction: column;
    border-radius: 5px;
    background-color: color(_others, light);
    box-shadow: 0 4px 8px 0 color(_others, shadow);

    .close {
      display: block;
      margin-bottom: 10px;
      color: color(_red, medium);
      border: 0;
      background-color: transparent;
      cursor: pointer;
      align-self: flex-end;
    }

    .action {
      position: absolute;
      display: block;
      width: 34px;
      height: 34px;
      margin-left: -17px;
      padding: 5px;
      bottom: 3px;
      left: 50%;
      border: 0;
      border-radius: 100%;
      background: color(_red, medium);
      cursor: pointer;

      i {
        color: color(_others, light);
      }
    }

    img {
      width: auto;
      max-width: 100%;
      height: auto;
      max-height: calc(100vh - 76px);
      overflow: auto;
      object-fit: scale-down;
    }

    .slide {
      &-item {
        display: none;

        &.selected {
          display: block;
        }
      }
    }

    .navigation {
      position: absolute;
      display: flex;
      width: calc(100% + 60px);
      margin-top: -25px;
      top: 50%;
      left: -30px;
      justify-content: space-between;

      .arrow {
        color: color(_others, light);
        border: 0;
        background-color: transparent;
        cursor: pointer;
      }
    }

    .page {
      position: absolute;
      right: 10px;
      bottom: 5px;
      font-size: .9rem;
      color: color(_others, dark);
    }

    embed {
      min-width: 70vw;
      min-height: 70vh;
    }
  }
}

@keyframes lightbox-showing {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
