/* =========================================================
   Lightbox overlay — gallery-lightbox.js companion
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 7, 0.93);
  cursor: pointer;
}

/* Centred panel */
.lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  padding: 0 1rem;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 5rem);
  object-fit: contain;
  border: 1px solid rgba(201, 164, 92, 0.25);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.85);
}

/* Close button — sits above the image */
.lightbox__close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--color-muted);
  border: 1px solid rgba(201, 164, 92, 0.3);
  border-radius: 50%;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.lightbox__close:hover {
  color: var(--color-text);
  border-color: var(--color-gold);
  background: rgba(201, 164, 92, 0.1);
}

.lightbox__close:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* Prev / next — fixed to viewport sides */
.lightbox__btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: var(--color-muted);
  border: 1px solid rgba(201, 164, 92, 0.3);
  border-radius: 50%;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.lightbox__prev { left: 1.25rem; }
.lightbox__next { right: 1.25rem; }

@media (min-width: 768px) {
  .lightbox__prev { left: 2rem; }
  .lightbox__next { right: 2rem; }
}

.lightbox__btn:hover:not(:disabled) {
  color: var(--color-gold);
  border-color: var(--color-gold);
  background: rgba(201, 164, 92, 0.1);
}

.lightbox__btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.lightbox__btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* Footer: caption + counter */
.lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0 0;
  gap: 1rem;
  min-height: 1.75rem;
}

.lightbox__caption {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.5;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox__counter {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  white-space: nowrap;
  flex-shrink: 0;
}
