/* ============================================
   Lightbox CSS — shared between Vue component and standalone JS
   ============================================ */

.lb-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 9998;
}
.lb-container {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column;
  user-select: none;
}

/* Toolbar */
.lb-toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 4px; padding: 8px 12px;
  background: rgba(0,0,0,0.5);
  z-index: 2;
}
.lb-toolbar button {
  width: 36px; height: 36px; padding: 6px;
  background: none; border: none; color: white; cursor: pointer;
  border-radius: 4px; transition: background 0.15s;
}
.lb-toolbar button:hover { background: rgba(255,255,255,0.15); }
.lb-toolbar button.lb-active-btn { background: rgba(255,255,255,0.25); }
.lb-toolbar svg { width: 100%; height: 100%; }
.lb-zoom-label {
  color: rgba(255,255,255,0.7); font-size: 13px; min-width: 32px; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Main area with optional metadata panel */
.lb-main {
  flex: 1; display: flex; overflow: hidden;
  transition: none;
}

/* Image area */
.lb-image-area {
  flex: 1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.lb-image-area.lb-zoomed { cursor: grab; }
.lb-image-area.lb-zoomed:active { cursor: grabbing; }

.lb-image-wrapper {
  transition: transform 0.2s ease;
}
.lb-image-wrapper.lb-no-transition { transition: none; }

.lb-image {
  max-width: 90vw; max-height: calc(100vh - 110px);
  object-fit: contain;
  pointer-events: none;
}
.lb-meta-open .lb-image {
  max-width: 100%;
}

/* Loader */
.lb-loader {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.lb-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: lb-spin 0.7s linear infinite;
}
@keyframes lb-spin { to { transform: rotate(360deg); } }

/* Navigation */
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 80px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); transition: color 0.15s;
  z-index: 3;
}
.lb-nav:hover { color: white; }
.lb-nav svg { width: 32px; height: 32px; }
.lb-nav-prev { left: 8px; }
.lb-nav-next { right: 8px; }

/* Metadata panel */
.lb-meta-panel {
  width: 280px; flex-shrink: 0;
  background: rgba(0,0,0,0.7);
  border-left: 1px solid rgba(255,255,255,0.1);
  padding: 16px;
  overflow-y: auto;
  color: white;
  animation: lb-slide-in 0.2s ease;
}
@keyframes lb-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.lb-meta-loading {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px 0;
  color: rgba(255,255,255,0.6); font-size: 13px;
}
.lb-meta-empty {
  color: rgba(255,255,255,0.4); font-size: 13px; padding: 32px 0; text-align: center;
}
.lb-meta-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.lb-meta-label {
  font-size: 11px; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.5px;
}
.lb-meta-value {
  font-size: 14px; color: rgba(255,255,255,0.9);
}

/* Equipment images (camera/lens) */
.lb-equip-row {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.lb-equip-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.lb-equip-img {
  width: 110px; height: 90px; object-fit: contain;
  border-radius: 6px; background: white; padding: 8px; box-sizing: border-box;
}
.lb-equip-label {
  font-size: 11px; color: rgba(255,255,255,0.6); text-align: center;
}

.lb-meta-comment {
  border-bottom: none;
}
.lb-meta-comment .lb-meta-value {
  white-space: pre-wrap; word-break: break-word;
}

/* Caption */
.lb-caption-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; padding: 8px 16px;
  background: rgba(0,0,0,0.5);
  z-index: 2;
}
.lb-caption { color: white; font-size: 14px; }
.lb-number { color: rgba(255,255,255,0.5); font-size: 13px; }
