/* Rewi Image Lightbox v1.0 */

.rewi-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(10, 18, 34, .88);
  backdrop-filter: blur(8px);
}

.rewi-lightbox.is-open {
  display: flex;
}

.rewi-lightbox-dialog {
  position: relative;
  width: min(1400px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rewi-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
}

.rewi-lightbox-caption {
  margin-top: 12px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  text-align: center;
}

.rewi-lightbox-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #17233d;
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}

.rewi-lightbox-close:hover,
.rewi-lightbox-close:focus-visible {
  background: #edf4ff;
  color: #1677ff;
}

.rewi-lightbox-trigger {
  cursor: zoom-in;
}

body.rewi-lightbox-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .rewi-lightbox {
    padding: 14px;
  }

  .rewi-lightbox-dialog {
    width: 100%;
  }

  .rewi-lightbox-image {
    max-height: 78vh;
    border-radius: 12px;
  }

  .rewi-lightbox-close {
    top: -12px;
    right: -4px;
    width: 40px;
    height: 40px;
  }
}
