@import "../base/colors";
@import "../base/variables";
@import "../base/mixins";

$size-button: 2.1em;
$color-button: rgba($c1, .8);

.h5p-sdk {
  .imagelightbox {
    display: none;
    background-color: rgba(0, 0, 0, .8);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;

    &.active {
      display: block;
    }

    ol, ul {
      @include reset-list;
    }
  }

  .imagelightbox-inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
  }

  .imagelightbox-image {
    @include reset-list;

    display: none;
    width: 100%;

    &.active {
      display: block;
    }

    img {
      display: block;
      margin: 0 auto;
      padding: 0 4.5em;
      box-sizing: border-box;
    }
  }

  .imagelightbox-progress {
    color: #fff;
    position: relative;
    bottom: -2em;
    text-align: center;
  }

  .imagelightbox-button {
    position: absolute;
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    color: #fff;
    font-size: 2em;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
    transition: background 0.2s;

    &:before {
      font-size: 0.6em;
    }
    &.previous, &.next {
      left: 0.5em;
      top: 50%;
      transform: translateY(-50%);
      background: $color-button;
    }
    &.next {
      left: auto;
      right: 0.5em;
    }
    &.close {
      position: relative;
      top: -0.5em;
      right: 0.5em;
      float: right;
    }
    &[aria-disabled] {
      opacity: .5;
      cursor: default;
    }
  }

  .imagelightbox-button:not([aria-disabled]):hover {
    background: lighten($color-button, 10%);
  }
}
