/* templates/revealjs/css/lightbox.css
 * SPDX-License-Identifier: MIT
 * SPDX-FileCopyrightText: 2026 Sobera <contacto@sobera.mx>
 * Lightbox y zoom para diagramas SVG y gráficos
 */

.sobera-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sobera-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 29, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 0;
}

.lightbox-toolbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(10, 15, 29, 0.9);
  border: 1px solid rgba(0, 242, 254, 0.35);
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 242, 254, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lightbox-title {
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #cbd5e1;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: none !important;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.18s ease;
  outline: none;
}

.lightbox-btn:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: #00f2fe;
  color: #00f2fe;
  transform: scale(1.08);
}

.lightbox-btn:active {
  transform: scale(0.95);
}

.lightbox-btn.lightbox-close {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  margin-left: 8px;
}

.lightbox-btn.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: #ef4444;
  color: #ffffff;
}

.lightbox-zoom-level {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #38bdf8;
  min-width: 52px;
  text-align: center;
  font-weight: 600;
}

.lightbox-viewport {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: grab;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-viewport.dragging {
  cursor: grabbing !important;
}

.lightbox-stage {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transform-origin: 0 0;
  will-change: transform;
}

.lightbox-stage svg,
.lightbox-stage img,
.lightbox-stage .lightbox-img {
  display: block !important;
  max-width: none !important;
  max-height: none !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto;
  filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.8));
}

.lightbox-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #94a3b8;
  background: rgba(10, 15, 29, 0.8);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  letter-spacing: 0.4px;
  pointer-events: none;
}

.lightbox-hint kbd {
  font-family: 'JetBrains Mono', monospace;
  color: #00f2fe;
  background: rgba(0, 242, 254, 0.14);
  padding: 1px 6px;
  border-radius: 3px;
}
