/* Cubaroo — image lightbox */

.cn-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cn-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.cn-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
}

.cn-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cn-lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.cn-lightbox__image {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  background: #0f172a;
}

.cn-lightbox__caption {
  margin: 0;
  color: #f8fafc;
  font-size: 0.88rem;
  text-align: center;
  max-width: 36rem;
}

.cn-lightbox__close {
  position: absolute;
  top: -0.25rem;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-100%);
}

.cn-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.cn-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.cn-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.24);
}

.cn-lightbox__nav--prev {
  left: -3.25rem;
}

.cn-lightbox__nav--next {
  right: -3.25rem;
}

.cn-lightbox__nav[hidden],
.cn-lightbox__close[hidden] {
  display: none;
}

[data-cn-lightbox] {
  cursor: zoom-in;
}

button.pd-photo-card {
  padding: 0;
  border: 1px solid var(--cn-border);
  background: var(--cn-border-soft);
  width: 100%;
  text-align: inherit;
  font: inherit;
  color: inherit;
}

.rd-activity-feed__slide[data-cn-lightbox] {
  cursor: zoom-in;
}

body.cn-lightbox-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .cn-lightbox__nav--prev {
    left: 0.25rem;
  }

  .cn-lightbox__nav--next {
    right: 0.25rem;
  }

  .cn-lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
    transform: none;
    z-index: 2;
  }
}
