/* Lightbox (PhotoSwipe) styling for place archive pages.
 *
 * Ported from the photo-set template so the two lightboxes match: styled
 * arrows, a collapsible caption panel, and a caption toggle button. Place
 * pages previously ran stock PhotoSwipe chrome with no caption support.
 *
 * The set template tints its accent per set (the ICE in Minneapolis set is
 * blue, for example); place archives always use the site pink, so the
 * accent is a local variable defaulting to 229, 66, 159 rather than the
 * per-set --photo-set-accent-rgb.
 */

.placeArchive,
.pswp {
  --place-accent-rgb: 229, 66, 159;
}

.pswp__button--arrowPrev,
.pswp__button--arrowNext {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.pswp__button--arrowPrev { left: 1rem; }

.pswp__button--arrowNext { right: 1rem; }

.pswp__button--arrowPrev svg,
.pswp__button--arrowNext svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  pointer-events: none;
}

.pswp__button--arrowPrev:hover,
.pswp__button--arrowNext:hover {
  background: rgba(var(--place-accent-rgb, 229, 66, 159), 0.82);
  border-color: rgba(255, 255, 255, 0.2);
}

.pswp__button--arrowPrev:disabled,
.pswp__button--arrowNext:disabled {
  opacity: 0;
  pointer-events: none;
}

  .pswp__button--arrowPrev,
  .pswp__button--arrowNext {
    width: 36px;
    height: 36px;
  }

  .pswp__button--arrowPrev { left: 0.4rem; }

  .pswp__button--arrowNext { right: 0.4rem; }

.pswp__custom-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 4rem 1.5rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pswp--caption-visible .pswp__custom-caption {
  opacity: 1;
}

.pswp__button--captionToggle {
  position: absolute;
  bottom: 1.25rem;
  right: 1rem;
  z-index: 100;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pswp__button--captionToggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

.pswp__button--captionToggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.pswp__button--captionToggle.is-active {
  background: rgba(var(--place-accent-rgb, 229, 66, 159), 0.7);
  border-color: rgba(var(--place-accent-rgb, 229, 66, 159), 0.9);
  color: #fff;
}

.pswp-caption-box {
  pointer-events: auto;
  cursor: pointer;
  max-width: 680px;
  padding: 0.6rem 1rem 0.65rem;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Clamp lives on a padding-free inner element: -webkit-line-clamp only hides
   overflow outside the padding box, so padding here lets cut lines show through. */
.pswp-caption-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 0.84rem;
  line-height: 1.55;
  text-align: left;
}

.pswp__custom-caption.is-expanded .pswp-caption-text {
  display: block;
  -webkit-line-clamp: unset;
  max-height: 45vh;
  overflow-y: auto;
}

.pswp-caption-text .photo-caption-date,
.pswp-caption-text em {
  color: rgba(255, 255, 255, 0.58);
  font-style: italic;
}

.pswp-caption-text p {
  margin: 0;
}

  .pswp__custom-caption {
    padding: 3rem 0.75rem 0.75rem;
  }

  .pswp-caption-text {
    font-size: 0.82rem;
    line-height: 1.46;
  }
