/* ============================================================
   Plantation Lightbox - shared component
   ============================================================ */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: none;
  flex-direction: column;
  user-select: none;
  animation: lb-fade 0.18s ease-out;
}
.lb-overlay.open { display: flex; }

@keyframes lb-fade {
  from { opacity: 0; } to { opacity: 1; }
}

.lb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  color: #fff;
  flex: 0 0 auto;
  gap: 12px;
}
.lb-toolbar { display: inline-flex; align-items: center; gap: 6px; }
.lb-toolbar button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}
.lb-toolbar button:hover { background: rgba(255,255,255,0.25); }
.lb-toolbar button:disabled { opacity: 0.4; cursor: not-allowed; }
.lb-zoom-level {
  display: inline-block;
  min-width: 56px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.lb-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 8px;
}
.lb-close:hover { color: #ffc107; }

.lb-stage {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-viewport {
  width: 100%;
  height: 100%;
  overflow: auto;
  text-align: center;
  position: relative;
  cursor: grab;
}
.lb-viewport::before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}
.lb-image {
  display: inline-block;
  max-width: 95%;
  max-height: 95%;
  vertical-align: middle;
  transition: width 0.15s ease, height 0.15s ease, max-width 0.15s ease, max-height 0.15s ease;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}
.lb-image.zoomed { max-width: none; max-height: none; }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 0;
  width: 48px;
  height: 80px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
  z-index: 5;
}
.lb-nav:hover { background: rgba(255,255,255,0.3); }
.lb-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.lb-prev { left: 0; border-radius: 0 6px 6px 0; }
.lb-next { right: 0; border-radius: 6px 0 0 6px; }

.lb-caption {
  padding: 14px 18px 20px;
  color: #fff;
  text-align: center;
  flex: 0 0 auto;
  background: rgba(0,0,0,0.4);
}
.lb-caption-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.lb-caption-meta  { font-size: 0.85rem; opacity: 0.8; }
.lb-counter { font-size: 0.85rem; opacity: 0.7; }

/* prevent page scroll while lightbox is open */
body.lb-open { overflow: hidden; }

@media (max-width: 576px) {
  .lb-nav { width: 36px; height: 60px; font-size: 1.4rem; }
  .lb-toolbar button { padding: 5px 8px; font-size: 0.8rem; }
}
