/**
 * Styles for the URANIA iframe gallery lightbox.
 *
 * This gallery is opened on the parent (QUADRA / WordPress) page when the
 * URANIA iframe sends a "uraniaOpenGallery" postMessage containing hotel
 * images from HotelviewTabContentMediaComponent.
 */

.smg-urania-gallery {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  align-items: center;
  justify-content: center;
}

.smg-urania-gallery.is-open {
  display: flex;
}

.smg-urania-gallery__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.smg-urania-gallery__close {
  position: absolute;
  top: 15px;
  right: 20px;
  z-index: 3;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 5px 10px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.smg-urania-gallery__close:hover,
.smg-urania-gallery__close:focus {
  opacity: 1;
}

.smg-urania-gallery__prev,
.smg-urania-gallery__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 15px 12px;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
  border-radius: 2px;
}

.smg-urania-gallery__prev {
  left: 10px;
}

.smg-urania-gallery__next {
  right: 10px;
}

.smg-urania-gallery__prev:hover,
.smg-urania-gallery__prev:focus,
.smg-urania-gallery__next:hover,
.smg-urania-gallery__next:focus {
  opacity: 1;
  background: rgba(0, 0, 0, 0.6);
}

.smg-urania-gallery__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 120px);
  max-height: calc(100% - 100px);
}

.smg-urania-gallery__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: smg-urania-gallery-spin 0.7s linear infinite;
  position: absolute;
}

@keyframes smg-urania-gallery-spin {
  to { transform: rotate(360deg); }
}

.smg-urania-gallery__image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.smg-urania-gallery__image.is-loaded {
  opacity: 1;
}

.smg-urania-gallery__counter {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: #ccc;
  font-size: 14px;
  font-family: 'Open Sans', Arial, sans-serif;
}

@media (max-width: 768px) {
  .smg-urania-gallery__content {
    max-width: 100%;
    max-height: calc(100% - 80px);
  }

  .smg-urania-gallery__prev,
  .smg-urania-gallery__next {
    padding: 10px 8px;
    font-size: 22px;
  }

  .smg-urania-gallery__prev {
    left: 5px;
  }

  .smg-urania-gallery__next {
    right: 5px;
  }

  .smg-urania-gallery__close {
    top: 10px;
    right: 10px;
    font-size: 30px;
  }
}
