/* Self-contained photo viewer. No jQuery, no Bootstrap modal. Replaces
   ekko-lightbox, whose modal opened with no visible way back to the grid. */
.tpplb {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  background: rgba(0, 0, 0, 0.92);
  -webkit-tap-highlight-color: transparent;
}
.tpplb.is-open { display: block; }

.tpplb__stage {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5vmin;
  cursor: zoom-out;
}
.tpplb__img {
  max-width: 94vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.55);
  cursor: default;
}
.tpplb__cap {
  color: #eaeaea;
  margin-top: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  max-width: 90vw;
}

/* Controls: always visible, so getting back is never a guess. */
.tpplb__btn {
  position: absolute;
  z-index: 2;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 0;
  cursor: pointer;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  font-size: 30px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.tpplb__btn:hover { background: rgba(200, 30, 30, 0.92); transform: scale(1.06); }
.tpplb__close { top: 18px; right: 18px; }
.tpplb__prev { left: 18px;  top: 50%; transform: translateY(-50%); }
.tpplb__next { right: 18px; top: 50%; transform: translateY(-50%); }
.tpplb__prev:hover, .tpplb__next:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 640px) {
  .tpplb__btn { width: 46px; height: 46px; font-size: 26px; }
  .tpplb__close { top: 10px; right: 10px; }
  .tpplb__prev { left: 6px; }
  .tpplb__next { right: 6px; }
}
